/* Document 6 - CSS complet copié */
/* ========================================
   WARSLIGUE — STYLES REFACTORED & POLISHED
   ======================================== */

:root {
    --primary:      #FF3366;
    --primary-dark: #CC0033;
    --secondary:    #6C5CE7;
    --accent:       #FDCB6E;
    --accent-dark:  #e6b85a;
    --dark-bg:      #1A1A2E;
    --darker-bg:    #0F0F1E;
    --card-bg:      rgba(26,26,46,0.75);
    --light-text:   #F8F9FA;
    --gray-text:    #A0A0B0;
    --glow:         0 0 20px rgba(255,51,102,0.45);
    --shadow:       0 8px 24px rgba(0,0,0,0.35);
    --hp-green:     #00e676;
    --hp-warn:      #ffb300;
    --hp-danger:    #ff1744;
}

*, *::before, *::after {
    margin: 0; padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: 'Outfit', sans-serif;
    background: var(--darker-bg);
    color: var(--light-text);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    cursor: crosshair;
}

.screen {
    position: fixed; inset: 0;
    display: none;
    opacity: 0;
    z-index: 1;
    transition: opacity .35s ease;
}
.screen.active {
    display: flex;
    opacity: 1;
}

/* ===== LOGO STYLES ===== */
.game-logo {
    width: clamp(200px, 60vw, 400px);
    height: auto;
    margin-bottom: 2.2rem;
    filter: drop-shadow(0 0 30px rgba(255, 51, 102, 0.5));
    animation: logoFloat 3s ease-in-out infinite;
}

.game-logo-auth {
    width: clamp(180px, 50vw, 300px);
    height: auto;
    margin-bottom: 1.8rem;
    filter: drop-shadow(0 0 25px rgba(255, 51, 102, 0.4));
}

.game-logo-menu {
    width: clamp(220px, 55vw, 350px);
    height: auto;
    filter: drop-shadow(0 0 35px rgba(255, 51, 102, 0.6));
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.game-title {
    font-family: 'Bungee', cursive;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: .08em;
    line-height: 1.1;
}

/* ===== LOADING ===== */
#loading-screen {
    justify-content: center;
    align-items: center;
    background: var(--darker-bg);
}
.logo-container { text-align: center; animation: fadeInUp .8s ease; }

.loading-bar-wrap {
    width: 240px; height: 6px;
    background: rgba(255,255,255,.1);
    border-radius: 3px;
    margin: 0 auto 1.2rem;
    overflow: hidden;
}
.loading-bar {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 3px;
    transition: width .3s ease;
}
.loading-text { color: var(--gray-text); font-size: 1rem; }

/* ===== AUTH ===== */
#auth-screen {
    justify-content: center;
    align-items: center;
    background: linear-gradient(150deg, var(--darker-bg) 0%, var(--dark-bg) 100%);
}

.auth-bg-particles {
    position: absolute; inset: 0;
    pointer-events: none; z-index: 0;
    background:
        radial-gradient(circle at 15% 60%, rgba(108,92,231,.12) 0%, transparent 55%),
        radial-gradient(circle at 85% 30%, rgba(255,51,102,.1) 0%, transparent 55%);
}

.auth-container {
    position: relative; z-index: 1;
    background: var(--card-bg);
    backdrop-filter: blur(14px);
    border: 1.5px solid rgba(255,51,102,.22);
    border-radius: 24px;
    padding: 2.8rem 2.2rem;
    width: 90%; max-width: 400px;
    box-shadow: var(--shadow);
    text-align: center;
}

.auth-form { display: none; }
.auth-form.active { display: block; animation: fadeIn .3s ease; }
.auth-form h2 { font-size: 1.15rem; font-weight: 600; margin-bottom: 1.3rem; color: var(--light-text); }

