/* ==========================================
   NAVBAR PREMIUM - DESIGN SYSTEM
   ========================================== */

/* Top Header Container */
.top-header {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, rgba(30, 40, 70, 0.98) 0%, rgba(20, 30, 50, 0.98) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 3px solid rgba(79, 195, 247, 0.5);
    padding: 12px 25px;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 40px rgba(79, 195, 247, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    animation: navbarGlow 4s ease-in-out infinite alternate;
}

@keyframes navbarGlow {
    0% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 30px rgba(79, 195, 247, 0.2);
    }
    100% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 50px rgba(79, 195, 247, 0.3);
    }
}

/* ==========================================
   HEADER LEFT - Logo & User Info
   ========================================== */
.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Notification System */
.notification-wrapper {
    position: relative;
}

.notification-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    max-width: 38px;
    max-height: 38px;
    background: linear-gradient(135deg, rgba(30, 40, 70, 0.9) 0%, rgba(20, 30, 50, 0.95) 100%);
    border: 2px solid rgba(79, 195, 247, 0.4);
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    padding: 0;
    flex-shrink: 0;
}

.notification-btn:hover {
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.3) 0%, rgba(33, 150, 243, 0.3) 100%);
    border-color: rgba(79, 195, 247, 0.7);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(79, 195, 247, 0.4);
}

.notification-btn.has-notifications {
    animation: bellRing 0.6s ease-in-out;
}

@keyframes bellRing {
    0%, 100% { transform: rotate(0deg); }
    10%, 30%, 50%, 70%, 90% { transform: rotate(-10deg); }
    20%, 40%, 60%, 80% { transform: rotate(10deg); }
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #f44336 0%, #c62828 100%);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid rgba(30, 40, 70, 0.98);
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.6);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Daily Rewards Button - Header */
.header-daily-rewards-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    max-width: 38px;
    max-height: 38px;
    background: linear-gradient(135deg, rgba(255, 87, 34, 0.3) 0%, rgba(230, 74, 25, 0.4) 100%);
    border: 2px solid rgba(255, 152, 0, 0.5);
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 15px rgba(255, 87, 34, 0.3);
    padding: 0;
    flex-shrink: 0;
}

.header-daily-rewards-btn:hover {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.4) 0%, rgba(255, 87, 34, 0.5) 100%);
    border-color: rgba(255, 152, 0, 0.8);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.5);
}

.streak-badge-header {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid rgba(30, 40, 70, 0.98);
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.6);
    animation: streakPulse 2s ease-in-out infinite;
}

@keyframes streakPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Player Info */
.player-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(30, 40, 70, 0.9) 0%, rgba(20, 30, 50, 0.95) 100%);
    border: 3px solid rgba(79, 195, 247, 0.4);
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.player-info:hover {
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.2) 0%, rgba(33, 150, 243, 0.2) 100%);
    border-color: rgba(79, 195, 247, 0.6);
    box-shadow: 0 6px 20px rgba(79, 195, 247, 0.3);
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 3px solid rgba(79, 195, 247, 0.5);
    object-fit: cover;
    box-shadow: 0 2px 10px rgba(79, 195, 247, 0.4);
}

.player-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.player-level-circle {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #4fc3f7 0%, #2196f3 100%);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    box-shadow: 0 2px 10px rgba(79, 195, 247, 0.4);
    transition: all 0.3s ease;
}

.player-level-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(79, 195, 247, 0.6);
}

.edit-name-btn {
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-name-btn:hover {
    background: rgba(79, 195, 247, 0.3);
    border-color: rgba(79, 195, 247, 0.5);
    transform: rotate(15deg) scale(1.1);
}

/* ==========================================
   NAVIGATION MENU - CENTER
   ========================================== */
.top-nav {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 800px;
}

.nav-menu {
    display: flex;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, rgba(30, 40, 70, 0.8) 0%, rgba(20, 30, 50, 0.9) 100%);
    border-radius: 30px;
    padding: 8px;
    border: 3px solid rgba(79, 195, 247, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.nav-item {
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(26, 42, 74, 0.9) 0%, rgba(13, 25, 41, 0.95) 100%);
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(79, 195, 247, 0.2), transparent);
    transition: left 0.6s ease;
}

.nav-item:hover::before {
    left: 100%;
}

.nav-item:hover {
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.2) 0%, rgba(33, 150, 243, 0.2) 100%);
    border-color: rgba(79, 195, 247, 0.5);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(79, 195, 247, 0.3);
}

.nav-item.active {
    background: linear-gradient(135deg, #4fc3f7 0%, #0288d1 100%);
    border-color: #4fc3f7;
    box-shadow: 0 6px 25px rgba(79, 195, 247, 0.6), 0 0 30px rgba(79, 195, 247, 0.4);
    transform: translateY(-2px) scale(1.08);
}

.nav-item.active::before {
    display: none;
}

.nav-item .icon {
    font-size: 1.3rem;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
    position: relative;
    z-index: 2;
}

/* Simple white outline icons style */
.nav-item .icon.nav-icon-simple {
    font-size: 1.5rem;
    color: #fff;
    font-weight: 100;
    text-shadow: none;
    filter: none;
    opacity: 0.9;
}

.nav-item.active .icon.nav-icon-simple {
    opacity: 1;
    color: #fff;
}

.nav-item .label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
}

