/* ============================================================
   ARÉNA MANGAN – Game stylesheet
   ============================================================ */

:root {
    --red:    #ff1a1a;
    --green:  #22ff00;
    --blue:   #0088ff;
    --cyan:   #00eeff;
    --gold:   #ffd700;
    --orange: #ffae00;
    --accent: var(--red);
    --bg:     #000;
}

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

html, body {
    width: 100%; height: 100%;
    background: var(--bg);
    font-family: 'Montserrat', sans-serif;
    color: #fff;
    overflow: hidden;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
}

button { font-family: inherit; }

#wrapper {
    width: 100vw; height: 100vh;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse at center, rgba(0,0,0,0.30) 0%, rgba(0,0,0,0.60) 100%),
        url('/assets/images/arena.png') center 25% / cover no-repeat
        var(--bg);
}

/* ── Game canvas ───────────────────────────────────────────── */
#gc {
    position: absolute;
    width: 860px; height: 580px;
    transform-origin: top left;
    background: radial-gradient(ellipse at 50% 110%, #1a0008 0%, #06000a 55%, #000 100%);
    border: 3px solid var(--accent);
    box-shadow: 0 0 60px -8px var(--accent), inset 0 0 60px rgba(0,0,0,0.6);
    cursor: crosshair;
    overflow: hidden;
    user-select: none;
    opacity: 0;
    /* Pomalý fade-in po countdown pro dramatický efekt */
    transition: border-color 0.4s, box-shadow 0.5s, opacity 1.0s ease;
}

#arena-bg {
    position: absolute; inset: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
    background-size: 44px 44px;
}
#arena-bg::before, #arena-bg::after {
    content: ''; position: absolute;
    width: 300px; height: 300px; border-radius: 50%; pointer-events: none;
}
#arena-bg::before { top: -80px; left: -80px;
    background: radial-gradient(circle, rgba(255,26,26,0.06) 0%, transparent 70%); }
#arena-bg::after  { bottom: -80px; right: -80px;
    background: radial-gradient(circle, rgba(0,136,255,0.06) 0%, transparent 70%); }

#vignette {
    position: absolute; inset: 0; pointer-events: none; z-index: 1;
    background: radial-gradient(ellipse at center, transparent 45%, rgba(0,0,0,0.65) 100%);
}

/* ── HUD ───────────────────────────────────────────────────── */
#hud {
    position: absolute; top: 0; width: 100%; height: 72px;
    display: flex; justify-content: space-around; align-items: center;
    background: rgba(0,0,0,0.88);
    border-bottom: 2px solid var(--accent);
    z-index: 10; transition: border-color 0.4s;
}
.stat { text-align: center; min-width: 120px; }
.stat-lbl {
    display: block; font-size: 10px; font-weight: 700;
    letter-spacing: 2px; text-transform: uppercase;
    color: var(--accent); margin-bottom: 2px; transition: color 0.4s;
}
.stat-val { font-size: 30px; font-weight: 900; line-height: 1; }
.stat-val.pop { animation: stat-pop 0.15s ease-out; }
@keyframes stat-pop { 50% { transform: scale(1.35); } }

#timer { font-size: 38px; font-weight: 900; transition: color 0.3s; }
#timer.danger { color: var(--red); animation: t-pulse 0.45s ease-in-out infinite; }
@keyframes t-pulse { 50% { transform: scale(1.15); } }

/* ── Combo ─────────────────────────────────────────────────── */
#combo {
    position: absolute; top: 80px; left: 50%;
    transform: translateX(-50%);
    font-weight: 900; letter-spacing: 3px; text-transform: uppercase;
    pointer-events: none; z-index: 15; opacity: 0;
    transition: opacity 0.2s;
    text-shadow: 0 0 20px currentColor;
    white-space: nowrap;
}

/* ── Targets ───────────────────────────────────────────────── */
.target {
    position: absolute; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 5;
    animation: t-spawn 0.18s cubic-bezier(0.175,0.885,0.32,1.275) forwards;
}
@keyframes t-spawn {
    from { transform: scale(0) rotate(-180deg); opacity: 0; }
    to   { transform: scale(1) rotate(0deg);    opacity: 1; }
}
@keyframes t-hit {
    0%   { transform: scale(1);   opacity: 1; }
    60%  { transform: scale(1.8); opacity: 0.4; }
    100% { transform: scale(0);   opacity: 0; }
}