.input-wrap { position: relative; margin-bottom: .85rem; }
.input-wrap .input-icon {
    position: absolute; left: .95rem; top: 50%; transform: translateY(-50%);
    color: var(--gray-text); font-size: .85rem; pointer-events: none;
}
.auth-form input {
    width: 100%; padding: .9rem 1rem .9rem 2.6rem;
    background: rgba(255,255,255,.05);
    border: 1.5px solid rgba(255,255,255,.12);
    border-radius: 12px;
    color: var(--light-text); font-size: .95rem;
    font-family: 'Outfit', sans-serif;
    transition: border-color .25s, box-shadow .25s;
}
.auth-form input::placeholder { color: var(--gray-text); }
.auth-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,51,102,.15);
}

.auth-switch { text-align: center; margin-top: 1.3rem; color: var(--gray-text); font-size: .9rem; }
.auth-switch span { color: var(--primary); cursor: pointer; font-weight: 600; }
.auth-switch span:hover { color: var(--accent); }

.error-message {
    margin-top: 1rem; padding: .8rem 1rem;
    background: rgba(255,30,30,.12);
    border: 1px solid rgba(255,30,30,.35);
    border-radius: 10px;
    color: #ff6b6b; font-size: .88rem;
    display: none;
}
.error-message.show { display: block; animation: shake .45s ease; }

/* ===== BUTTONS ===== */
button { font-family: 'Outfit', sans-serif; cursor: pointer; border: none; transition: all .25s ease; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; padding: .95rem 2rem; border-radius: 14px;
    font-size: 1.05rem; font-weight: 700;
    box-shadow: var(--shadow);
    position: relative; overflow: hidden;
}
.btn-primary::after {
    content:''; position:absolute; top:0; left:-100%; width:100%; height:100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
    transition: left .5s ease;
}
.btn-primary:hover::after { left:100%; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(255,51,102,.4); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    background: rgba(255,255,255,.08); color: var(--light-text);
    padding: .7rem 1.4rem; border-radius: 12px;
    font-size: .95rem; font-weight: 600;
    border: 1.5px solid rgba(255,255,255,.18);
}
.btn-secondary:hover { background: rgba(255,255,255,.14); border-color: var(--primary); }

.btn-large { padding: 1.3rem 2rem; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; gap: .8rem; }
.btn-icon { font-size: 1.6rem; }

/* ===== MAIN MENU ===== */
#main-menu {
    flex-direction: column;
    background: linear-gradient(150deg, var(--darker-bg) 0%, var(--dark-bg) 100%);
    overflow-y: auto;
    padding-bottom: 110px; /* espace pour le bouton jouer en bas */
}
.menu-bg-anim {
    position: absolute; inset: 0; pointer-events: none; z-index: 0;

.bottom-play-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 15;
    pointer-events: none;
}

.bottom-play-btn {
    pointer-events: all;
    width: min(560px, 94%);
    border-radius: 16px;
    padding: 1rem 1.3rem;
    font-size: 1.15rem;
}
    background:
        radial-gradient(ellipse at 20% 70%, rgba(108,92,231,.1) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(255,51,102,.08) 0%, transparent 60%);
}

.menu-header {
    position: relative; z-index: 1;
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.2rem 1.4rem;
}
.player-info { display: flex; align-items: center; gap: .9rem; }
.player-avatar {
    width: 50px; height: 50px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: 2.5px solid var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; font-weight: 800; box-shadow: var(--glow);
}
.player-stats h3 { font-size: 1.05rem; font-weight: 700; }
.stats-row { display: flex; gap: 1rem; margin-top: .3rem; }
.trophies, .gold, .league, .power-points { display: flex; align-items: center; gap: .35rem; color: var(--accent); font-weight: 700; font-size: .95rem; }

.menu-content {
    position: relative; z-index: 1;
    flex: 1; display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    gap: 1.4rem; padding: 0 1.4rem 2rem;
}
.menu-subtitle { color: var(--gray-text); font-size: .95rem; margin-top: -.6rem; }

/* ===== BRAWLERS SELECTION (BRAWL STARS STYLE) ===== */
.character-preview {
    width: 100%;
    max-width: 500px;
    margin: 1.5rem 0;
}

.preview-card {
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.15), rgba(108, 92, 231, 0.15));
    border: 3px solid var(--primary);
    border-radius: 24px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    box-shadow: 0 0 40px rgba(255, 51, 102, 0.3),
                0 8px 32px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    animation: previewPulse 3s ease-in-out infinite;
}