/* ==========================================
   HEADER RIGHT - Currency & Controls
   ========================================== */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.currency-display {
    display: flex;
    gap: 12px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(30, 40, 70, 0.9) 0%, rgba(20, 30, 50, 0.95) 100%);
    border: 3px solid rgba(79, 195, 247, 0.4);
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.currency {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    font-weight: 800;
    font-size: 0.95rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.currency.gems {
    color: #81d4fa;
    text-shadow: 0 2px 8px rgba(79, 195, 247, 0.6);
}

.currency.gems .icon {
    font-size: 1.1rem;
    filter: drop-shadow(0 2px 6px rgba(79, 195, 247, 0.6));
}

.currency.coins {
    color: #ffd700;
    text-shadow: 0 2px 8px rgba(255, 215, 0, 0.6);
}

.currency.coins .icon {
    font-size: 1.1rem;
    filter: drop-shadow(0 2px 6px rgba(255, 215, 0, 0.6));
}

/* Volume Control */
.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(30, 40, 70, 0.9) 0%, rgba(20, 30, 50, 0.95) 100%);
    border: 3px solid rgba(79, 195, 247, 0.4);
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.header-icon-btn {
    width: 35px;
    height: 35px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-icon-btn:hover {
    background: rgba(79, 195, 247, 0.3);
    border-color: rgba(79, 195, 247, 0.5);
    transform: scale(1.1);
}

.volume-slider {
    width: 80px;
    height: 6px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 3px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #4fc3f7 0%, #0288d1 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(79, 195, 247, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #4fc3f7 0%, #0288d1 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(79, 195, 247, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Logout Button */
.logout-btn-small {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.3) 0%, rgba(198, 40, 40, 0.3) 100%);
    border: 3px solid rgba(244, 67, 54, 0.5);
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

.logout-btn-small:hover {
    background: linear-gradient(135deg, #f44336 0%, #c62828 100%);
    border-color: #f44336;
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.5);
}

/* ==========================================
   RESPONSIVE DESIGN - Always single line
   ========================================== */
@media (max-width: 1200px) {
    .top-header {
        padding: 10px 15px;
        gap: 12px;
    }
    
    .nav-item .label {
        font-size: 0.75rem;
    }
    
    .nav-item {
        padding: 8px 12px;
        gap: 5px;
    }
    
    .nav-item .icon {
        font-size: 1.1rem;
    }
    
    .nav-menu {
        gap: 6px;
        padding: 6px;
    }
    
    .header-left {
        gap: 10px;
    }
    
    .header-right {
        gap: 10px;
    }
}

@media (max-width: 992px) {
    .top-header {
        padding: 8px 12px;
        gap: 10px;
    }
    
    /* Hide labels, show only icons */
    .nav-item .label {
        display: none;
    }
    
    .nav-item {
        padding: 8px 10px;
    }
    
    .nav-item .icon {
        font-size: 1.2rem;
    }
    
    .nav-menu {
        gap: 4px;
        padding: 5px;
    }
    
    .notification-btn {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
    
    .header-daily-rewards-btn {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
    
    .player-info {
        padding: 6px 10px;
    }
    
    .avatar {
        width: 36px;
        height: 36px;
    }
    
    .player-name {
        display: none;
    }
    
    .player-level-circle {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
        border-width: 2px;
    }
    
    .edit-name-btn {
        display: none;
    }
    
    .currency-display {
        padding: 6px 10px;
        gap: 8px;
    }
    
    .currency {
        padding: 4px 8px;
        font-size: 0.85rem;
        gap: 4px;
    }
    
    .currency .icon {
        font-size: 0.95rem;
    }
    
    .volume-control {
        padding: 6px 8px;
    }
    
    .volume-slider {
        width: 50px;
    }
    
    .header-icon-btn {
        width: 30px;
        height: 30px;
        font-size: 0.95rem;
    }
    
    .logout-btn-small {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .top-header {
        padding: 6px 10px;
        gap: 8px;
    }
    
    .nav-item {
        padding: 6px 8px;
    }
    
    .nav-item .icon {
        font-size: 1.1rem;
    }
    
    .nav-menu {
        gap: 3px;
        padding: 4px;
        border-width: 2px;
    }
    
    .notification-btn {
        width: 34px;
        height: 34px;
        font-size: 1rem;
        border-width: 2px;
    }
    
    .header-daily-rewards-btn {
        width: 34px;
        height: 34px;
        font-size: 1rem;
        border-width: 2px;
    }
    
    .player-info {
        padding: 4px 8px;
        border-width: 2px;
    }
    
    .avatar {
        width: 32px;
        height: 32px;
        border-width: 2px;
    }
    
    .player-level-circle {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
        border-width: 2px;
    }
    
    .currency-display {
        padding: 4px 8px;
        gap: 6px;
        border-width: 2px;
    }
    
    .currency {
        padding: 3px 6px;
        font-size: 0.8rem;
    }
    
    .volume-control {
        display: none;
    }
    
    .logout-btn-small {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
        border-width: 2px;
    }
}

@media (max-width: 580px) {
    .top-header {
        padding: 5px 8px;
        gap: 6px;
    }
    
    .nav-item {
        padding: 5px 6px;
    }
    
    .nav-item .icon {
        font-size: 1rem;
    }
    
    .nav-menu {
        gap: 2px;
        padding: 3px;
    }
    
    .notification-btn {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .header-daily-rewards-btn {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .player-name {
        display: none;
    }
    
    .edit-name-btn {
        display: none;
    }
    
    .player-info {
        padding: 3px 6px;
    }
    
    .avatar {
        width: 28px;
        height: 28px;
    }
    
    .currency-display {
        padding: 3px 6px;
        gap: 4px;
    }
    
    .currency {
        padding: 2px 5px;
        font-size: 0.75rem;
    }
    
    .currency .icon {
        font-size: 0.85rem;
    }
    
    .logout-btn-small {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }
}