.t-red    { background: radial-gradient(circle at 35% 30%, #ff5555, #b80000);
            box-shadow: 0 0 22px rgba(255,26,26,0.75), inset 0 2px 2px rgba(255,255,255,0.2);
            border: 2px solid rgba(255,100,100,0.4); }
.t-yellow { background: radial-gradient(circle at 35% 30%, #ffe555, #c09000);
            box-shadow: 0 0 22px rgba(255,215,0,0.75), inset 0 2px 2px rgba(255,255,255,0.2);
            border: 2px solid rgba(255,220,50,0.4); }
.t-blue   { background: radial-gradient(circle at 35% 30%, #55aaff, #004fcc);
            box-shadow: 0 0 22px rgba(0,136,255,0.75), inset 0 2px 2px rgba(255,255,255,0.2);
            border: 2px solid rgba(50,150,255,0.4); }
.t-cyan   { background: radial-gradient(circle at 35% 30%, #00ffee, #007788);
            box-shadow: 0 0 28px rgba(0,238,255,0.85), inset 0 2px 2px rgba(255,255,255,0.2);
            border: 2px solid rgba(0,220,240,0.5); }
.t-green  { background: radial-gradient(circle at 35% 30%, #77ff44, #009900);
            box-shadow: 0 0 24px rgba(34,255,0,0.85), inset 0 2px 2px rgba(255,255,255,0.2);
            border: 2px solid rgba(100,255,50,0.4); }

.t-ring { position: absolute; inset: -5px; border-radius: 50%; pointer-events: none; }

/* Floating score */
.fscore {
    position: absolute; font-weight: 900; font-size: 20px;
    pointer-events: none; z-index: 20;
    animation: fs-up 0.75s ease-out forwards;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}
@keyframes fs-up {
    0%   { transform: translateY(0)     scale(1.2); opacity: 1; }
    100% { transform: translateY(-64px) scale(0.7); opacity: 0; }
}

/* Particle */
.pt { position: absolute; width: 7px; height: 7px; border-radius: 50%;
      pointer-events: none; z-index: 20; }

/* Screen flash */
#flash { position: absolute; inset: 0; pointer-events: none; z-index: 50;
         opacity: 0; transition: opacity 0.07s; }

#gc.is-winner { border-color: var(--green);
                box-shadow: 0 0 90px -5px var(--green), inset 0 0 60px rgba(0,0,0,0.6); }
#gc.is-danger { animation: danger-blink 0.45s ease-in-out infinite; }
@keyframes danger-blink {
    50% { box-shadow: 0 0 90px -5px var(--red), inset 0 0 60px rgba(0,0,0,0.6); }
}

/* ── Generic overlay ──────────────────────────────────────── */
.overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.92);
    display: none; flex-direction: column;
    align-items: center; justify-content: center;
    z-index: 100; text-align: center; padding: 20px; gap: 0;
    overflow-y: auto;
}
.overlay.is-visible { display: flex; }

.ov-title {
    font-size: clamp(32px, 5vw, 46px); font-weight: 900;
    letter-spacing: 5px; text-transform: uppercase;
    text-shadow: 0 0 40px currentColor; margin-bottom: 6px; line-height: 1;
}
.ov-sub { font-size: 14px; color: #aaa; max-width: 480px;
          line-height: 1.55; margin-bottom: 14px; }

/* ── Tutorial blocks ───────────────────────────────────────── */
#tut {
    display: flex; gap: 14px; flex-wrap: wrap; justify-content: center;
    margin-bottom: 14px; background: rgba(255,255,255,0.04);
    padding: 12px 22px; border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.07);
}
.ti { display: flex; flex-direction: column; align-items: center; gap: 5px;
      font-size: 10px; color: #999; min-width: 52px; }
.ti-c { border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.ti-pts { color: #fff; font-weight: 700; font-size: 12px; }

.combo-hint {
    background: rgba(255,215,0,0.08); border: 1px solid rgba(255,215,0,0.2);
    border-radius: 8px; padding: 8px 18px; margin-bottom: 12px;
    font-size: 11px; color: #bba; line-height: 1.6; max-width: 420px;
}
.combo-hint b { color: var(--gold); }

/* ── Result area ──────────────────────────────────────────── */
.result-area { display: none; width: 100%; max-width: 380px; margin-bottom: 10px; }
.scores-row { display: flex; gap: 16px; justify-content: center; margin-bottom: 8px; }
.score-box { flex: 1; text-align: center; padding: 10px 14px;
             background: rgba(255,255,255,0.04);
             border: 1px solid rgba(255,255,255,0.09); border-radius: 8px; }
.score-box-lbl { font-size: 10px; letter-spacing: 2px; color: #666;
                 text-transform: uppercase; margin-bottom: 3px; }
.score-box-val { font-size: 30px; font-weight: 900; }
/* Hlavní výsledek "Vyhrál jsi o X b!" – dominantní */
.outcome {
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 8px;
    padding: 8px 0;
}
.res-win  {
    color: var(--green); font-weight: 900;
    text-shadow: 0 0 24px rgba(34,255,0,0.5), 0 0 8px rgba(34,255,0,0.3);
}
.res-loss {
    color: var(--red);   font-weight: 900;
    text-shadow: 0 0 24px rgba(255,26,26,0.5), 0 0 8px rgba(255,26,26,0.3);
}

/* Rank preview – výrazný box s pozicí */
#rank-preview {
    display: inline-block;
    background: rgba(255,174,0,0.08);
    border: 1px solid rgba(255,174,0,0.3);
    border-radius: 10px;
    padding: 12px 24px;
    font-size: 16px !important;
    color: #ccc !important;
    line-height: 1.6;
    margin: 6px auto 22px !important;
    max-width: 92vw;
}
#rank-preview strong {
    color: var(--gold);
    font-size: 24px;
    font-weight: 900;
    text-shadow: 0 0 14px rgba(255,174,0,0.5);
    margin-left: 6px;
}

/* ── Mini leaderboard preview ─────────────────────────────── */
.lb-mini { display: none; width: 100%; max-width: 300px;
           background: rgba(255,255,255,0.03);
           border: 1px solid rgba(255,255,255,0.09); border-radius: 10px;
           overflow: hidden; margin-bottom: 14px; }
.lb-h { font-size: 10px; letter-spacing: 2px; color: #555;
        padding: 7px 14px; text-transform: uppercase;
        background: rgba(255,255,255,0.02);
        border-bottom: 1px solid rgba(255,255,255,0.05); }
.lb-row { display: flex; justify-content: space-between; padding: 7px 14px;
          font-size: 13px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.lb-row.is-argon { color: var(--orange); font-weight: 700;
                   background: rgba(255,174,0,0.05); }
.lb-row.is-me { color: var(--green); font-weight: 700;
                background: rgba(34,255,0,0.05); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn-primary {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 16px 48px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(255,26,26,0.35), inset 0 1px 0 rgba(255,255,255,0.15);
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.btn-primary:hover {
    background: #ff3838;
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(255,26,26,0.55), inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(255,26,26,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
}
.btn-primary:disabled {
    opacity: 0.5; cursor: not-allowed;
    background: #555; box-shadow: none;
}

.btn-secondary {
    background: transparent; color: var(--gold);
    border: 1px solid rgba(255,215,0,0.4);
    padding: 9px 22px; font-family: 'Montserrat', sans-serif;
    font-size: 11px; font-weight: 700; letter-spacing: 2px;
    text-transform: uppercase; cursor: pointer; border-radius: 4px;
    transition: all 0.2s;
}
.btn-secondary:hover { background: rgba(255,215,0,0.1); }
.btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-link { background: none; border: none; color: #888; font-size: 12px;
            cursor: pointer; text-decoration: underline; padding: 6px; }
.btn-link:hover { color: #ccc; }

/* ── Form inputs ───────────────────────────────────────────── */
.form-group { width: 100%; max-width: 360px; margin-bottom: 12px; }
.form-label { display: block; font-size: 11px; letter-spacing: 2px;
              color: #888; text-transform: uppercase; font-weight: 700;
              margin-bottom: 6px; text-align: left; }
.form-input {
    width: 100%; padding: 12px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px; color: #fff;
    font-family: 'Montserrat', sans-serif; font-size: 15px;
    font-weight: 700; letter-spacing: 1px;
    transition: border-color 0.2s, background 0.2s;
}
.form-input:focus {
    outline: none; border-color: var(--accent);
    background: rgba(255,255,255,0.08);
}
.form-input::placeholder { color: #555; font-weight: 400; letter-spacing: 0; }

.form-checkbox-row {
    display: flex; align-items: flex-start; gap: 10px;
    width: 100%; max-width: 360px; margin-bottom: 16px;
    text-align: left; font-size: 11px; color: #999; line-height: 1.5;
}
.form-checkbox-row input[type="checkbox"] {
    margin-top: 2px; flex-shrink: 0;
    width: 18px; height: 18px; cursor: pointer; accent-color: var(--accent);
}
.form-checkbox-row a { color: var(--gold); text-decoration: underline; }

.form-error {
    color: var(--red); font-size: 12px; margin-top: 6px;
    min-height: 18px; text-align: left; max-width: 360px;
    width: 100%; font-weight: 700;
}
.form-success { color: var(--green); font-weight: 700; }

/* ── Intro cinematic ──────────────────────────────────────── */
/* #intro je .screen → visibility řídí JS via .is-visible */
#intro {
    z-index: 300;
    cursor: pointer; overflow: hidden;
    background: rgba(0,0,0,0.38);
    transition: opacity 1.4s ease;
}
#intro::after {
    content: ''; position: absolute; inset: 0;
    background: repeating-linear-gradient(
        0deg, transparent, transparent 3px,
        rgba(0,0,0,0.06) 3px, rgba(0,0,0,0.06) 6px
    );
    pointer-events: none; z-index: 1;
}
#intro-spot {
    position: absolute; width: 900px; height: 900px;
    border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, rgba(255,174,0,0.10) 0%, transparent 65%);
    animation: spot-move 8s ease-in-out infinite;
}
@keyframes spot-move {
    0%,100% { transform: translate(-380px,-200px) scale(1); }
    40%     { transform: translate(300px,-250px) scale(1.2); }
    70%     { transform: translate(60px,220px) scale(0.85); }
}
#intro-beam {
    position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(108deg,
        transparent 36%, rgba(255,220,100,0.055) 50%, transparent 64%);
    animation: beam-sweep 5.5s linear infinite;
}
@keyframes beam-sweep {
    0%   { transform: translateX(-130%); }
    100% { transform: translateX(230%); }
}
#ic {
    position: relative; z-index: 2;
    display: flex; flex-direction: column; align-items: center;
    text-align: center;
    background: rgba(0,0,0,0.72);
    padding: 36px 72px 42px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.07);
    box-shadow: 0 0 60px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.05);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    margin-top: 250px;
}
#i-genesis {
    font-size: 11px; letter-spacing: 10px; color: var(--orange);
    font-weight: 700; text-transform: uppercase;
    text-shadow: 0 0 24px rgba(255,174,0,0.8), 0 1px 3px rgba(0,0,0,0.9);
    opacity: 0; transform: translateY(-14px);
    transition: opacity 0.9s ease, transform 0.9s ease;
    margin-bottom: 5px;
}
#i-genesis.visible { opacity: 1; transform: translateY(0); }
#i-presents {
    font-size: 9px; letter-spacing: 7px; color: #ccc;
    font-weight: 400; text-transform: uppercase;
    text-shadow: 0 1px 4px rgba(0,0,0,1);
    opacity: 0; transition: opacity 0.9s ease 0.25s;
    margin-bottom: 22px;
}
#i-presents.visible { opacity: 1; }
#i-divider {
    width: 0; height: 1px; margin-bottom: 24px;
    background: linear-gradient(90deg, transparent, rgba(255,174,0,0.55), transparent);
    transition: width 1.1s ease;
}
#i-divider.visible { width: 340px; }
#i-title {
    font-size: clamp(60px, 11vw, 102px);
    font-weight: 900; line-height: 1.0; letter-spacing: 4px;
    text-transform: uppercase; color: #fff;
    text-shadow:
        0 0 120px rgba(255,26,26,0.75),
        0 0 50px  rgba(255,26,26,0.5),
        0 0 12px  rgba(255,255,255,0.35);
    opacity: 0; transform: scale(0.80);
    transition: opacity 1.1s ease, transform 1.1s cubic-bezier(0.175,0.885,0.32,1.275);
    margin-bottom: 14px;
}
#i-title.visible { opacity: 1; transform: scale(1); }
#i-sub {
    font-size: clamp(16px, 2.4vw, 22px); letter-spacing: 5px;
    color: var(--orange); font-weight: 700;
    text-shadow: 0 0 18px rgba(255,174,0,0.55);
    opacity: 0; transition: opacity 0.9s ease;
    margin-bottom: 12px;
}
#i-sub.visible { opacity: 1; }
#i-tagline {
    font-size: 11px; letter-spacing: 6px; color: #888;
    font-weight: 400; text-transform: uppercase;
    opacity: 0; transition: opacity 0.9s ease;
}
#i-tagline.visible { opacity: 1; }
#skip-hint {
    position: absolute; bottom: 24px; right: 24px;
    font-size: 10px; letter-spacing: 2px; color: #555;
    text-transform: uppercase; z-index: 4;
}
.i-spark {
    position: absolute; border-radius: 50%; pointer-events: none; z-index: 2;
    animation: spark-rise linear forwards;
}
@keyframes spark-rise {
    0%   { transform: translate(0, 0) scale(1);   opacity: 1; }
    100% { transform: translate(var(--sx), var(--sy)) scale(0); opacity: 0; }
}