.preview-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 51, 102, 0.1) 0%, transparent 70%);
    animation: rotate 10s linear infinite;
}

.preview-icon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    border: 4px solid rgba(255, 255, 255, 0.5);
    position: relative;
    z-index: 1;
    transition: all 0.4s ease;
    box-shadow: 0 0 40px currentColor;
    flex-shrink: 0;
}

.preview-card:hover .preview-icon {
    transform: scale(1.1) rotate(5deg);
}

.preview-info {
    flex: 1;
    position: relative;
    z-index: 1;
}

.preview-name {
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--light-text), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.preview-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    min-width: 70px;
}

.stat-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent);
}

/* ===== SIDE PANEL (CHARACTER SELECTION) ===== */
.side-panel {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.side-panel.active {
    display: flex;
    opacity: 1;
}

.panel-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.panel-content {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 90%;
    max-width: 500px;
    background: linear-gradient(135deg, var(--darker-bg), var(--dark-bg));
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.side-panel.active .panel-content {
    transform: translateX(0);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid rgba(255, 51, 102, 0.3);
    background: rgba(255, 51, 102, 0.05);
}

.panel-title {
    font-family: 'Bungee', cursive;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--light-text);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-close:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: rotate(90deg);
}

.brawlers-container-panel {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.brawlers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 1rem;
}

.brawler-card {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 1rem 0.8rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.brawler-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.1), rgba(108, 92, 231, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 14px;
}

.brawler-card:hover::before {
    opacity: 1;
}

.brawler-card:hover {
    transform: translateY(-4px) scale(1.05);
    border-color: rgba(255, 51, 102, 0.5);
    box-shadow: 0 8px 20px rgba(255, 51, 102, 0.3);
}

.brawler-card.selected {
    border-color: var(--primary);
    background: rgba(255, 51, 102, 0.2);
    box-shadow: 0 0 20px rgba(255, 51, 102, 0.6),
                0 0 40px rgba(255, 51, 102, 0.3);
    transform: scale(1.05);
}

.brawler-card.selected::after {
    content: '✓';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 900;
    color: white;
    box-shadow: 0 0 15px rgba(255, 51, 102, 0.8);
    animation: checkPop 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.brawler-card.selected::before {
    opacity: 1;
}

.brawler-card.locked {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(1);
}

.brawler-card.locked:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: none;
}

.brawler-card-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.brawler-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

.brawler-card:hover .brawler-icon {
    transform: scale(1.1);
}

.brawler-card.selected .brawler-icon {
    transform: scale(1.15);
    border-color: rgba(255, 255, 255, 0.6);
}

.brawler-name {
    font-weight: 800;
    font-size: 0.8rem;
    text-align: center;
    color: var(--light-text);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.brawler-lock {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 1.2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.brawler-rarity {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.55rem;
    font-weight: 800;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.rarity-common {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
}

.rarity-rare {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.rarity-epic {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
}

.rarity-legendary {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    color: #2c3e50;
}

.menu-buttons { display: flex; flex-direction: column; gap: .75rem; width: 100%; max-width: 340px; }

.mode-play-row {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: .75rem;
    width: 100%;
}

.mode-play-row .btn-large {
    flex: 0 1 48%;
    min-width: 130px;
    max-width: 220px;
}

@media (max-width: 860px) {
    .mode-play-row {
        flex-direction: column;
        align-items: stretch;
    }
    .mode-play-row .btn-large {
        flex: 1 1 auto;
        max-width: none;
    }
}

/* ========================================
   CHESTS SCREEN & REWARD MODAL
   ======================================== */
#chests-screen {
    flex-direction: column;
    background: linear-gradient(150deg, var(--darker-bg), var(--dark-bg));
    padding: 1rem;
}

.chests-container {
    width: 100%;
    max-width: 950px;
    height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
}

.chests-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}

.player-coins {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.7rem 1.3rem;
    border-radius: 12px;
    border: 1.5px solid rgba(253, 203, 110, 0.35);
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--accent);
    box-shadow: 0 0 15px rgba(253, 203, 110, 0.15);
}

.coin-icon {
    font-size: 1.4rem;
    filter: drop-shadow(0 0 5px rgba(253, 203, 110, 0.5));
}

.screen-title {
    font-family: 'Bungee', cursive;
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.chests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
}

.shop-item {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.shop-item::before {

    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255, 51, 102, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.shop-item:hover::before {
    opacity: 1;
}

.shop-item:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.shop-item.locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.shop-item.locked:hover {
    transform: none;
}

.shop-item-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: chestFloat 3s ease-in-out infinite;
}

@keyframes chestFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.shop-item-name {
    font-size: 1.3rem;
    font-weight: 900;
    margin-bottom: 0.8rem;
    color: var(--light-text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.shop-item-desc {
    font-size: 0.85rem;
    color: var(--gray-text);
    line-height: 1.6;
    margin-bottom: 1rem;
    min-height: 4rem;
}

.shop-item-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: rgba(253, 203, 110, 0.15);
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    font-weight: 900;
    font-size: 1.4rem;
    color: var(--accent);
    margin-bottom: 1rem;
    border: 2px solid rgba(253, 203, 110, 0.3);
}

.shop-item-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.25s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.shop-item-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 51, 102, 0.5);
}

.shop-item-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: var(--gray-text);
    cursor: not-allowed;
    transform: none;
}

.chests-close-btn {
    margin-top: 1.5rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* REWARD MODAL */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.modal-content {
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, var(--darker-bg), var(--dark-bg));
    border: 3px solid rgba(255, 51, 102, 0.4);
    border-radius: 28px;
    padding: 3rem 2.5rem;
    min-width: 350px;
    max-width: 500px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.7);
}

