/* ============================================
   NAVBAR STYLES - Gaming Website
   ============================================ */

:root {
    --primary-color: #6C5CE7;
    --primary-dark: #5B4BC4;
    --primary-light: #8B7EF7;
    --secondary-color: #00D9FF;
    --accent-color: #FF6B6B;
    --success-color: #00E676;
    --bg-dark: #0F0F1E;
    --bg-darker: #0A0A14;
    --bg-card: #1A1A2E;
    --text-primary: #FFFFFF;
    --text-secondary: #B8B8D4;
    --text-muted: #7C7C9A;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(108, 92, 231, 0.3);
    --navbar-height: 70px;
    --bottom-nav-height: 65px;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    padding-top: var(--navbar-height);
}

/* ============================================
   NAVBAR CONTAINER
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--navbar-height);
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-card) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    transition: all var(--transition-speed) ease;
}

.navbar.scrolled {
    height: 60px;
    box-shadow: var(--shadow-lg);
    background: rgba(10, 10, 20, 0.95);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

/* ============================================
   LOGO
   ============================================ */

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: transform var(--transition-speed) ease;
}

.navbar-logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-glow);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(108, 92, 231, 0.3);
    }

    50% {
        box-shadow: 0 0 30px rgba(108, 92, 231, 0.6);
    }
}

.logo-text .highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Logo Image */
.logo-image {
    height: 40px;
    width: auto;
    transition: transform var(--transition-speed) ease;
}

.navbar-logo:hover .logo-image {
    transform: scale(1.05);
}

.mobile-logo .logo-image {
    height: 35px;
    width: auto;
}

/* ============================================
   DESKTOP MENU
   ============================================ */

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 10px;
    transition: all var(--transition-speed) ease;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(108, 92, 231, 0.2), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(108, 92, 231, 0.15);
    transform: translateY(-2px);
}

.nav-link.active {
    color: var(--text-primary);
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.2), rgba(0, 217, 255, 0.2));
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.3);
}

.nav-link i {
    font-size: 1.1rem;
}

/* ============================================
   NAVBAR ACTIONS
   ============================================ */

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-login,
.btn-register {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 10px;
    transition: all var(--transition-speed) ease;
    border: 2px solid transparent;
}

.btn-login {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-register {
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    box-shadow: var(--shadow-glow);
}

.btn-register:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-color));
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(108, 92, 231, 0.5);
}

/* ============================================
   USER MENU
   ============================================ */

.user-menu {
    position: relative;
}

.user-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.user-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
}

.user-avatar {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.user-name {
    font-size: 0.9rem;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    min-width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-speed) ease;
}

.user-menu.active .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.dropdown-item:first-child {
    border-radius: 12px 12px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 12px 12px;
}

.dropdown-item:hover {
    background: rgba(108, 92, 231, 0.1);
    color: var(--text-primary);
}

.dropdown-item.logout {
    color: var(--accent-color);
}

.dropdown-item.logout:hover {
    background: rgba(255, 107, 107, 0.1);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

/* ============================================
   MOBILE MENU TOGGLE
   ============================================ */

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all var(--transition-speed) ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ============================================
   MOBILE MENU
   ============================================ */

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 998;
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 350px;
    height: 100%;
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: right var(--transition-speed) ease;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
}

.mobile-logo i {
    font-size: 1.75rem;
    color: var(--primary-color);
}

.mobile-menu-close {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.2s ease;
}

.mobile-menu-close:hover {
    color: var(--accent-color);
    transform: rotate(90deg);
}

.mobile-menu-content {
    padding: 1.5rem;
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(0, 217, 255, 0.1));
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.mobile-user-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.mobile-user-details h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.mobile-user-details p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.mobile-nav-links {
    list-style: none;
}

.mobile-nav-links li {
    margin-bottom: 0.5rem;
}

.mobile-nav-links a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    background: rgba(108, 92, 231, 0.15);
    color: var(--text-primary);
}

.mobile-nav-links a i {
    font-size: 1.25rem;
    width: 25px;
    text-align: center;
}

.mobile-nav-links .divider {
    height: 1px;
    background: var(--border-color);
    margin: 1rem 0;
}

.mobile-nav-links .logout-link {
    color: var(--accent-color);
}