/* ── Nickname + register screens ──────────────────────────── */
.screen {
    position: absolute; inset: 0; z-index: 250;
    display: none;
    background: rgba(0,0,0,0.94);
    text-align: center;
    overflow-y: auto;  /* scrollovatelné, když je obsah delší než viewport */
    overflow-x: hidden;
}
.screen.is-visible {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* safe center = vertikálně centruje malý obsah,
       ale když je obsah větší než viewport, automaticky zarovná nahoru a scrolluje */
    justify-content: safe center;
    padding: 30px 20px;
    min-height: 100%;
}
/* Vlastní scrollbar pro tmavou kompozici */
.screen::-webkit-scrollbar { width: 8px; }
.screen::-webkit-scrollbar-track { background: rgba(0,0,0,0.3); }
.screen::-webkit-scrollbar-thumb {
    background: rgba(255,26,26,0.4); border-radius: 4px;
}
.screen::-webkit-scrollbar-thumb:hover { background: rgba(255,26,26,0.7); }
.screen .badge {
    display: inline-block; padding: 5px 14px;
    border: 1px solid rgba(255,174,0,0.4);
    color: var(--orange);
    letter-spacing: 4px; font-size: 10px; font-weight: 700;
    text-transform: uppercase; margin-bottom: 14px;
}
.screen .title {
    font-size: clamp(34px, 5vw, 56px); font-weight: 900;
    letter-spacing: 4px; text-transform: uppercase;
    text-shadow: 0 0 30px rgba(255,26,26,0.5);
    margin-bottom: 8px; line-height: 1;
}
.screen .subtitle {
    font-size: 13px; color: #aaa; max-width: 460px;
    line-height: 1.5; margin-bottom: 20px;
}