.reward-reveal {
    text-align: center;
}

.chest-opening-anim {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.chest-icon {
    font-size: 10rem;
    filter: drop-shadow(0 0 40px rgba(255, 51, 102, 0.8));
    animation: chestShake 0.8s ease-in-out infinite;
}

@keyframes chestShake {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25% { transform: translateX(-12px) rotate(-8deg); }
    75% { transform: translateX(12px) rotate(8deg); }
}

.reward-result {
    animation: fadeInScale 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

@keyframes fadeInScale {
    0% { opacity: 0; transform: scale(0.3); }
    100% { opacity: 1; transform: scale(1); }
}

.reward-title {
    font-family: 'Bungee', cursive;
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2.5rem;
    animation: titlePulse 2s ease-in-out infinite;
}

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

.reward-item {
    margin-bottom: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    border: 3px solid rgba(255, 51, 102, 0.3);
    position: relative;
    overflow: hidden;
}

.reward-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 51, 102, 0.15) 0%, transparent 70%);
    animation: rotate 8s linear infinite;
}

.reward-rarity-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.reward-icon {
    width: 140px;
    height: 140px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    border: 5px solid rgba(255, 255, 255, 0.4);
    position: relative;
    z-index: 1;
    animation: iconBounce 1.2s ease-in-out infinite;
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.reward-name {
    font-size: 2rem;
    font-weight: 900;
    color: var(--light-text);
    margin-bottom: 0.8rem;
    position: relative;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.reward-status {
    font-size: 1.3rem;
    font-weight: 900;
    color: #2ECC71;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    z-index: 1;
    animation: statusGlow 1.5s ease-in-out infinite;
}

@keyframes statusGlow {
    0%, 100% { text-shadow: 0 0 15px rgba(46, 204, 113, 0.6); }
    50% { text-shadow: 0 0 30px rgba(46, 204, 113, 1); }
}

.reward-gold {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--accent);
    margin-bottom: 2rem;
    padding: 1.2rem;
    background: rgba(253, 203, 110, 0.15);
    border-radius: 14px;
    border: 3px solid rgba(253, 203, 110, 0.4);
    text-shadow: 0 0 10px rgba(253, 203, 110, 0.5);
}

#claim-reward-btn {
    width: 100%;
    padding: 1.4rem;
    font-size: 1.3rem;
}

/* ===== MATCHMAKING ===== */
#matchmaking-screen {
    justify-content: center; align-items: center;
    background: linear-gradient(150deg, var(--darker-bg), var(--dark-bg));
}
.matchmaking-container { text-align: center; }
.matchmaking-container h2 { font-size: 1.7rem; margin-bottom: 2rem; }

