/* ============================================
   ZIRO13 - Premium Navbar System
   Modern Platform-Based Navigation
   Futuristic Dark Glassmorphism
   ============================================ */

/* Navbar Container */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky);
    padding: 1rem 2rem;
    transition: padding 300ms ease, background 300ms ease, border-color 300ms ease, backdrop-filter 300ms ease;
    background: transparent;
    isolation: isolate;
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid rgba(108, 92, 231, 0.15);
    padding: 0.75rem 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

/* Logo */
.navbar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    flex-shrink: 0;
    position: relative;
    transition: transform 0.3s ease;
}

.navbar-logo:hover {
    transform: scale(1.02);
}

.navbar-logo-img {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    object-fit: cover;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.navbar-logo:hover .navbar-logo-img {
    filter: brightness(1.1);
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    color: white;
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.3);
}

.logo-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation Menu */
.navbar-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    white-space: nowrap;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(108, 92, 231, 0.08);
}

.nav-link:hover::after {
    width: 60%;
}

.nav-link.active {
    color: var(--primary-light);
    background: rgba(108, 92, 231, 0.1);
}

.nav-link.active::after {
    width: 60%;
}

.nav-link > i:first-child {
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
    opacity: 0.8;
}

.nav-link:hover > i:first-child {
    opacity: 1;
}

.nav-arrow {
    width: 0.85rem !important;
    height: 0.85rem !important;
    opacity: 0.4;
    transition: all 0.3s ease;
}

.nav-item:hover .nav-arrow,
.nav-item.dropdown-open .nav-arrow {
    transform: rotate(180deg);
    opacity: 1;
    color: var(--primary-light);
}

/* ============================================
   PLATFORMS MEGA DROPDOWN - NEW DESIGN
   ============================================ */
.platforms-mega {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 720px;
    background: rgba(14, 14, 20, 0.95);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(108, 92, 231, 0.2);
    border-radius: var(--radius-xl);
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(108, 92, 231, 0.1);
    z-index: var(--z-dropdown);
    display: flex;
    overflow: hidden;
}

.nav-item:hover .platforms-mega,
.nav-item.dropdown-open .platforms-mega {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Left sidebar - Platform categories */
.platforms-sidebar {
    width: 200px;
    background: rgba(10, 10, 15, 0.5);
    padding: 1rem 0.5rem;
    border-right: 1px solid rgba(108, 92, 231, 0.15);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.platform-category {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s ease;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    position: relative;
}

.platform-category i,
.platform-category svg {
    width: 1.3rem;
    height: 1.3rem;
    flex-shrink: 0;
    opacity: 0.7;
    transition: all 0.25s ease;
}

.platform-category:hover {
    background: rgba(108, 92, 231, 0.1);
    color: var(--text-primary);
}

.platform-category:hover i,
.platform-category:hover svg {
    opacity: 1;
    color: var(--primary-light);
}

.platform-category.active {
    background: rgba(108, 92, 231, 0.15);
    color: var(--text-primary);
    box-shadow: inset 3px 0 0 var(--primary);
}

.platform-category.active i,
.platform-category.active svg {
    opacity: 1;
    color: var(--primary-light);
}

/* Right content - Submenu items */
.platforms-content {
    flex: 1;
    padding: 1.25rem;
    min-height: 220px;
}

.platform-submenu {
    display: none;
    animation: fadeInRight 0.3s ease;
}

.platform-submenu.active {
    display: block;
}

.platform-submenu-header {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(108, 92, 231, 0.1);
    font-weight: 600;
}

.platform-submenu-items {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.platform-submenu-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.8rem 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
    font-size: 0.875rem;
    position: relative;
    overflow: hidden;
}

.platform-submenu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 0 3px 3px 0;
    transform: scaleY(0);
    transition: transform 0.25s ease;
}

.platform-submenu-item:hover {
    background: rgba(108, 92, 231, 0.08);
    color: var(--text-primary);
    padding-left: 1.1rem;
}

.platform-submenu-item:hover::before {
    transform: scaleY(1);
}

.platform-submenu-item i,
.platform-submenu-item svg {
    width: 1.2rem;
    height: 1.2rem;
    color: var(--primary-light);
    flex-shrink: 0;
    opacity: 0.8;
    transition: all 0.25s ease;
}

.platform-submenu-item:hover i,
.platform-submenu-item:hover svg {
    opacity: 1;
    transform: scale(1.1);
}

.platform-submenu-item .item-badge {
    margin-left: auto;
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    background: rgba(108, 92, 231, 0.15);
    color: var(--primary-light);
    font-weight: 600;
}

/* Regular dropdown (Community) */
.dropdown {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 280px;
    background: rgba(14, 14, 20, 0.95);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(108, 92, 231, 0.2);
    border-radius: var(--radius-lg);
    padding: 0.75rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(108, 92, 231, 0.1);
    z-index: var(--z-dropdown);
}

.nav-item:hover .dropdown,
.nav-item.dropdown-open .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: rgba(14, 14, 20, 0.95);
    border-left: 1px solid rgba(108, 92, 231, 0.2);
    border-top: 1px solid rgba(108, 92, 231, 0.2);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
    font-size: 0.875rem;
}