/* ── Modal (full leaderboard) ─────────────────────────────── */
#lb-modal {
    position: absolute; inset: 0; z-index: 400;
    background: rgba(0,0,0,0.92);
    display: none; align-items: center; justify-content: center;
    padding: 20px;
}
#lb-modal.is-visible { display: flex; }
#lb-modal-inner {
    background: #0a0a0a; border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    width: 100%; max-width: 540px;
    max-height: 90vh; overflow: hidden;
    display: flex; flex-direction: column;
}
#lb-modal-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 18px 22px; border-bottom: 1px solid rgba(255,255,255,0.07);
}
#lb-modal-title {
    font-size: 16px; font-weight: 900; letter-spacing: 3px;
    text-transform: uppercase; margin-bottom: 6px;
}
#lb-my-pos { font-size: 11px; color: #aaa; }
#lb-jump-btn {
    margin-top: 8px; display: none;
    background: rgba(255,215,0,0.1); color: var(--gold);
    border: 1px solid rgba(255,215,0,0.3);
    padding: 6px 14px; font-size: 11px; font-weight: 700;
    letter-spacing: 1.5px; text-transform: uppercase;
    border-radius: 4px; cursor: pointer;
}
#lb-close-btn {
    background: transparent; border: 1px solid rgba(255,255,255,0.15);
    color: #888; width: 32px; height: 32px;
    border-radius: 50%; cursor: pointer; font-size: 14px;
    transition: all 0.2s;
}
#lb-close-btn:hover { color: #fff; border-color: rgba(255,255,255,0.4); }
#lb-modal-body { flex: 1; overflow-y: auto; padding: 12px 0; }
#lb-modal-list .lb-row { padding: 10px 22px; font-size: 13px; }
#lb-modal-foot {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 22px; border-top: 1px solid rgba(255,255,255,0.07);
    font-size: 12px; color: #666;
}
.lb-nav-btn {
    background: transparent; color: #aaa;
    border: 1px solid rgba(255,255,255,0.15);
    padding: 6px 14px; font-size: 11px; font-weight: 700;
    letter-spacing: 1.5px; text-transform: uppercase;
    border-radius: 4px; cursor: pointer;
}
.lb-nav-btn:hover:not(:disabled) {
    color: #fff; border-color: rgba(255,255,255,0.4);
}
.lb-nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ── Footer ────────────────────────────────────────────────── */
#footer {
    position: absolute; bottom: 8px; left: 0; right: 0;
    text-align: center; font-size: 10px; color: #555;
    z-index: 5; letter-spacing: 1px;
    pointer-events: none;
}
#footer a { color: #888; text-decoration: none; pointer-events: auto; margin: 0 8px; }
#footer a:hover { color: var(--gold); }