.matchmaking-animation { position: relative; width: 160px; height: 160px; margin: 0 auto 1.8rem; }
.pulse-ring {
    position: absolute; inset: 0;
    border-radius: 50%;
    border: 2px solid var(--primary);
    animation: pulseRing 2s ease-out infinite;
}
.pulse-ring.delay-1 { animation-delay: .6s; }
.pulse-ring.delay-2 { animation-delay: 1.2s; }
.pulse-core {
    position: absolute; inset: 25%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; box-shadow: var(--glow);
}

.matchmaking-text { color: var(--gray-text); font-size: 1.05rem; margin-bottom: .3rem; }
.matchmaking-timer { color: var(--accent); font-weight: 700; font-size: 1rem; margin-bottom: 1.6rem; }

/* ===== GAME SCREEN ===== */
#game-screen { flex-direction: column; background: var(--darker-bg); cursor: crosshair; }

.game-hud {
    position: absolute; top: 0; left: 0; right: 0; z-index: 10;
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: .7rem;
    background: linear-gradient(180deg, rgba(0,0,0,.7) 0%, transparent 100%);
}

.hud-player, .hud-opponent {
    display: flex; flex-direction: column; gap: .25rem; min-width: 140px;
}
.hud-opponent { align-items: flex-end; }
.hud-name { font-size: .82rem; font-weight: 700; color: var(--gray-text); text-transform: uppercase; letter-spacing: .04em; }

.hp-bar {
    width: 150px; height: 18px; position: relative;
    background: rgba(0,0,0,.5); border-radius: 9px;
    border: 1.5px solid rgba(255,255,255,.15); overflow: hidden;
}
.hp-fill {
    height: 100%; width: 100%;
    background: var(--hp-green);
    border-radius: 8px;
    transition: width .25s ease, background-color .3s ease;
    box-shadow: 0 0 8px rgba(0,230,118,.4);
}
.hp-fill.warn { background: var(--hp-warn); box-shadow: 0 0 8px rgba(255,179,0,.4); }
.hp-fill.danger { background: var(--hp-danger); box-shadow: 0 0 8px rgba(255,23,68,.45); }
.hp-text {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: .7rem; font-weight: 800; color: rgba(255,255,255,.9); text-shadow: 0 1px 2px rgba(0,0,0,.6);
    pointer-events: none;
}

.cooldown-indicators { display: flex; gap: 4px; margin-top: 2px; }
.cd-bar { width: 60px; height: 4px; background: rgba(255,255,255,.1); border-radius: 2px; overflow: hidden; }
.cd-bar.cd-special { width: 60px; }
.cd-fill { width: 100%; height: 100%; background: var(--accent); border-radius: 2px; transition: width .08s linear; }
.cd-bar.cd-special .cd-fill { background: var(--secondary); }

