/* ==========================================
   TUBELIGHT NAVBAR - Modern Animated Navigation
   ========================================== */

/* Main Navbar Container */
.tubelight-navbar {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    pointer-events: none;
    animation: tubelight-appear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    /* Default: Top position for desktop */
    top: 1.5rem;
    bottom: auto;
}

/* Mobile: Position at bottom */
@media screen and (max-width: 767px) {
    .tubelight-navbar {
        top: auto;
        bottom: 1.5rem;
    }
}

@keyframes tubelight-appear {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

/* Navbar Inner Container - Pill Style */
.tubelight-navbar-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    padding: 0.25rem 0.25rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5),
        0 4px 12px -4px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    pointer-events: auto;
}

/* Navigation Item Wrapper */
.tubelight-nav-item {
    position: relative;
}

/* Navigation Link - Button/Anchor Style */
.tubelight-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    background: transparent;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    white-space: nowrap;
    min-height: 40px;
}

/* Hide text on mobile, show icons */
@media screen and (max-width: 767px) {
    .tubelight-nav-link {
        padding: 0.625rem;
    }
    .tubelight-nav-text {
        display: none;
    }
    .tubelight-nav-icon {
        display: block;
    }
}

/* Show text on desktop, hide icons */
@media screen and (min-width: 768px) {
    .tubelight-nav-text {
        display: inline;
    }
    .tubelight-nav-icon {
        display: none;
    }
}

/* Navigation Icon */
.tubelight-nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover state */
.tubelight-nav-link:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Active state - With Muted Background */
.tubelight-nav-link.active {
    background: rgba(255, 255, 255, 0.08);
    color: #a855f7;
}

/* ==========================================
   TUBELIGHT LAMP EFFECT - The Star Feature
   ========================================== */

.tubelight-lamp {
    position: absolute;
    inset: 0;
    width: 100%;
    border-radius: 9999px;
    z-index: -10;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Show lamp effect on active state */
.tubelight-nav-link.active .tubelight-lamp {
    opacity: 1;
}

/* Lamp Bar - Top glowing bar */
.tubelight-lamp-bar {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2rem;
    height: 0.25rem;
    background: #a855f7;
    border-radius: 9999px 9999px 0 0;
    /* Position at top for desktop */
    top: -0.5rem;
}

/* Mobile: Lamp at bottom */
@media screen and (max-width: 767px) {
    .tubelight-lamp-bar {
        top: auto;
        bottom: -0.5rem;
        border-radius: 0 0 9999px 9999px;
    }
}

/* Glow Effects - Multiple layers for depth */
.tubelight-lamp-glow-1 {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 3rem;
    height: 1.5rem;
    background: rgba(168, 85, 247, 0.2);
    border-radius: 9999px;
    filter: blur(12px);
    top: -0.75rem;
}

.tubelight-lamp-glow-2 {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2rem;
    height: 1.5rem;
    background: rgba(168, 85, 247, 0.2);
    border-radius: 9999px;
    filter: blur(8px);
    top: -0.5rem;
}

.tubelight-lamp-glow-3 {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 1rem;
    height: 1rem;
    background: rgba(168, 85, 247, 0.25);
    border-radius: 9999px;
    filter: blur(4px);
    top: -0.25rem;
}

/* Mobile: Glow effects at bottom */
@media screen and (max-width: 767px) {
    .tubelight-lamp-glow-1 {
        top: auto;
        bottom: -0.75rem;
    }
    .tubelight-lamp-glow-2 {
        top: auto;
        bottom: -0.5rem;
    }
    .tubelight-lamp-glow-3 {
        top: auto;
        bottom: -0.25rem;
    }
}

/* ==========================================
   DROPDOWN STYLES
   ========================================== */

/* Dropdown Wrapper - Positioned for animation */
.tubelight-dropdown-wrapper {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 1000;
    padding-top: 0.75rem;
    /* Desktop: Dropdown appears below */
    top: 100%;
}

@media screen and (max-width: 767px) {
    .tubelight-dropdown-wrapper {
        top: auto;
        bottom: 100%;
        padding-top: 0;
        padding-bottom: 0.75rem;
    }
}

/* Dropdown Container */
.tubelight-dropdown {
    opacity: 0;
    transform: scale(0.95) translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    will-change: opacity, transform;
    background: rgba(20, 20, 20, 0.98);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.6),
        0 8px 16px -8px rgba(0, 0, 0, 0.4);
    padding: 0.5rem;
    min-width: 220px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

@media screen and (max-width: 767px) {
    .tubelight-dropdown {
        transform: scale(0.95) translateY(8px);
    }
}

/* Active state - Show dropdown */
.tubelight-nav-item.active .tubelight-dropdown {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
    transition: opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tubelight-nav-item.active .tubelight-dropdown-wrapper {
    pointer-events: auto;
}

/* Dropdown Item */
.tubelight-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 0.75rem;
    transition: all 0.15s ease;
    font-size: 0.875rem;
    font-weight: 500;
}

.tubelight-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.95);
    transform: translateX(4px);
}

/* Dropdown Icon */
.tubelight-dropdown-icon {
    width: 18px;
    height: 18px;
    opacity: 0.6;
    flex-shrink: 0;
    transition: opacity 0.15s ease;
}

.tubelight-dropdown-item:hover .tubelight-dropdown-icon {
    opacity: 1;
}

/* ==========================================
   MOBILE MENU TOGGLE STYLES
   ========================================== */

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2.5rem;
    padding: 0 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 0.375rem;
    text-decoration: none;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
}

#mobileMenuContainer {
    z-index: 9998;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
}