/* ── Boční panely (ceny + info) ───────────────────────────── */
.side-panel {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 240px; max-height: 80vh;
    background: linear-gradient(180deg, rgba(20,0,0,0.92) 0%, rgba(0,0,0,0.92) 100%);
    border: 1px solid rgba(255,26,26,0.35);
    border-radius: 10px;
    padding: 18px 18px 14px;
    z-index: 6;
    color: #ddd;
    box-shadow: 0 0 40px rgba(255,26,26,0.15);
    overflow-y: auto;
}
#panel-left  { left: 18px; }
#panel-right { right: 18px; }

.side-panel .panel-title {
    font-size: 12px; letter-spacing: 3px; text-transform: uppercase;
    color: var(--orange); margin: 0 0 14px;
    text-align: center; padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,174,0,0.3);
    text-shadow: 0 0 10px rgba(255,174,0,0.4);
}
.side-panel .panel-content {
    font-size: 12px; line-height: 1.55; color: #bbb;
}
.side-panel .panel-content p { margin: 0 0 10px; }
.side-panel .panel-content strong { color: #fff; }
.side-panel .panel-content ul,
.side-panel .panel-content ol { padding-left: 18px; margin: 0 0 10px; }
.side-panel .panel-content li { margin-bottom: 5px; }
.side-panel .panel-content a { color: var(--gold); }
.side-panel .panel-content img { max-width: 100%; border-radius: 6px; }

.side-panel .panel-footer {
    margin-top: 14px; padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 10px; color: #888; letter-spacing: 1px;
    text-align: center;
}
.side-panel .muted { color: #666; font-size: 12px; }

/* Panely uvnitř scén (na obrazovce nick / result) zobrazené pod hlavním obsahem */
.in-screen-panels {
    display: flex; gap: 14px; flex-wrap: wrap;
    justify-content: center; margin-top: 24px;
    width: 100%; max-width: 880px;
}
.in-screen-panel {
    flex: 1 1 240px; max-width: 380px;
    background: linear-gradient(180deg, rgba(20,0,0,0.7) 0%, rgba(0,0,0,0.7) 100%);
    border: 1px solid rgba(255,26,26,0.3);
    border-radius: 10px;
    padding: 16px 18px;
    text-align: left;
}
.in-screen-panel h4 {
    font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
    color: var(--orange); margin: 0 0 10px; text-align: center;
    padding-bottom: 8px; border-bottom: 1px solid rgba(255,174,0,0.25);
}
.in-screen-panel .content {
    font-size: 12px; line-height: 1.5; color: #bbb;
}
.in-screen-panel .content img { max-width: 100%; border-radius: 4px; margin: 6px 0; }
.in-screen-panel .content a {
    color: var(--gold);
}
.in-screen-panel .content .prize-btn,
.in-screen-panel .content a.btn {
    display: inline-block; padding: 6px 14px;
    background: transparent; border: 1px solid var(--gold);
    color: var(--gold); border-radius: 4px; text-decoration: none;
    font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
    font-weight: 700; margin-top: 6px;
}
.in-screen-panel .content .prize-btn:hover { background: rgba(255,174,0,0.1); }

/* Skrýt side panely na mobilu (in-screen panely jsou tam místo) */
@media (max-width: 1280px) {
    .side-panel { width: 200px; padding: 14px 14px 12px; }
    .side-panel .panel-title { font-size: 11px; }
    .side-panel .panel-content { font-size: 11px; }
}
@media (max-width: 1080px) {
    .side-panel { display: none; }
}
/* Side panely VŽDY skryté – nahrazené in-screen panely */
.side-panel { display: none !important; }

/* Brand strip skrytý během intra */
body.hide-brand-strip #brand-strip { display: none; }

/* ── 3s Countdown screen ──────────────────────────────────── */
#screen-countdown { background: rgba(0,0,0,0.97); }
#screen-countdown .cd-label {
    font-size: 14px; letter-spacing: 6px; color: var(--orange);
    text-transform: uppercase; margin-bottom: 18px;
    text-shadow: 0 0 18px rgba(255,174,0,0.6);
}
#cd-num {
    font-size: clamp(120px, 22vw, 220px);
    font-weight: 900; line-height: 1; color: #fff;
    text-shadow: 0 0 80px rgba(255,26,26,0.7);
}
.cd-pulse { animation: cd-pulse 0.7s ease-out forwards; }
.cd-go    { animation: cd-go 0.5s ease-out forwards; color: var(--green) !important;
            text-shadow: 0 0 80px rgba(34,255,0,0.8) !important; }