.hud-center { display: flex; flex-direction: column; align-items: center; }
.timer-label { font-size: .68rem; text-transform: uppercase; color: var(--gray-text); letter-spacing: .1em; }
.timer { font-family: 'Bungee', cursive; font-size: 1.6rem; color: var(--accent); line-height: 1.2; }
.kill-counter {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-top: .5rem;
}
.kill-label {
    color: rgba(255,255,255,.7);
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.kill-value {
    font-family: 'Bungee', cursive;
    font-size: 1.1rem;
    color: var(--accent);
}
.timer.warning { color: var(--hp-danger); animation: timerPulse 1s ease infinite; }

#game-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }

.key-hints {
    position: absolute; bottom: .6rem; left: 50%; transform: translateX(-50%);
    z-index: 5; font-size: .72rem; color: rgba(255,255,255,.4);
    display: flex; align-items: center; gap: .3rem;
}
.key-hints .key {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 5px;
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
    font-weight: 700; font-size: .73rem; color: rgba(255,255,255,.7);
}

/* ===== MOBILE CONTROLS ===== */
.mobile-controls {
    position: absolute; bottom: 1rem; left: 0; right: 0;
    display: none;
    justify-content: space-between; align-items: flex-end;
    padding: 0 1.2rem; z-index: 10;
}
.mobile-controls.visible { display: flex; }

.joystick-zone { width: 130px; height: 130px; position: relative; }
.joystick-base {
    width: 130px; height: 130px; border-radius: 50%;
    background: rgba(255,255,255,.07);
    border: 2.5px solid rgba(255,255,255,.18);
    position: relative;
}
.joystick-knob {
    width: 52px; height: 52px; border-radius: 50%;
    background: linear-gradient(145deg, var(--primary), var(--primary-dark));
    box-shadow: var(--glow), 0 4px 12px rgba(0,0,0,.4);
    position: absolute;
    top: 50%; left: 50%; transform: translate(-50%,-50%);
    transition: box-shadow .15s;
}

.action-btns { display: flex; gap: .7rem; align-items: flex-end; }
.btn-action {
    width: 72px; height: 72px; border-radius: 50%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    font-size: 1.6rem; line-height: 1; gap: 2px;
    box-shadow: var(--shadow); border: none;
    transition: transform .1s, filter .15s;
}
.btn-action:active { transform: scale(.88); filter: brightness(.85); }
.btn-action .btn-label { font-size: .6rem; font-weight: 700; color: rgba(255,255,255,.85); }
.btn-atk { background: linear-gradient(145deg, var(--accent), #e6a000); }
.btn-spe { background: linear-gradient(145deg, var(--secondary), #4834df); }
.btn-action.cooldown { filter: brightness(.45); pointer-events: none; }

/* ===== RESULT SCREEN ===== */
#result-screen {
    justify-content: center; align-items: center;
    background: linear-gradient(150deg, var(--darker-bg), var(--dark-bg));
}
.result-particles { position:absolute; inset:0; pointer-events:none; z-index:0; }
.result-container {
    position: relative; z-index: 1;
    background: var(--card-bg); backdrop-filter: blur(14px);
    border: 1.5px solid rgba(255,51,102,.25);
    border-radius: 24px; padding: 2.8rem 2.4rem;
    text-align: center; box-shadow: var(--shadow);
    min-width: 280px;
}
.result-title { font-family: 'Bungee', cursive; font-size: clamp(2rem,7vw,2.8rem); margin-bottom: 1.6rem; }
.result-title.victory { background: linear-gradient(135deg,#ffd700,#ff9800); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.result-title.defeat { background: linear-gradient(135deg,#ff6b6b,#ee5a6f); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }

.result-stats { margin: 1.4rem 0; }
.stat-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: .75rem 1rem; margin: .4rem 0;
    background: rgba(255,255,255,.05); border-radius: 10px;
}
.stat-label { color: var(--gray-text); font-size: .95rem; }
.stat-value { font-weight: 700; font-size: 1.1rem; }
.trophy-change, .gold-change { color: var(--accent); }
.trophy-change.negative { color: var(--hp-danger); }

/* ===== LEADERBOARD ===== */
#leaderboard-screen {
    flex-direction: column; align-items: center;
    background: linear-gradient(150deg, var(--darker-bg), var(--dark-bg));
    padding: 1.5rem;
}
.leaderboard-container { width:100%; max-width:460px; display:flex; flex-direction:column; height:100%; }
.leaderboard-tabs {
    display: flex;
    gap: 0.5rem;
    margin: 0.5rem 0 0.8rem;
}
.lb-tab {
    flex: 1;
    padding: 0.6rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.85);
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}
.lb-tab.active {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.45);
}
.lb-tab:hover { background: rgba(255,255,255,0.1); }

.leaderboard-list { flex:1; overflow-y:auto; padding:.5rem; gap:.4rem; display:flex; flex-direction:column; }
.leaderboard-item {
    display: flex; align-items: center; gap: .7rem;
    padding: .75rem .9rem;
    background: rgba(255,255,255,.05); border-radius: 12px;
    transition: background .2s, transform .2s;
}
.leaderboard-item:hover { background: rgba(255,255,255,.1); transform: translateX(4px); }
.leaderboard-item.is-me { background: rgba(255,51,102,.15); border: 1px solid rgba(255,51,102,.3); }

.lb-rank { font-size: 1.2rem; font-weight: 800; width: 30px; text-align: center; }
.lb-rank.gold   { color: #ffd700; }
.lb-rank.silver { color: #c0c0c0; }
.lb-rank.bronze { color: #cd7f32; }

.lb-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex; align-items:center; justify-content:center;
    font-weight: 800; font-size: .88rem;
}
.lb-name { flex:1; font-weight: 600; font-size: .92rem; }
.lb-see-profile {
    font-size: 0.72rem;
    color: var(--gray-text);
    margin-right: 0.7rem;
    white-space: nowrap;
}
.lb-trophies { color: var(--accent); font-weight: 700; font-size: .92rem; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,51,102,.4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes fadeInUp { from { opacity:0; transform:translateY(24px); } to { opacity:1; transform:translateY(0); } }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-8px)} 75%{transform:translateX(8px)} }
@keyframes pulseRing { 0% { transform:scale(.6); opacity:1; } 100% { transform:scale(1.8); opacity:0; } }
@keyframes timerPulse { 0%,100%{opacity:1} 50%{opacity:.45} }
@keyframes previewPulse {
    0%, 100% { box-shadow: 0 0 40px rgba(255, 51, 102, 0.3), 0 8px 32px rgba(0, 0, 0, 0.4); }
    50% { box-shadow: 0 0 60px rgba(255, 51, 102, 0.5), 0 8px 32px rgba(0, 0, 0, 0.4); }
}
@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes checkPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .game-logo {
        width: clamp(160px, 50vw, 280px);
    }
    
    .game-logo-auth {
        width: clamp(140px, 45vw, 240px);
    }
    
    .game-logo-menu {
        width: clamp(180px, 48vw, 280px);
    }
    
    .hp-bar { width: 120px !important; height: 16px !important; }
    .timer { font-size: 1.3rem !important; }
    .key-hints { display: none; }
    .hud-name { font-size: .74rem; }
    
    .chests-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }
    
    .shop-item {
        padding: 1.2rem 1rem;
    }
    
    .shop-item-icon {
        font-size: 4rem;
    }
    
    .chests-header {
        flex-direction: column;
        gap: 0.8rem;
        text-align: center;
    }
    
    .brawlers-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 0.8rem;
    }
    
    .brawler-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .brawler-name {
        font-size: 0.7rem;
    }
    
    .preview-card {
        flex-direction: column;
        padding: 1.5rem;
        gap: 1rem;
    }
    
    .preview-icon {
        width: 100px;
        height: 100px;
        font-size: 3.5rem;
    }
    
    .preview-name {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .preview-stats {
        justify-content: center;
    }
    
    .panel-content {
        width: 95%;
        max-width: none;
    }
    
    .reward-icon {
        width: 100px;
        height: 100px;
        font-size: 4rem;
    }
    
    .reward-title {
        font-size: 2rem;
    }
    
    .modal-content {
        padding: 2rem 1.5rem;
        min-width: 300px;
    }
}

