/* Header Styles */
.header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-bottom: 2px solid #00eeff;
    box-shadow: 0 4px 20px rgba(0, 238, 255, 0.15);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

/* Logo */
.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 24px;
    color: #00eeff;
    transition: all 0.3s ease;
}

.header-logo:hover {
    color: #ffffff;
    transform: scale(1.05);
}

.header-logo-icon {
    font-size: 28px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 16px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #00eeff;
    background: rgba(0, 238, 255, 0.1);
}

.nav-link.active {
    color: #00eeff;
    background: rgba(0, 238, 255, 0.15);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: #00eeff;
    border-radius: 2px;
}

/* User Menu Button */
.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px 16px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.user-menu-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(0, 238, 255, 0.5);
}

.user-menu-btn.open {
    background: rgba(0, 238, 255, 0.2);
    border-color: #00eeff;
}

.user-menu-icon {
    font-size: 18px;
}

.user-menu-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-badge {
    background: #ff4757;
    color: white;
    font-size: 12px;
    font-weight: bold;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    margin-left: auto;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
}

.user-menu-btn.open .dropdown-arrow {
    transform: rotate(180deg);
}

/* User Dropdown */
.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid #00eeff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 238, 255, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    overflow: hidden;
}

.user-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.dropdown-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #00eeff 0%, #0088ff 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.dropdown-user-details {
    flex: 1;
}

.dropdown-username {
    color: white;
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 5px;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #ffd700 0%, #ff9500 100%);
    color: #000;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.admin-icon {
    font-size: 14px;
}

/* Balance Grid */
.balance-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.balance-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
}

.balance-item.game {
    border-color: #00eeff;
    background: rgba(0, 238, 255, 0.05);
}

.balance-label {
    color: #888;
    font-size: 12px;
    margin-bottom: 5px;
}

.balance-value {
    color: white;
    font-size: 18px;
    font-weight: 600;
}

/* Dropdown Menu */
.dropdown-menu {
    padding: 10px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.dropdown-item-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dropdown-item.admin:hover {
    background: rgba(255, 215, 0, 0.1);
}

.dropdown-item.logout:hover {
    background: rgba(255, 71, 87, 0.1);
}

.dropdown-item-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.dropdown-item-content {
    flex: 1;
}

.dropdown-item-title {
    font-weight: 500;
    margin-bottom: 2px;
}

.dropdown-item-subtitle {
    font-size: 12px;
    color: #888;
}

.dropdown-item-badge {
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

.dropdown-item-badge.notifications {
    background: #ff4757;
    color: white;
}

.dropdown-item-badge.messages {
    background: #00eeff;
    color: #000;
}

.dropdown-item-arrow {
    color: #888;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 10px 0;
}

/* Auth Buttons */
.auth-buttons {
    display: flex;
    gap: 10px;
}

.btn-login,
.btn-register {
    padding: 8px 20px;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-login {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-register {
    background: linear-gradient(135deg, #00eeff 0%, #0088ff 100%);
    border: none;
    color: #000;
    font-weight: 600;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 238, 255, 0.3);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.mobile-nav.open {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #00eeff;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 20px;
}

.mobile-close {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
}

.mobile-nav-menu {
    padding: 20px;
}

.mobile-nav-link {
    display: block;
    padding: 15px 0;
    color: white;
    text-decoration: none;
    font-size: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: color 0.3s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: #00eeff;
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-user-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00eeff 0%, #0088ff 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.mobile-user-details {
    flex: 1;
}

.mobile-username {
    color: white;
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 5px;
}

.mobile-admin-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700 0%, #ff9500 100%);
    color: #000;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
}

.mobile-balance {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-balance-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px;
}

.mobile-balance-label {
    display: block;
    color: #888;
    font-size: 12px;
    margin-bottom: 5px;
}

.mobile-balance-value {
    display: block;
    color: white;
    font-size: 16px;
    font-weight: 600;
}

.mobile-user-menu {
    padding: 20px 0;
}

.mobile-user-menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-user-menu-item:hover {
    color: #00eeff;
}

.mobile-menu-icon {
    font-size: 20px;
    width: 30px;
}

.mobile-badge {
    margin-left: auto;
    background: #ff4757;
    color: white;
    font-size: 12px;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

.mobile-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 20px 0;
}

.mobile-auth-btn {
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-auth-btn.login {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.mobile-auth-btn.register {
    background: linear-gradient(135deg, #00eeff 0%, #0088ff 100%);
    border: none;
    color: #000;
    font-weight: 600;
}

/* Header Spacer */
.header-spacer {
    height: 70px;
}

/* Responsive */
@media (max-width: 992px) {
    .desktop-nav {
        gap: 15px;
    }
    
    .nav-link {
        padding: 8px 12px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .mobile-nav {
        display: block;
    }
    
    .nav-wrapper {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .header-logo-text {
        font-size: 20px;
    }
    
    .user-menu-btn {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .user-menu-name {
        max-width: 100px;
    }
    
    .mobile-auth {
        grid-template-columns: 1fr;
    }
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    min-height: 200px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #00eeff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    color: #888;
    font-size: 14px;
}