@keyframes cd-pulse {
    0%   { transform: scale(0.5); opacity: 0; }
    40%  { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1);   opacity: 1; }
}
@keyframes cd-go {
    0%   { transform: scale(0.6); opacity: 0; }
    50%  { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(1);   opacity: 0.9; }
}

/* ── Reward modal (gratulační popup) ──────────────────────── */
#reward-modal {
    position: fixed; inset: 0; z-index: 600;
    background: rgba(0,0,0,0.92);
    display: none; align-items: center; justify-content: center;
    padding: 20px;
}
#reward-modal.is-visible { display: flex; animation: fade-in 0.4s ease; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

#reward-inner {
    max-width: 460px; width: 100%;
    background: linear-gradient(180deg, #0a0a0a 0%, #1a0008 100%);
    border: 2px solid var(--gold);
    border-radius: 14px;
    padding: 32px 28px;
    text-align: center;
    box-shadow: 0 0 80px rgba(255,174,0,0.3);
    animation: reward-pop 0.5s cubic-bezier(0.175,0.885,0.32,1.275);
}
@keyframes reward-pop {
    from { transform: scale(0.5); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}
#reward-inner .reward-confetti {
    font-size: 48px; margin-bottom: 6px;
    animation: reward-bounce 1.2s ease-in-out infinite;
}
@keyframes reward-bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}
#reward-inner h2 {
    font-size: 22px; letter-spacing: 3px; color: var(--gold);
    text-transform: uppercase; margin: 0 0 10px;
    text-shadow: 0 0 20px rgba(255,215,0,0.5);
}
.reward-tier-name {
    font-size: 11px; letter-spacing: 2px; color: var(--green);
    text-transform: uppercase; margin-bottom: 14px;
}
.reward-intro {
    font-size: 13px; color: #ccc; line-height: 1.55;
    margin-bottom: 18px;
}
.reward-discount-box {
    background: rgba(255,174,0,0.08);
    border: 1px solid rgba(255,174,0,0.3);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 18px;
}
.reward-discount {
    font-size: 48px; font-weight: 900; color: var(--gold);
    line-height: 1; text-shadow: 0 0 24px rgba(255,215,0,0.5);
}
.reward-discount-lbl {
    font-size: 11px; letter-spacing: 3px; color: #aaa;
    text-transform: uppercase; margin-top: 4px;
}
.reward-code-row {
    display: flex; align-items: center; justify-content: center;
    gap: 8px; margin-top: 14px;
}
.reward-code {
    font-family: 'Courier New', monospace;
    font-size: 18px; font-weight: 700; letter-spacing: 2px;
    background: #000; color: var(--green);
    padding: 8px 14px; border: 1px dashed var(--green);
    border-radius: 6px;
}
.reward-copy {
    background: transparent; border: 1px solid var(--text-dim);
    color: #ccc; padding: 8px 12px; border-radius: 6px;
    font-size: 11px; cursor: pointer; letter-spacing: 1px;
}
.reward-copy:hover { color: #fff; border-color: #fff; }
.reward-eshop-logo { height: 40px; margin: 14px 0 6px; }
.reward-cta-row {
    display: flex; gap: 10px; justify-content: center;
    flex-wrap: wrap; margin-top: 14px;
}
.reward-cta {
    display: inline-block;
    padding: 12px 26px; background: var(--gold); color: #000;
    text-decoration: none; font-weight: 900; letter-spacing: 2px;
    font-size: 12px; text-transform: uppercase;
    border-radius: 6px;
    border: 2px solid var(--gold);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, transform 0.15s;
}
.reward-cta:hover { background: #ffd700; transform: translateY(-1px); }
.reward-cta-secondary {
    background: transparent;
    color: var(--gold);
    border: 2px solid var(--gold);
}
.reward-cta-secondary:hover { background: rgba(255,174,0,0.15); color: var(--gold); }
.reward-footer {
    margin-top: 14px; font-size: 10px; color: #777;
    line-height: 1.5;
}
.reward-close {
    background: transparent; border: none; color: #888;
    font-size: 24px; cursor: pointer;
    position: absolute; top: 12px; right: 14px;
}

/* ── Social panel (FB / IG / YT / TT / Discord) ───────────── */
.social-panel {
    width: 100%; max-width: 760px;
    margin: 18px auto 0;
    background: linear-gradient(180deg, rgba(255,174,0,0.04) 0%, rgba(0,0,0,0.6) 100%);
    border: 1px solid rgba(255,174,0,0.3);
    border-radius: 12px;
    padding: 18px 22px;
    text-align: center;
}
.social-panel h4 {
    font-size: 13px; letter-spacing: 4px; text-transform: uppercase;
    color: var(--orange); margin: 0 0 10px;
    text-shadow: 0 0 12px rgba(255,174,0,0.4);
}
.social-panel .social-text {
    font-size: 13px; line-height: 1.6; color: #ccc;
    margin-bottom: 16px;
    max-width: 560px; margin-left: auto; margin-right: auto;
}
.social-panel .social-text strong { color: #fff; }

.social-icons {
    display: flex; gap: 10px; flex-wrap: wrap;
    justify-content: center; align-items: center;
}
.social-link {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: #ddd; text-decoration: none;
    font-weight: 700; font-size: 12px;
    letter-spacing: 1px; text-transform: uppercase;
    transition: all 0.2s ease;
    --brand: var(--orange);
}
.social-link svg { display: block; transition: transform 0.2s ease; }
.social-link:hover {
    color: #fff;
    background: var(--brand);
    border-color: var(--brand);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}
.social-link:hover svg { transform: scale(1.1); }

/* Variant pro reward modal – jen ikony, bez textu */
.reward-social {
    margin-top: 22px; padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,0.1);
    width: 100%;
}
.reward-social-divider { display: none; }
.reward-social-text {
    font-size: 11px; letter-spacing: 2px; color: #888;
    text-transform: uppercase; margin-bottom: 10px;
}
.reward-social-icons .social-link {
    padding: 8px; gap: 0;
    border-radius: 50%;
    width: 40px; height: 40px;
    justify-content: center;
}
.reward-social-icons .social-link span { display: none; }

@media (max-width: 600px) {
    .social-panel { padding: 14px 16px; }
    .social-panel h4 { font-size: 11px; letter-spacing: 2px; }
    .social-panel .social-text { font-size: 12px; }
    .social-link { padding: 8px 12px; font-size: 11px; }
    .social-link span { display: none; }
    .social-link { padding: 10px; border-radius: 50%; }
}

/* ── Music player ─────────────────────────────────────────── */
#music-player {
    /* z-index 1000 – nad všemi screen overlayi (250-400), nad lb-modal (400),
       cookie bar (500), reward modal (600). Music control musí být dostupný vždy. */
    position: fixed; top: 14px; left: 18px; z-index: 1000;
    display: flex; align-items: center; gap: 8px;
    background: rgba(0,0,0,0.85);
    border: 1px solid rgba(255,174,0,0.4);
    border-radius: 30px;
    padding: 6px 10px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 11px;
    color: #ccc;
    max-width: 280px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
#music-toggle, #music-next {
    background: transparent; border: none; color: #fff;
    font-size: 18px; cursor: pointer; padding: 6px 10px;
    border-radius: 50%; transition: background 0.15s;
    line-height: 1;
}
/* Když je vypnutá – kompaktnější player */
#music-player.is-off { padding: 4px 6px; max-width: none; width: auto; }
#music-player.is-off #music-toggle {
    animation: music-pulse 2s ease-in-out infinite;
}
@keyframes music-pulse {
    0%, 100% { opacity: 0.7; }
    50%      { opacity: 1; }
}
#music-toggle:hover, #music-next:hover { background: rgba(255,255,255,0.1); }
#music-player .mp-info {
    display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
