/* ============================================================================
   BATTLE PASS UI - Construction Worker Progression System
   Inspired by Call of Duty Battle Pass but with construction theming
   ============================================================================ */

/* ============================================================================
   BATTLE PASS SECTION (Inside Trophy Wall Modal)
   ============================================================================ */

.battle-pass-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid rgba(0, 178, 227, 0.2);
}

/* Header */
.battle-pass-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.battle-pass-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #00B2E3, #0088B8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .battle-pass-header h3 {
    background: linear-gradient(135deg, #00D4FF, #00B2E3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.season-timer {
    font-size: 0.875rem;
    color: #F59E0B;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.season-timer::before {
    content: '🔥';
}

/* ============================================================================
   PROGRESS BAR
   ============================================================================ */

.battle-pass-progress {
    margin-bottom: 25px;
}

.level-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.875rem;
    font-weight: 600;
}

.level-info span:first-child {
    font-size: 1.125rem;
    color: var(--sb-text-primary);
}

.level-info span:last-child {
    color: var(--sb-accent-primary);
}

.progress-bar-container {
    position: relative;
    height: 32px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid rgba(0, 178, 227, 0.3);
}

[data-theme="dark"] .progress-bar-container {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 212, 255, 0.4);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00B2E3, #0088B8, #00B2E3);
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
    border-radius: 14px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: slide 2s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

@keyframes slide {
    0% { left: -100%; }
    100% { left: 200%; }
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.875rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    white-space: nowrap;
}

/* ============================================================================
   TIER TRACK (Horizontal Scrolling)
   ============================================================================ */

.battle-pass-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 20px 10px;
    margin: 0 -10px 30px -10px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar but keep functionality */
.battle-pass-track::-webkit-scrollbar {
    height: 6px;
}

.battle-pass-track::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.battle-pass-track::-webkit-scrollbar-thumb {
    background: rgba(0, 178, 227, 0.3);
    border-radius: 3px;
}

.battle-pass-track::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 178, 227, 0.5);
}

/* ============================================================================
   TIER BUBBLES
   ============================================================================ */

.tier {
    flex-shrink: 0;
    width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
    position: relative;
}

.tier:hover {
    transform: translateY(-4px);
}

