/* Completely Restructured Navbar */
.navbar-wrapper {
    position: fixed;
    top: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 9999;
    pointer-events: none;
    padding: 0 20px;
    visibility: visible !important;
}

.floating-navbar {
    width: 90%;
    max-width: 1200px;
    height: 60px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2), 0 0 15px rgba(166, 121, 211, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, box-shadow 0.3s ease;
    pointer-events: auto;
    padding: 0 30px;
    visibility: visible !important;
    opacity: 1 !important;
    /* Positioning handled per-breakpoint to avoid conflicting with mobile rules */
}

@media (min-width: 769px) {
    .floating-navbar {
        position: fixed !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}

.floating-navbar:hover {
    transform: none !important;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4), 0 0 20px rgba(166, 121, 211, 0.25);
    border-color: rgba(166, 121, 211, 0.4);
}

.floating-navbar.navbar-hidden {
    opacity: 0;
    transform: none !important;
}

/* Brand Name */
.brand-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Orbitron', monospace;
    letter-spacing: 1px;
    position: absolute;
    left: 30px;
    text-shadow: 0 0 10px rgba(166, 121, 211, 0.5);
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
    flex-wrap: nowrap;
}

.desktop-nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    padding: 8px 16px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    white-space: nowrap;
    text-align: center;
    font-family: 'Orbitron', sans-serif;
}

.desktop-nav a:hover {
    background: rgba(166, 121, 211, 0.1);
    color: var(--primary-color);
    transform: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 0 8px rgba(166, 121, 211, 0.2);
    text-shadow: 0 0 5px rgba(166, 121, 211, 0.5);
}

.desktop-nav a.cta-button {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #ffffff;
    font-weight: 600;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(166, 121, 211, 0.4);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    padding: 10px 20px;
}

.desktop-nav a.cta-button:hover {
    transform: none !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 15px rgba(166, 121, 211, 0.5);
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
}

.desktop-nav a.subscribe-button {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(255, 107, 107, 0.4);
}

/* Hamburger Button */
.hamburger {
    display: none; /* Hidden by default, only shown on mobile */
    cursor: pointer;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    z-index: 10001;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: absolute;
    right: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 8px rgba(166, 121, 211, 0.2);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hamburger:hover {
    transform: none !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 12px rgba(166, 121, 211, 0.4);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(166, 121, 211, 0.4);
}

.menu-icon {
    font-size: 26px;
    color: var(--primary-color);
    text-shadow: 0 0 12px rgba(166, 121, 211, 0.9);
    transition: color 0.3s ease;
    display: block;
    filter: drop-shadow(0 0 5px rgba(166, 121, 211, 0.5));
}

.hamburger:hover .menu-icon {
    color: #ffffff;
    text-shadow: 0 0 15px rgba(166, 121, 211, 1);
    transform: none !important;
}

.hamburger.mobile-active .menu-icon {
    color: #ffffff;
    transform: none !important;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

/* Mobile Menu Container */
.mobile-menu-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 9998;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
}

.mobile-menu-container.active {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

/* Mobile Menu Content Container */
.mobile-menu-content {
    position: relative;
    transform: scale(0.9) translateY(30px);
    width: 85%;
    max-width: 340px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 30px; /* Match desktop navbar border-radius */
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3), 0 0 20px rgba(166, 121, 211, 0.1);
    padding: 35px 25px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile Brand Name - In navbar container */
.mobile-brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Orbitron', monospace;
    letter-spacing: 1px;
    position: static;
    text-shadow: 0 0 10px rgba(166, 121, 211, 0.6);
    display: none; /* Hidden by default, only shown on mobile */
}

/* Navigation Links */
.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-menu-container.active .mobile-menu-content {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 480px) {
    .nav-links {
        width: 90%;
        padding: 20px 15px;
    }
}

.nav-links li {
    width: 100%;
}

.nav-links li a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05rem;
    transition: color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    padding: 16px 20px;
    border-radius: 14px;
    display: block;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    letter-spacing: 0.8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), inset 0 1px 2px rgba(255, 255, 255, 0.1);
    white-space: nowrap;
    font-family: 'Orbitron', sans-serif;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