#music-label {
    font-size: 10px; letter-spacing: 1px; color: var(--orange);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 160px;
}
#music-volume {
    width: 100px; height: 14px;
    -webkit-appearance: none; appearance: none;
    background: transparent;
}
#music-volume::-webkit-slider-runnable-track {
    height: 3px; background: rgba(255,255,255,0.2); border-radius: 2px;
}
#music-volume::-moz-range-track {
    height: 3px; background: rgba(255,255,255,0.2); border-radius: 2px;
}
#music-volume::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--orange); margin-top: -4px;
    cursor: pointer;
}
#music-volume::-moz-range-thumb {
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--orange); border: none; cursor: pointer;
}
@media (max-width: 600px) {
    #music-player {
        top: 8px; left: 8px;
        padding: 4px 8px;
    }
    #music-label { max-width: 100px; font-size: 9px; }
    #music-volume { width: 70px; }
}

/* WYSIWYG obsah na hlavní stránce – ucpe vnitřní <p> margins */
.wysiwyg-content p { margin: 0 0 8px; }
.wysiwyg-content p:last-child { margin-bottom: 0; }
.wysiwyg-content img { max-width: 100%; height: auto; border-radius: 4px; }
.wysiwyg-content ul, .wysiwyg-content ol { margin: 4px 0 8px; padding-left: 20px; }
.wysiwyg-content a.prize-btn,
.wysiwyg-content a.btn {
    display: inline-block; padding: 6px 14px;
    background: transparent; border: 1px solid var(--gold);
    color: var(--gold); border-radius: 4px; text-decoration: none;
    font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
    font-weight: 700; margin-top: 6px;
}
.wysiwyg-content a.prize-btn:hover,
.wysiwyg-content a.btn:hover { background: rgba(255,174,0,0.1); }