.dropdown-item:hover {
    background: rgba(108, 92, 231, 0.1);
    color: var(--text-primary);
    padding-left: 1rem;
}

.dropdown-item i,
.dropdown-item svg {
    width: 1.2rem;
    height: 1.2rem;
    color: var(--primary-light);
    flex-shrink: 0;
}

/* Navbar Actions */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Language Switcher */
.lang-switcher {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(108, 92, 231, 0.15);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.lang-btn:hover {
    border-color: var(--primary);
    color: var(--text-primary);
    background: rgba(108, 92, 231, 0.08);
}

.lang-btn i {
    width: 1rem;
    height: 1rem;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 150px;
    background: rgba(14, 14, 20, 0.95);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(108, 92, 231, 0.2);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    z-index: var(--z-dropdown);
}

.lang-switcher.active .lang-dropdown {
    opacity: 1;
    visibility: visible;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    font-size: 0.85rem;
    text-align: left;
}

.lang-option:hover,
.lang-option.active {
    background: rgba(108, 92, 231, 0.1);
    color: var(--text-primary);
}

/* Auth Buttons */
.btn-login {
    padding: 0.55rem 1.25rem;
    background: transparent;
    border: 1px solid rgba(108, 92, 231, 0.25);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}

.btn-login:hover {
    border-color: var(--primary);
    color: var(--text-primary);
    background: rgba(108, 92, 231, 0.08);
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.1);
}

.nav-ticket-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.nav-ticket-link[hidden],
[data-auth-guest][hidden],
[data-auth-dashboard][hidden],
[data-auth-admin][hidden],
[data-auth-logout][hidden],
[data-ticket-badge][hidden] {
    display: none !important;
}

.nav-ticket-badge {
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--danger, #ff4757);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
}

.btn-register {
    padding: 0.55rem 1.25rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-register::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-register:hover::before {
    left: 100%;
}

.btn-register:hover {
    box-shadow: 0 0 30px rgba(108, 92, 231, 0.4);
    transform: translateY(-1px);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: calc(var(--z-sticky) + 10);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: var(--navbar-height, 70px);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    z-index: calc(var(--z-sticky) + 5);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 1rem;
}

.mobile-menu.active {
    display: block;
}

.navbar.mobile-open {
    background: rgba(10, 10, 15, 0.96);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    border-bottom: 1px solid rgba(108, 92, 231, 0.2);
}

body.mobile-menu-open {
    /* overflow dibiarkan normal - mobile-menu sudah di body langsung */
}

.mobile-nav-item {
    border-bottom: 1px solid rgba(108, 92, 231, 0.1);
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0.75rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: var(--radius-md);
}

.mobile-nav-link:hover {
    background: rgba(108, 92, 231, 0.08);
}

.mobile-nav-link i:first-child {
    width: 1.2rem;
    height: 1.2rem;
    flex-shrink: 0;
    opacity: 0.7;
}

.mobile-nav-link i:last-child {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.mobile-nav-item.open .mobile-nav-link i:last-child {
    transform: rotate(180deg);
}

/* Mobile Platform Submenu */
.mobile-platform-submenu {
    padding-left: 2rem;
    display: none;
    background: rgba(10, 10, 15, 0.5);
    border-radius: var(--radius-md);
    margin: 0.25rem 0;
}

.mobile-platform-submenu.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.mobile-sub-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border-radius: var(--radius-md);
}

.mobile-sub-link:hover {
    color: var(--text-primary);
    background: rgba(108, 92, 231, 0.08);
}

.mobile-sub-link i,
.mobile-sub-link svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

/* Mobile nested submenu (Roblox/GTA/Web subitems) */
.mobile-nested-submenu {
    padding-left: 1.5rem;
    display: none;
}

.mobile-nested-submenu.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.mobile-auth {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 0.75rem;
    margin-top: 0.5rem;
}

.mobile-auth .btn-login,
.mobile-auth .btn-register {
    flex: 1;
    text-align: center;
    padding: 0.75rem;
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .navbar-menu {
        gap: 0;
    }
    
    .nav-link {
        padding: 0.5rem 0.7rem;
        font-size: 0.8rem;
    }
    
    .platforms-mega {
        width: 600px;
    }
    
    .platforms-sidebar {
        width: 170px;
    }
}

@media (max-width: 1023px) {
    .navbar-menu {
        display: none;
    }

    .navbar-actions {
        margin-left: auto;
        gap: 0.5rem;
    }

    .navbar-actions .lang-switcher {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
        position: relative;
        z-index: calc(var(--z-sticky) + 10);
        flex-shrink: 0;
        pointer-events: auto !important;
    }

    .btn-login,
    .btn-register {
        display: none;
    }

    .mobile-auth .btn-login,
    .mobile-auth .btn-register {
        display: block;
    }

    .mobile-menu {
        z-index: calc(var(--z-sticky) + 5);
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0.75rem 1rem;
    }
    
    .navbar.scrolled {
        padding: 0.6rem 1rem;
    }
    
    .navbar-logo {
        font-size: 1.25rem;
        gap: 0.5rem;
    }
    
    .navbar-logo-img {
        width: 32px;
        height: 32px;
    }
    
    .logo-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .lang-btn span.current-lang {
        display: none;
    }
}
