/* --- HÁTTÉR ÉS JÁTÉK DOBOZ (Változatlan) --- */
:root { --cw-left-default: #e74c3c; --cw-right-default: #3498db; }
#cw-battle-background { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -9999; overflow: hidden; pointer-events: none; background-color: var(--cw-right-color, var(--cw-right-default)); transition: opacity 0.5s ease-in-out; }
.cw-hidden-init { opacity: 0; visibility: hidden; }
.cw-visible { opacity: 1 !important; visibility: visible !important; }
.cw-bg-left-side { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--cw-left-color, var(--cw-left-default)); clip-path: polygon(0 0, 55% 0, 45% 40%, 55% 60%, 40% 100%, 0 100%); filter: drop-shadow(10px 0 15px rgba(0,0,0,0.3)); }
.cw-lightning-stripe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: #ffffff; opacity: 0.4; z-index: -1; clip-path: polygon(0 0, 56% 0, 46% 40%, 56% 60%, 41% 100%, 0 100%); }
.cw-bg-logo { position: absolute; width: 45vh; height: 45vh; opacity: 0.15; background-repeat: no-repeat; background-position: center; background-size: contain; top: 50%; transform: translateY(-50%); }
.cw-logo-left { left: 2%; transform: translateY(-50%) rotate(-10deg); }
.cw-logo-right { right: 2%; transform: translateY(-50%) rotate(10deg); }
@media (max-width: 768px) { .cw-bg-logo { width: 30vh; height: 30vh; opacity: 0.1; } .cw-bg-left-side { clip-path: polygon(0 0, 60% 0, 40% 100%, 0 100%); } .cw-lightning-stripe { clip-path: polygon(0 0, 61% 0, 41% 100%, 0 100%); } }