/* ===== ONLINE COUNTER & HEADER RIGHT ===== */
.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.online-counter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.6rem 1rem;
    border-radius: 12px;
    border: 1.5px solid rgba(0, 230, 118, 0.3);
    font-weight: 700;
    font-size: 0.95rem;
}

.online-dot {
    width: 10px;
    height: 10px;
    background: var(--hp-green);
    border-radius: 50%;
    animation: dotPulse 2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.8);
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}

#online-count {
    color: var(--hp-green);
    font-weight: 900;
    font-size: 1.1rem;
}

.online-label {
    color: var(--gray-text);
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-icon-header {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    color: var(--light-text);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon-header:hover {
    background: rgba(255, 51, 102, 0.15);
    border-color: var(--primary);
    transform: rotate(90deg);
}

/* ===== SETTINGS PANEL ===== */
.settings-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.settings-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--light-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    margin-bottom: 0.8rem;
    transition: all 0.3s ease;
}

.setting-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 51, 102, 0.3);
}

.setting-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.setting-label {
    font-weight: 700;
    font-size: 1rem;
    color: var(--light-text);
}

.setting-desc {
    font-size: 0.85rem;
    color: var(--gray-text);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 30px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.15);
    transition: 0.3s;
    border-radius: 30px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: var(--primary);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* Info Items */