.tier-icon-container {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    position: relative;
    border: 3px solid transparent;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

[data-theme="dark"] .tier-icon-container {
    background: rgba(0, 0, 0, 0.2);
}

.tier-icon {
    font-size: 2.5rem;
    filter: grayscale(1) opacity(0.4);
    transition: filter 0.3s ease;
}

.tier-number {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.tier-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    color: var(--sb-text-secondary);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Unlocked State */
.tier.unlocked .tier-icon-container {
    background: linear-gradient(135deg, rgba(0, 178, 227, 0.2), rgba(0, 136, 184, 0.2));
    border-color: rgba(0, 178, 227, 0.5);
}

.tier.unlocked .tier-icon {
    filter: none;
}

.tier.unlocked .tier-label {
    color: var(--sb-text-primary);
}

/* Current Tier (Glowing) */
.tier.current .tier-icon-container {
    background: linear-gradient(135deg, #00B2E3, #0088B8);
    border-color: #00D4FF;
    box-shadow: 0 0 20px rgba(0, 178, 227, 0.6),
                0 0 40px rgba(0, 178, 227, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

.tier.current .tier-icon {
    filter: none;
    animation: bounce 1s ease-in-out infinite;
}

.tier.current .tier-label {
    color: #00D4FF;
    font-weight: 700;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 178, 227, 0.6),
                    0 0 40px rgba(0, 178, 227, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 178, 227, 0.8),
                    0 0 60px rgba(0, 178, 227, 0.5);
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* Locked State */
.tier.locked .tier-icon-container {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .tier.locked .tier-icon-container {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.05);
}

.tier.locked .tier-icon::before {
    content: '🔒';
    font-size: 1.5rem;
}

/* Milestone Tiers (Every 5 or 10 tiers) */
.tier.milestone .tier-icon-container {
    width: 90px;
    height: 90px;
    border-width: 4px;
}

.tier.milestone.unlocked .tier-icon-container {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    border-color: #FCD34D;
}

.tier.milestone.current .tier-icon-container {
    animation: milestone-pulse 1.5s ease-in-out infinite;
}

@keyframes milestone-pulse {
    0%, 100% {
        box-shadow: 0 0 25px rgba(245, 158, 11, 0.8),
                    0 0 50px rgba(245, 158, 11, 0.4);
    }
    50% {
        box-shadow: 0 0 35px rgba(245, 158, 11, 1),
                    0 0 70px rgba(245, 158, 11, 0.6);
    }
}

/* Legendary Tier 50 */
.tier.legendary .tier-icon-container {
    width: 100px;
    height: 100px;
    border-width: 5px;
}

.tier.legendary.unlocked .tier-icon-container {
    background: linear-gradient(135deg, #8B5CF6, #7C3AED, #6D28D9);
    border-color: #A78BFA;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.8),
                0 0 60px rgba(139, 92, 246, 0.4);
}

.tier.legendary.current .tier-icon-container {
    animation: legendary-pulse 1s ease-in-out infinite;
}

@keyframes legendary-pulse {
    0%, 100% {
        box-shadow: 0 0 40px rgba(139, 92, 246, 1),
                    0 0 80px rgba(139, 92, 246, 0.6);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 50px rgba(139, 92, 246, 1),
                    0 0 100px rgba(139, 92, 246, 0.8);
        transform: scale(1.05);
    }
}

/* ============================================================================
   WEEKLY CHALLENGES
   ============================================================================ */

.battle-pass-challenges {
    margin-top: 30px;
}

.battle-pass-challenges h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--sb-text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.battle-pass-challenges h4::before {
    content: '🎯';
}

.challenge {
    background: rgba(0, 178, 227, 0.05);
    border: 2px solid rgba(0, 178, 227, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.challenge:hover {
    border-color: rgba(0, 178, 227, 0.4);
    background: rgba(0, 178, 227, 0.08);
}

[data-theme="dark"] .challenge {
    background: rgba(0, 212, 255, 0.05);
    border-color: rgba(0, 212, 255, 0.2);
}

[data-theme="dark"] .challenge:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
}

.challenge.completed {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}

.challenge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.challenge-text {
    font-weight: 600;
    color: var(--sb-text-primary);
}

.challenge-reward {
    color: #F59E0B;
    font-weight: 700;
    font-size: 0.875rem;
}

.challenge-progress-bar {
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

[data-theme="dark"] .challenge-progress-bar {
    background: rgba(255, 255, 255, 0.1);
}

.challenge-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00B2E3, #0088B8);
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.challenge.completed .challenge-progress-fill {
    background: linear-gradient(90deg, #10B981, #059669);
}

.challenge-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--sb-text-secondary);
    margin-top: 8px;
}

.challenge.completed .challenge-status {
    color: #10B981;
    font-weight: 600;
}

/* ============================================================================
   TIER UNLOCK MODAL
   ============================================================================ */

.tier-unlock-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.tier-unlock-modal.show {
    opacity: 1;
}

.tier-unlock-content {
    background: white;
    border-radius: 24px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .tier-unlock-content {
    background: #1F2937;
}

.tier-unlock-modal.show .tier-unlock-content {
    transform: scale(1);
}

.tier-unlock-confetti {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    border-radius: 24px;
}

.tier-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #00B2E3;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.tier-reward-icon {
    font-size: 5rem;
    margin: 20px 0;
    animation: tier-unlock-icon 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes tier-unlock-icon {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.tier-reward-name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--sb-text-primary);
    margin-bottom: 12px;
}

.tier-reward-description {
    font-size: 1.125rem;
    color: var(--sb-text-secondary);
    margin-bottom: 30px;
}

.tier-unlock-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.tier-equip-btn,
.tier-continue-btn {
    padding: 12px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.tier-equip-btn {
    background: linear-gradient(135deg, #00B2E3, #0088B8);
    color: white;
}

.tier-equip-btn:hover {
    background: linear-gradient(135deg, #00D4FF, #00B2E3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 178, 227, 0.4);
}

.tier-continue-btn {
    background: rgba(0, 0, 0, 0.05);
    color: var(--sb-text-primary);
}

[data-theme="dark"] .tier-continue-btn {
    background: rgba(255, 255, 255, 0.1);
}

.tier-continue-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .tier-continue-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Milestone Modal */
.tier-unlock-modal.milestone .tier-number {
    color: #F59E0B;
}

.tier-unlock-modal.milestone .tier-reward-icon {
    filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.6));
}

/* Legendary Modal */
.tier-unlock-modal.legendary .tier-number {
    background: linear-gradient(135deg, #8B5CF6, #7C3AED);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tier-unlock-modal.legendary .tier-reward-icon {
    filter: drop-shadow(0 0 30px rgba(139, 92, 246, 0.8));
    animation: legendary-icon 1s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
}

@keyframes legendary-icon {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.1) rotate(5deg);
    }
}

/* Multiple Tiers Unlocked */
.tier-unlock-modal.multiple .tier-rewards-list {
    text-align: left;
    margin: 20px 0;
}

.tier-rewards-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tier-rewards-list li {
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(0, 178, 227, 0.05);
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: 600;
}

/* ============================================================================
   XP BOOST INDICATOR
   ============================================================================ */

.xp-boost-indicator {
    position: fixed;
    top: 80px;
    right: 20px;
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    z-index: 9998;
    animation: boost-pulse 1s ease-in-out infinite;
    display: flex;
    align-items: center;
    gap: 8px;
}

.xp-boost-indicator::before {
    content: '⚡';
    font-size: 1.5rem;
}

@keyframes boost-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
    }
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 640px) {
    .battle-pass-header h3 {
        font-size: 1.25rem;
    }

    .season-timer {
        font-size: 0.75rem;
    }

    .tier {
        width: 80px;
    }

    .tier-icon-container {
        width: 64px;
        height: 64px;
    }

    .tier-icon {
        font-size: 2rem;
    }

    .tier.milestone .tier-icon-container {
        width: 72px;
        height: 72px;
    }

    .tier.legendary .tier-icon-container {
        width: 80px;
        height: 80px;
    }

    .tier-unlock-content {
        padding: 24px;
    }

    .tier-reward-icon {
        font-size: 4rem;
    }

    .tier-reward-name {
        font-size: 1.5rem;
    }

    .tier-unlock-buttons {
        flex-direction: column;
    }

    .tier-equip-btn,
    .tier-continue-btn {
        width: 100%;
    }
}