/* --- JÁTÉK DOBOZ --- */
.war-container, .cw-modal-content, .cw-winner-content { font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }
.war-container { text-align: center; padding: 25px; max-width: 600px; margin: 20px auto; background: #fff; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); position: relative; transform-origin: center center; }

.info-btn { position: absolute; top: 15px; right: 15px; width: 30px; height: 30px; background-color: #ecf0f1; color: #7f8c8d; border-radius: 50%; border: 1px solid #bdc3c7; font-family: 'Times New Roman', serif; font-weight: bold; font-style: italic; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; z-index: 10; }
.info-btn:hover { background-color: #bdc3c7; color: #2c3e50; transform: scale(1.1); }
.champ-wrapper { background-color: #f8fafc; border-radius: 12px; margin-bottom: 25px; overflow: hidden; border: 1px solid #e2e8f0; display: flex; flex-direction: column;}
.champ-header { background: #e2e8f0; color: #475569; font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; padding: 10px 0; font-weight: 700; border-bottom: 1px solid #cbd5e1; display: flex; justify-content: center; gap: 8px; }
.champ-content { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; position: relative; }
.champ-vs { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: #fff; color: #94a3b8; font-size: 11px; padding: 4px 10px; border-radius: 20px; font-weight: bold; z-index: 2; border: 1px solid #e2e8f0; }
.c-team { display: flex; flex-direction: column; align-items: center; width: 45%; }
.c-label { font-size: 12px; font-weight: bold; opacity: 0.8; margin-bottom: 4px; text-transform: uppercase; }
.c-score { font-size: 28px; font-weight: 800; line-height: 1; }
.c-left .c-label, .c-left .c-score { color: #FF5733; color: var(--cw-left-color) !important; }
.c-right .c-label, .c-right .c-score { color: #0022B8; color: var(--cw-right-color) !important; }

/* --- IDŐZÍTŐ --- */
.champ-footer { background: #e2e8f0; padding: 10px; border-top: 1px solid #cbd5e1; display: flex; flex-direction: column; gap: 4px; }
.cw-daily-timer { font-size: 14px; font-weight: 700; color: #1e293b; text-transform: uppercase; }
.cw-overall-timer { font-size: 11px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }

.personal-stats { margin-top: 20px; padding-top: 15px; border-top: 2px dashed #e2e8f0; color: #64748b; font-size: 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.my-score-number { font-size: 18px; color: #10b981; font-weight: 800; margin-left: 5px; }
.mini-fb-btn { background-color: #1877f2; color: white; border: none; padding: 8px 16px; border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: bold; display: flex; align-items: center; gap: 6px; transition: all 0.2s; box-shadow: 0 2px 5px rgba(24, 119, 242, 0.3); }
.mini-fb-btn:hover { background-color: #145dbf; transform: translateY(-2px); }
.score-board { display: flex; justify-content: space-between; font-size: 36px; font-weight: 900; margin-bottom: 15px; text-transform: uppercase; }
.team-left-text span { color: #FF5733; color: var(--cw-left-color) !important; }
.team-right-text span { color: #0022B8; color: var(--cw-right-color) !important; }
.battle-ground { display: flex; gap: 20px; align-items: stretch; }

/* --- GOMBOK --- */
.war-btn { flex: 1; padding: 25px 15px; border: none; cursor: pointer; color: white; font-weight: bold; border-radius: 16px; box-shadow: 0 8px 0 rgba(0,0,0,0.2), 0 15px 20px rgba(0,0,0,0.15); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; position: relative; overflow: hidden; transform: translateZ(0); top: 0; transition: top 0.1s, box-shadow 0.1s; }
.team-logo { width: 90px; height: 90px; object-fit: contain; filter: drop-shadow(0 5px 5px rgba(0,0,0,0.2)); transition: transform 0.2s; }
.war-btn:hover { top: -2px; box-shadow: 0 10px 0 rgba(0,0,0,0.2), 0 18px 25px rgba(0,0,0,0.15); }
.war-btn:active { top: 4px; box-shadow: 0 2px 0 rgba(0,0,0,0.2), 0 5px 10px rgba(0,0,0,0.1); transform: none !important; }
.war-btn:active .team-logo { transform: rotate(-5deg); }
.btn-left { background-color: #FF5733; background-color: var(--cw-left-color) !important; }
.btn-right { background-color: #0022B8; background-color: var(--cw-right-color) !important; }
.war-btn:disabled { background: #95a5a6 !important; cursor: not-allowed; top: 0 !important; transform: none !important; box-shadow: none !important; filter: grayscale(100%); }
.team-name-label { font-size: 20px; text-transform: uppercase; font-weight: 900; }
#status-log { margin-top: 25px; font-size: 18px; color: #1e293b; font-weight: 800; line-height: 1.5; }

/* --- MODÁLOK --- */
.cw-modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: rgba(15, 23, 42, 0.6); z-index: 999999; justify-content: center; align-items: center; backdrop-filter: blur(8px); transition: all 0.3s ease; opacity: 0; }
.cw-modal-active { display: flex !important; opacity: 1; }
.cw-modal-content { background-color: #ffffff; color: #1e293b; padding: 40px; border-radius: 24px; width: 480px; max-width: 90%; text-align: center; position: relative; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); transform: scale(0.95); transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.cw-modal-active .cw-modal-content { transform: scale(1); }
.cw-modal-content h2, .cw-modal-content h3, .cw-modal-content h4 { color: #1e293b !important; margin-top: 0; }
.cw-modal-content p, .cw-modal-content li, .cw-modal-content div { color: #334155; }
.cw-close-modal { position: absolute; top: 15px; right: 15px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: #f1f5f9; border-radius: 50%; font-size: 20px; color: #64748b; cursor: pointer; transition: all 0.3s ease; line-height: 1; padding: 0; }
.cw-close-modal:hover { background: #e2e8f0; color: #ef4444; transform: rotate(90deg); }
.cw-textarea { width: 100%; height: 90px; margin-bottom: 25px; padding: 15px; border: 2px solid #e2e8f0; border-radius: 12px; background-color: #f8fafc !important; color: #1e293b !important; resize: none; box-sizing: border-box; font-size: 15px; }
.cw-textarea:focus { outline: none; border-color: #3b82f6; background: #fff !important; }
.cw-action-buttons { display: flex; gap: 15px; justify-content: center; }
.cw-btn-copy, .cw-btn-fb-link { flex: 1; padding: 15px; border-radius: 12px; font-size: 16px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.cw-btn-copy { background: linear-gradient(135deg, #3b82f6, #2563eb); color: white; border: none; }
.cw-btn-fb-link { background-color: #eff6ff; color: #1d4ed8; border: none; text-decoration: none; }
.general-share-btn { background-color: #1877f2; color: white; border: none; padding: 15px 30px; border-radius: 50px; cursor: pointer; font-size: 16px; font-weight: bold; margin-top: 25px; transition: all 0.2s; width: 100%; max-width: 320px; box-shadow: 0 4px 15px rgba(24, 119, 242, 0.4); display: inline-flex; justify-content: center; align-items: center; gap: 10px; }
.general-share-btn:hover { background-color: #145dbf; transform: translateY(-3px); box-shadow: 0 6px 20px rgba(24, 119, 242, 0.5); }
.cw-btn-share-left { background-color: #FF5733; background-color: var(--cw-left-color) !important; color: white; border: none; padding: 10px; border-radius: 8px; cursor: pointer; width: 100%; margin-bottom: 10px; font-weight: bold;}
.cw-btn-share-right { background-color: #0022B8; background-color: var(--cw-right-color) !important; color: white; border: none; padding: 10px; border-radius: 8px; cursor: pointer; width: 100%; margin-bottom: 10px; font-weight: bold;}
.sheriff-footer { margin-top: 30px; border-top: 1px solid #eee; padding-top: 15px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #95a5a6; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.sheriff-footer svg { color: #7f8c8d; }

/* --- NYERTES MODÁL --- */
.cw-winner-modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.9); z-index: 200000; justify-content: center; align-items: center; flex-direction: column; backdrop-filter: blur(10px); margin: auto; }
.cw-winner-content { background: linear-gradient(135deg, #1e272e, #0f3460); padding: 40px; border-radius: 20px; text-align: center; box-shadow: 0 0 60px rgba(233, 69, 96, 0.6); border: 4px solid #e94560; animation: winnerPop 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55); position: relative; z-index: 200005; max-width: 90%; width: 400px; }
@keyframes winnerPop { 0% { transform: scale(0); opacity: 0; } 80% { transform: scale(1.1); } 100% { transform: scale(1); opacity: 1; } }
.winner-trophy { font-size: 80px; margin-bottom: 10px; display: block; animation: floatTrophy 3s ease-in-out infinite; }
@keyframes floatTrophy { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }
.winner-subtitle { font-size: 1.1rem; color: #aaa; text-transform: uppercase; letter-spacing: 1px; margin: 0; line-height: 1.4; }
.winner-team-name { font-size: 3.5rem; font-weight: 900; color: #fff; text-shadow: 0 0 25px #e94560; margin: 15px 0; text-transform: uppercase; line-height: 1.1; }
.winner-total-score-box { background: rgba(255,255,255,0.1); padding: 15px; border-radius: 10px; margin-top: 20px; font-size: 2.2rem; color: #ffd700; font-weight: bold; border: 1px solid #ffd700; box-shadow: 0 0 20px rgba(255, 215, 0, 0.2); }
.winner-total-label { display: block; font-size: 14px; color: #ccc; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; }
.winner-share-btn { background-color: #1877f2; color: white; border: none; padding: 12px 25px; border-radius: 50px; cursor: pointer; font-size: 15px; font-weight: bold; margin-top: 25px; transition: all 0.2s; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 4px 15px rgba(24, 119, 242, 0.4); text-decoration: none; }
.winner-share-btn:hover { background-color: #145dbf; transform: translateY(-2px); }
.cw-winner-close { position: absolute; top: 15px; right: 15px; width: 30px; height: 30px; line-height: 30px; background: rgba(255,255,255,0.2); border-radius: 50%; color: #fff; font-size: 20px; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; }
.cw-winner-close:hover { background: #e94560; transform: scale(1.1); }
#confetti-canvas { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 200001; }
@media (max-width: 768px) { .cw-modal-content { width: 90% !important; margin: 0 auto !important; } .cw-modal-content h2, .cw-modal-content h3 { font-family: 'Verdana', sans-serif !important; letter-spacing: 0.5px; } }
.cw-admin-dl-btn { position: fixed; bottom: 20px; left: 20px; z-index: 100000; background-color: rgba(0, 0, 0, 0.7); color: #fff; border: 1px solid #fff; padding: 10px 15px; border-radius: 8px; cursor: pointer; font-family: sans-serif; font-size: 14px; font-weight: bold; backdrop-filter: blur(5px); transition: all 0.3s ease; }
.cw-admin-dl-btn:hover { background-color: #fff; color: #000; transform: scale(1.05); }

/* --- ÚJ JUICE EXTRÁK --- */

/* 1. Hullám effekt a gombban */
.cw-ripple {
    position: absolute; border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    width: 100px; height: 100px; margin-top: -50px; margin-left: -50px;
    animation: rippleAnim 0.6s linear; pointer-events: none; z-index: 100;
}
@keyframes rippleAnim {
    from { transform: scale(0); opacity: 0.6; }
    to { transform: scale(4); opacity: 0; }
}

/* 2. Rázkódás (csak a gombokra/dobozra hat, ha 50+ a combo) */
.cw-shake-active { animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both infinite; }
@keyframes shake {
    10%, 90% { transform: translate3d(-2px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* 3. ÚJ RÉSZECSKÉK (Ezek a kattintás helyén jelennek meg) */

/* Sima +1 vagy x5 számláló */
.cw-combo-particle { 
    position: fixed; 
    /* color: #f1c40f;  <-- EZT KIVETTÜK, JS fogja színezni */
    font-weight: 900; font-size: 28px; 
    pointer-events: none; z-index: 99999; 
    text-shadow: 2px 2px 0 #000;
    animation: floatUpSlow 1.5s ease-out forwards; white-space: nowrap; 
}

/* Rang szöveg (pl. MEGA KATTINTÓ) */
.cw-rank-particle {
    position: fixed; 
    color: #fff; 
    /* background: #e74c3c; <-- EZT KIVETTÜK, JS fogja színezni */
    padding: 5px 10px; border-radius: 15px;
    font-weight: 800; font-size: 16px; text-transform: uppercase;
    pointer-events: none; z-index: 99999; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); border: 2px solid #fff;
    animation: floatUpVerySlow 2.5s ease-out forwards; white-space: nowrap;
}

@keyframes floatUpSlow { 
    0% { opacity: 1; transform: translateY(0) scale(1); } 
    100% { opacity: 0; transform: translateY(-80px) scale(1.5); } 
}
@keyframes floatUpVerySlow { 
    0% { opacity: 1; transform: translateY(0) scale(0.5); } 
    10% { transform: translateY(-10px) scale(1.1); }
    80% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-120px) scale(1); } 
}

/* Alap szorzó stílus */
.multiplier-display {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    transition: all 0.3s ease;
}

/* --- GOD MODE (100+ Combo) --- */
.cw-particle-god {
    position: fixed;
    font-weight: 900;
    font-size: 36px; /* Nagyobb betűméret */
    z-index: 100000;
    pointer-events: none;
    animation: floatUpSlow 1.5s ease-out forwards, godShake 0.2s infinite;
    
    /* Szivárványos színátmenet */
    background: linear-gradient(90deg, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000);
    background-size: 400%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent; /* Hogy látszódjon a háttér */
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8); /* Ragyogás */
}

/* Vibráló animáció a színeknek */
@keyframes godShake {
    0% { background-position: 0% 50%; transform: rotate(-2deg); }
    50% { background-position: 100% 50%; transform: rotate(2deg); }
    100% { background-position: 0% 50%; transform: rotate(-2deg); }
}

/* --- GOD MODE: SZIVÁRVÁNY EFFEKTEK --- */

/* Közös alap a szivárványos számoknak (szöveg stílus) */
.cw-rainbow-text {
    position: fixed; font-weight: 900; font-size: 36px; pointer-events: none; z-index: 100000;
    /* Szöveg színezése szivárványosra */
    background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8f00ff);
    background-size: 200%;
    -webkit-background-clip: text; background-clip: text; color: transparent;
    text-shadow: 0 0 5px rgba(255,255,255,0.5);
    display: flex; justify-content: center; align-items: center;
}

/* --- 201-500: SALIVATING RAINBOW (Lefelé ömlő szivárvány) --- */
.cw-puke-rainbow {
    animation: bounceText 0.5s ease-out infinite alternate; /* Kicsit ugrál a szám */
}

/* Ez maga a lefelé ömlő csík */
.cw-puke-rainbow::before {
    content: '';
    position: absolute;
    top: 50%; left: 10%; right: 10%; /* A szám szélességéhez igazodik */
    height: 0;
    z-index: -1; /* A szám mögött legyen */
    opacity: 0.9;
    
    /* A Függőleges szivárvány sávok */
    background: linear-gradient(to right, 
        #ff0000 14%, #ff7f00 28%, #ffff00 42%, #00ff00 56%, 
        #0000ff 70%, #4b0082 84%, #8f00ff 100%);
        
    border-radius: 0 0 10px 10px;
    box-shadow: 0 0 15px rgba(255,255,255,0.8);
    animation: pukeDown 1.5s ease-in forwards;
}

@keyframes pukeDown {
    0% { height: 0; opacity: 1; }
    80% { opacity: 0.8; }
    100% { height: 400px; opacity: 0; } /* Jó hosszan lenyúlik */
}
@keyframes bounceText { from { transform: translateY(0); } to { transform: translateY(-10px); } }


/* --- 501+: RAINBOW NOVA (Minden irányba robbanás) --- */
.cw-nova-rainbow {
    /* A JS fogja forgatni a megfelelő irányba (--rot változóval) */
    transform: rotate(var(--rot)); 
    animation: shootOut 1s ease-out forwards;
}

/* A kilövellő sugár (csóva) */
.cw-nova-rainbow::before {
    content: '';
    position: absolute;
    top: 50%; left: 0; width: 100%;
    height: 0; /* Kezdetben nincs hossza */
    z-index: -1;
    
    /* Ugyanaz a szivárvány textúra */
    background: linear-gradient(to right, 
        #ff0000 14%, #ff7f00 28%, #ffff00 42%, #00ff00 56%, 
        #0000ff 70%, #4b0082 84%, #8f00ff 100%);
    
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 1);
    
    /* A csóva animációja: a szám mögött megnyúlik */
    animation: laserBeam 0.6s ease-out forwards;
}

/* A szám repül, a JS adja meg a végpontot (--tx, --ty), de a forgatás miatt csak Y irányba kell tolni */
@keyframes shootOut {
    0% { opacity: 1; transform: translate(0,0) rotate(var(--rot)) scale(0.5); }
    100% { opacity: 0; transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(1.5); }
}

@keyframes laserBeam {
    0% { height: 10px; top: 20px; }
    50% { height: 250px; top: 20px; opacity: 1; } /* Hosszú csóva */
    100% { height: 50px; top: 300px; opacity: 0; } /* Elszakad és eltűnik */
}

/* --- 100-200: Csigolló lebegés javítása --- */
.cw-god-float {
    /* Ez adja a mozgást a színes szövegnek */
    animation: godFloatAnim 1.5s ease-out forwards;
}

/* Ez az animáció viszi felfelé a számot, miközben rázkódik és nő */
@keyframes godFloatAnim {
    0% { opacity: 1; transform: translateY(0) scale(1) rotate(-5deg); filter: brightness(1); }
    25% { transform: translateY(-20px) scale(1.1) rotate(5deg); filter: brightness(1.3); } /* Kicsit kifényesedik */
    50% { transform: translateY(-40px) scale(1.2) rotate(-5deg); filter: brightness(1.5); } /* Nagyon fényes */
    75% { transform: translateY(-60px) scale(1.3) rotate(5deg); filter: brightness(1.3); }
    100% { opacity: 0; transform: translateY(-100px) scale(1.5) rotate(0deg); filter: brightness(1); } 
}