/* ── Cookie bar ───────────────────────────────────────────── */
#cookie-bar {
    position: fixed; bottom: 0; left: 0; right: 0;
    z-index: 500;
    background: rgba(0,0,0,0.97);
    border-top: 1px solid rgba(255,174,0,0.4);
    padding: 12px 18px;
    display: flex; align-items: center; gap: 14px;
    flex-wrap: wrap; justify-content: center;
    color: #ccc; font-size: 12px;
}
#cookie-bar .cookie-text {
    flex: 1 1 320px; line-height: 1.5;
}
#cookie-bar a { color: var(--gold); }
#cookie-bar button {
    background: var(--gold); color: #000;
    border: none; padding: 8px 18px;
    font-weight: 700; letter-spacing: 1px;
    border-radius: 4px; cursor: pointer;
    font-family: inherit; text-transform: uppercase;
}
#cookie-bar button:hover { background: #ffd700; }

/* Žebříček tabs (PC / Mobile) */
#lb-tabs {
    display: flex; gap: 0;
    padding: 0 22px; background: rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.lb-tab {
    flex: 1; background: transparent; color: var(--text-dim);
    border: none; padding: 12px 14px;
    font-family: inherit; font-size: 12px; font-weight: 700;
    letter-spacing: 1.5px; text-transform: uppercase;
    cursor: pointer; transition: all 0.15s;
    border-bottom: 2px solid transparent;
}
.lb-tab:hover { color: #fff; }
.lb-tab.is-active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: rgba(255,26,26,0.05);
}

/* ── Genesis branding strip ───────────────────────────────── */
#brand-strip {
    position: absolute; top: 14px; right: 18px; z-index: 5;
    display: flex; align-items: center; gap: 8px;
    color: var(--orange); font-size: 9px; letter-spacing: 4px;
    font-weight: 700; text-transform: uppercase;
    pointer-events: none;
}
#brand-strip img { width: 22px; height: 22px; opacity: 0.9; }

/* ── Loading spinner ──────────────────────────────────────── */
.spinner {
    width: 36px; height: 36px; border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--accent);
    animation: spin 0.8s linear infinite;
    margin-bottom: 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
    #ic { padding: 24px 28px 32px; margin-top: 180px; }
    .screen .title { font-size: 32px; letter-spacing: 2px; }
    .form-group { max-width: 92vw; }
    #brand-strip { display: none; }
}