.mobile-nav-links .logout-link:hover {
    background: rgba(255, 107, 107, 0.1);
}

/* ============================================
   BOTTOM NAVIGATION (MOBILE)
   ============================================ */

.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--bottom-nav-height);
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.4);
    z-index: 997;
    padding: 0.5rem 0;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.bottom-nav-item i {
    font-size: 1.4rem;
    transition: all 0.2s ease;
}

.bottom-nav-item.active {
    color: var(--primary-color);
}

.bottom-nav-item.active i {
    transform: scale(1.1);
}

.bottom-nav-item.topup-highlight {
    position: relative;
}

.topup-icon {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -25px;
    box-shadow: var(--shadow-glow);
    animation: pulse-topup 2s ease-in-out infinite;
}

@keyframes pulse-topup {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(108, 92, 231, 0.3);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(108, 92, 231, 0.6);
    }
}

.topup-icon i {
    font-size: 1.5rem;
    color: var(--text-primary);
}

/* Active Nav Highlight - Round Circle for Active Menu Item */
.bottom-nav-item.active {
    position: relative;
}

.bottom-nav-item.active .nav-icon-circle {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -25px;
    box-shadow: var(--shadow-glow);
    animation: pulse-topup 2s ease-in-out infinite;
}

.bottom-nav-item.active .nav-icon-circle i {
    font-size: 1.5rem;
    color: var(--text-primary);
}

/* Hide default icon when active (shown in circle instead) */
.bottom-nav-item.active>i {
    display: none;
}

/* Keep Games style as well for backward compat */
.bottom-nav-item.games-highlight {
    position: relative;
}

.games-icon {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -25px;
    box-shadow: var(--shadow-glow);
    animation: pulse-topup 2s ease-in-out infinite;
}

.games-icon i {
    font-size: 1.5rem;
    color: var(--text-primary);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .navbar-container {
        padding: 0 1.5rem;
    }

    .navbar-menu {
        gap: 0.25rem;
    }

    .nav-link {
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    body {
        padding-bottom: var(--bottom-nav-height);
    }

    .navbar-menu,
    .navbar-actions {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu-overlay {
        display: block;
    }

    .bottom-nav {
        display: flex;
    }

    .navbar-container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .navbar {
        height: 60px;
    }

    body {
        padding-top: 60px;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    .mobile-menu {
        width: 90%;
    }
}

/* Hide hamburger menu on mobile - use bottom nav instead */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: none !important;
    }
}

/* ============================================
   ACCOUNT SLIDE-UP SHEET (MOBILE)
   ============================================ */

.account-sheet-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.account-sheet-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.account-sheet {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 85vh;
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-darker) 100%);
    border-radius: 24px 24px 0 0;
    z-index: 1002;
    transform: translateY(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s ease;
    overflow: hidden;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}

.account-sheet.active {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
}

.account-sheet-handle {
    width: 40px;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    margin: 12px auto;
}

.account-sheet-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(0, 217, 255, 0.05));
}

.account-sheet-avatar {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.account-sheet-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.account-sheet-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.account-sheet-menu {
    padding: 0.5rem 0 calc(var(--bottom-nav-height) + 1rem);
    overflow-y: auto;
    max-height: calc(85vh - 120px);
}

.account-sheet-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.account-sheet-item:active {
    background: rgba(108, 92, 231, 0.15);
}

.account-sheet-item i:first-child {
    width: 40px;
    height: 40px;
    background: rgba(108, 92, 231, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.account-sheet-item span {
    flex: 1;
    font-size: 1rem;
}

.account-sheet-item i:last-child {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.account-sheet-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 1.5rem;
}

.account-sheet-item.logout {
    color: var(--accent-color);
}

.account-sheet-item.logout i:first-child {
    background: rgba(255, 107, 107, 0.1);
    color: var(--accent-color);
}

/* Show account sheet elements only on mobile */
@media (min-width: 769px) {

    .account-sheet,
    .account-sheet-overlay {
        display: none !important;
    }
}

@media (max-width: 768px) {

    .account-sheet,
    .account-sheet-overlay {
        display: block;
    }

    /* Style the account button in bottom nav */
    #accountMenuBtn {
        background: none;
        border: none;
        cursor: pointer;
    }
}