.nav-links li a:hover,
.nav-links li a:active {
    background: linear-gradient(135deg, rgba(166, 121, 211, 0.15), rgba(166, 121, 211, 0.25));
    color: #ffffff;
    transform: none !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(166, 121, 211, 0.4);
    border-color: rgba(166, 121, 211, 0.6);
    text-shadow: 0 0 10px rgba(166, 121, 211, 0.8);
}

.nav-links li a.cta-button {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #ffffff;
    font-weight: 600;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(166, 121, 211, 0.4);
    margin-top: 8px;
    font-size: 1rem;
    letter-spacing: 0.8px;
}

.nav-links li a.cta-button:hover {
    transform: none !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 15px rgba(166, 121, 211, 0.5);
}

.nav-links li a.subscribe-button {
    background: linear-gradient(135deg, var(--accent-color) 0%, #ee5a24 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(255, 107, 107, 0.4);
    margin-top: 12px;
    font-size: 1rem;
}

@media (max-width: 480px) {
    .mobile-menu-content {
        width: 90%;
        max-width: 300px;
        padding: 25px 15px;
    }
    
    .mobile-brand-name {
        font-size: 1.8rem;
        margin-bottom: 20px;
        padding-bottom: 12px;
    }
    
    .nav-links {
        gap: 12px;
    }
    
    .nav-links li a {
        font-size: 0.95rem;
        padding: 12px;
        white-space: normal;
    }
    
    .nav-links li a.cta-button {
        font-size: 0.95rem;
        padding: 12px;
        white-space: normal;
    }
}

/* Mobile Close Button */
.mobile-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    border: 1px solid rgba(166, 121, 211, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3), 0 0 5px rgba(166, 121, 211, 0.2);
}

.mobile-close-btn span {
    color: var(--primary-color);
    font-size: 18px;
    font-weight: 400;
    text-shadow: 0 0 5px rgba(166, 121, 211, 0.7);
}

.mobile-close-btn:hover {
    background: rgba(166, 121, 211, 0.25);
    transform: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 10px rgba(166, 121, 211, 0.3);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .desktop-nav a {
        font-size: 0.85rem;
        padding: 8px 12px;
    }
}

@media (max-width: 768px) {
    .navbar-wrapper {
        padding: 0 0;
        top: 0;
        justify-content: center;
    }
    
    .floating-navbar {
        position: fixed !important;
        top: 0;
        left: 0 !important;
        right: 0 !important;
        width: 100%;
        max-width: 100%;
        height: 55px;
        border-radius: 0;
        padding: 10px 14px; /* give extra right padding so icon sits inside */
        justify-content: space-between;
        background: rgba(34, 34, 34, 0.98);
        border: 0;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
        transform: none !important;
        margin: 0;
        margin-top: 0 !important; /* override any inline margin */
        display: flex;
        align-items: center;
        overflow: visible; /* avoid clipping icon glow/shadow */
    }
    
    .desktop-nav {
        display: none !important;
    }
    
    .hamburger {
        display: flex !important; /* Only show hamburger on mobile */
        position: static; /* keep within flex flow */
        right: auto !important; /* reset any absolute offset */
        width: 36px;
        height: 36px;
        border: none;
        background: transparent;
        align-items: center;
        justify-content: center;
        margin-left: auto; /* push to right within flex */
        padding: 0;
    }

    .hamburger .menu-icon {
        font-size: 20px;
        line-height: 1;
    }
    
    .menu-icon {
        font-size: 24px;
        display: block !important;
    }
    
    .brand-name {
        display: none !important;
    }
    
    .mobile-brand-name {
        display: block !important; /* Show mobile brand name */
        position: static; /* Remove absolute positioning */
        left: auto;
    }
}

@media (max-width: 480px) {
    .navbar-wrapper {
        padding: 0;
        top: 0;
        justify-content: center;
    }
    
    .floating-navbar {
        width: 100%;
        max-width: 100%;
        height: 50px;
        border-radius: 0;
        padding: 10px 10px;
        background: rgba(34, 34, 34, 0.98);
        border: 0;
        margin: 0;
        justify-content: space-between;
        transform: none !important;
    }
    
    .hamburger {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
    }
    
    .menu-icon {
        font-size: 22px;
    }
    
    .mobile-brand-name {
        display: block !important;
        font-size: 1.3rem;
        position: static;
    }
}