.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 0.6rem;
}

.info-label {
    font-size: 0.95rem;
    color: var(--gray-text);
    font-weight: 600;
}

.info-value {
    font-size: 0.95rem;
    color: var(--light-text);
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

/* Logout Button */
.btn-logout {
    width: 100%;
    padding: 1.3rem;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.3);
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 107, 107, 0.5);
}

.btn-logout:active {
    transform: translateY(0);
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 600px) {
    .menu-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .online-counter {
        flex: 1;
        justify-content: center;
    }
    
    .settings-container {
        padding: 1rem;
    }
    
    .setting-item {
        padding: 1rem;
    }
    
    .setting-label {
        font-size: 0.9rem;
    }
    
    .setting-desc {
        font-size: 0.8rem;
    }
}

/* =============================================
   MODE SELECTION SCREEN
   ============================================= */
#mode-selection-screen {
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0F0F1E 0%, #1A1A2E 100%);
}

.mode-selection-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    max-width: 600px;
}

.mode-selection-header {
    text-align: center;
}

.mode-logo {
    height: 80px;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(255, 51, 102, 0.6));
}

.mode-selection-header h2 {
    font-size: 2rem;
    color: var(--light-text);
    font-weight: 800;
    text-shadow: 0 0 20px rgba(255, 51, 102, 0.3);
}

.mode-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
}

.mode-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    border: 2px solid rgba(255, 51, 102, 0.3);
    border-radius: 16px;
    background: rgba(26, 26, 46, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.mode-card:hover {
    border-color: var(--primary);
    background: rgba(26, 26, 46, 0.95);
    transform: translateY(-4px);
    box-shadow: var(--glow);
}

.mode-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.mode-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--light-text);
}

.mode-card p {
    color: var(--gray-text);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.mode-rewards {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.reward-item {
    background: rgba(255, 51, 102, 0.1);
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--accent);
}

#cancel-mode-selection {
    margin-top: 1rem;
    min-width: 200px;
}

/* ========================================
   POWER POINTS & UPGRADES
   ======================================== */

/* Power Points in player header */
.power-points {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.power-icon {
    font-size: 1.3rem;
}

/* Chests screen currencies */
.chests-currencies {
    display: flex;
    gap: 20px;
    align-items: center;
}

.player-powerpoints {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #FFD700;
}

/* Upgrades Panel */
#upgrades-panel {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
}

#upgrades-panel.active {
    display: flex;
    pointer-events: auto;
}

#upgrades-panel .panel-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1;
}

#upgrades-panel .panel-content {
    position: fixed;
    right: -100%;
    top: 0;
    width: 100%;
    max-width: 500px;
    height: 100%;
    background: linear-gradient(135deg, var(--dark-bg), var(--darker-bg));
    border-left: 2px solid var(--primary);
    overflow-y: auto;
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: var(--shadow);
    z-index: 2;
}

#upgrades-panel.active .panel-content {
    right: 0;
}

/* Upgrades info section */
.upgrades-info {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 51, 102, 0.2);
    background: rgba(255, 51, 102, 0.05);
}

.upgrade-current-char {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.1rem;
}

/* Upgrades container */
.upgrades-container {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.upgrade-section {
    background: rgba(100, 100, 150, 0.1);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid var(--secondary);
}

.upgrade-stat-title {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--accent);
    font-weight: 700;
}

.upgrade-levels {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.upgrade-card {
    background: rgba(50, 50, 100, 0.3);
    border: 2px solid #666;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.3s ease;
    cursor: not-allowed;
}

.upgrade-card.available {
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.05);
    cursor: pointer;
}

.upgrade-card.available:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    background: rgba(255, 215, 0, 0.15);
}

.upgrade-card.maxed {
    border-color: #2ECC71;
    background: rgba(46, 204, 113, 0.05);
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    #upgrades-panel .panel-content {
        max-width: 100%;
    }
    
    .power-points {
        font-size: 0.95rem;
    }
    
    .upgrade-section {
        padding: 12px;
    }
}