/* ═══ Koleso šťastia — Hip Hop Žije ═══ */
:root {
    --black:       #0a0a0a;
    --bg:          #1a1a1a;
    --bg-2:        #2a2a2a;
    --orange:      #FF7300;
    --orange-hot:  #FF8A1F;
    --amber:       #C99A10;
    --amber-hot:   #E8B82A;
    --neon:        #39FF14;
    --white:       #FFFFFF;
    --gray:        #888;
    --gray-2:      #444;
    --radius:      0;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
    height: 100%;
    font-family: 'Oswald', sans-serif;
    background: var(--bg);
    color: var(--white);
    -webkit-font-smoothing: antialiased;
    text-transform: uppercase;
}
body.no-scroll { overflow: hidden; }

.screen { display: none; height: 100vh; width: 100vw; position: relative; }
.screen.active { display: flex; flex-direction: column; }

/* ─── Topbar ─── */
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 32px;
    background: var(--black);
    border-bottom: 2px solid var(--orange);
    flex-shrink: 0;
}
.brand { display: flex; align-items: center; gap: 16px; }
.brand-mark {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 32px; font-weight: 700;
    color: var(--orange);
    letter-spacing: 2px;
    line-height: 1;
}
.brand-divider {
    width: 2px; height: 24px;
    background: var(--gray-2);
}
.brand-text {
    font-size: 18px; font-weight: 700; letter-spacing: 4px;
    color: var(--white);
}
.brand-right {
    font-size: 14px; font-weight: 600; letter-spacing: 3px;
    color: var(--gray);
}

/* ─── App layout ─── */
.app-layout {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 40px;
    gap: 40px;
    min-height: 0;
    background:
        radial-gradient(circle at 30% 20%, rgba(255,115,0,0.08), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(201,154,16,0.06), transparent 50%),
        var(--bg);
}
.panel-left {
    flex: 0 0 220px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    justify-content: center;
    z-index: 2;
    min-width: 0;
}
.panel-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    overflow: visible;
}

/* ─── Posters ─── */
.posters {
    flex: 0 0 280px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
    justify-content: center;
    height: 100%;
    min-height: 0;
}
.poster {
    flex: 0 0 auto;
    display: block;
    overflow: hidden;
    border: 2px solid var(--orange);
    box-shadow: 0 6px 24px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,107,0,0.15);
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    aspect-ratio: 1 / 1;
}
.poster:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(255,107,0,0.4), 0 0 0 1px rgba(255,107,0,0.4);
}
.poster img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: var(--black);
}

/* Tablet (primary target): keep posters but scale them */
@media (max-width: 1280px) {
    .app-layout { gap: 20px; padding: 20px; }
    .panel-left { flex: 0 0 200px; }
    .posters { flex: 0 0 230px; gap: 12px; }
}

/* Smaller tablets landscape: posters get narrower */
@media (max-width: 1024px) and (min-aspect-ratio: 1/1) {
    .panel-left { flex: 0 0 160px; }
    .posters { flex: 0 0 180px; gap: 10px; }
}

/* Tablet portrait: posters become 2x2 grid below the wheel */
@media (min-width: 769px) and (max-width: 1024px) and (max-aspect-ratio: 1/1) {
    .app-layout {
        flex-direction: column;
        flex-wrap: wrap;
        align-content: center;
    }
    .posters {
        flex: 0 0 auto;
        flex-direction: row;
        flex-wrap: wrap;
        height: auto;
        width: 100%;
        max-width: 640px;
        gap: 12px;
        justify-content: center;
    }
    .poster {
        flex: 1 1 calc(50% - 6px);
        max-width: 300px;
        max-height: 200px;
        aspect-ratio: 1 / 1;
    }
    /* Combine left+right posters into one strip below */
    .posters-left { order: 3; }
    .posters-right { order: 4; margin-top: -12px; }
}

/* Mobile: kolo zmenšené, BA plakát — všetko v 100dvh bez scrollu */
@media (max-width: 768px) {
    body.no-scroll { overflow: hidden; }
    html, body { height: 100dvh; }
    .screen.active { height: 100dvh; min-height: 0; }
    .app-layout { padding: 4px 8px; gap: 4px; justify-content: center; align-items: center; }
    .panel-left { gap: 4px; flex: 0 0 auto; max-width: none; order: 1; }
    .panel-right { flex: 0 0 auto; order: 2; }
    .btn-spin { padding: 8px 20px; font-size: 16px; letter-spacing: 3px; }
    .wheel-container { width: min(34dvh, 70vw); height: min(34dvh, 70vw); }
    #wheel-canvas { box-shadow: 0 0 0 3px var(--black), 0 0 0 6px var(--orange), 0 0 0 8px var(--black), 0 6px 24px rgba(255,107,0,0.3); }
    .wheel-center { width: 50px; height: 50px; }
    .wheel-center-text { font-size: 18px; }
    .posters-right { display: none; }
    .posters-left {
        display: flex;
        flex: 0 0 auto;
        flex-direction: row;
        height: auto;
        width: auto;
        order: 3;
        align-self: center;
        margin-top: 0;
    }
    .posters-left .poster:nth-child(2) { display: none; }
    .posters-left .poster {
        flex: 0 0 auto;
        max-height: none;
        aspect-ratio: 1 / 1;
        width: min(28dvh, 55vw);
        max-width: min(28dvh, 55vw);
    }
    .bottombar { display: none; }
    .topbar { padding: 8px 12px; }
    .brand-mark { font-size: 22px; }
    .brand-text { font-size: 11px; letter-spacing: 2px; }

    /* Po výhre: skry kolo, ponechaj plakát, centruj výsledok */
    body.has-result .panel-right {
        display: none !important;
    }
    body.has-result .panel-left {
        flex: 0 0 auto;
        width: 100%;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    body.has-result .result-section {
        width: 100%;
        max-width: 400px;
    }
    body.has-result .posters-left {
        max-width: 400px;
        width: 100%;
        padding: 0 8px;
    }
    body.has-result .posters-left .poster {
        width: 100%;
        max-width: 100%;
    }
}

/* ─── Hero text ─── */
.kicker {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 6px;
    color: var(--orange);
    margin-bottom: 12px;
}
.title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(44px, 5vw, 72px);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: 2px;
    color: var(--white);
}

/* ─── Email form ─── */
.email-section { margin-top: 8px; }
.email-section.hidden { display: none; }

.instruction {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--orange);
    margin-bottom: 12px;
}
.email-form {
    display: flex; flex-direction: column; gap: 12px;
}
.email-form input {
    padding: 18px 22px;
    font-size: 22px;
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    border: 2px solid var(--gray-2);
    background: var(--black);
    color: var(--white);
    outline: none;
    transition: all 0.15s;
    border-radius: 0;
}
.email-form input:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 2px rgba(255,115,0,0.25);
}
.email-form input::placeholder {
    color: var(--gray-2);
    letter-spacing: 6px;
}

.btn-spin {
    padding: 22px 32px;
    font-size: 28px;
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 700;
    letter-spacing: 6px;
    background: var(--orange);
    color: var(--white);
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
    text-shadow: 0 1px 0 rgba(0,0,0,0.25);
    box-shadow: inset 0 -3px 0 rgba(0,0,0,0.25), 0 6px 24px rgba(255,107,0,0.35);
}
.btn-spin:hover {
    background: #FF8C42;
    transform: translateY(-1px);
}
.btn-spin:active { transform: translateY(0); }
.btn-spin:disabled {
    background: var(--gray-2);
    cursor: not-allowed;
    transform: none;
}

.gdpr-note {
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 1.5px;
    color: var(--gray);
    margin-top: 10px;
    line-height: 1.5;
    text-transform: uppercase;
}

/* ─── Result ─── */
.result-section { margin-top: 8px; }
.result-section.hidden { display: none; }

.result-content {
    background: var(--black);
    border: 2px solid var(--orange);
    padding: 28px 26px;
    text-align: center;
    position: relative;
}
.result-content::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px;
    height: 6px;
    background: linear-gradient(90deg, var(--orange), var(--amber), var(--orange));
}
.result-content .result-icon {
    font-size: 56px;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 8px rgba(255,115,0,0.4));
}
.result-content .result-label {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 5px;
    color: var(--orange);
    margin-bottom: 6px;
}
.result-content .result-prize {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--white);
    line-height: 1.1;
}
.result-content .result-desc {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 1px;
    color: var(--gray);
    margin-top: 12px;
    line-height: 1.5;
    text-transform: none;
}

.btn-new-spin {
    margin-top: 14px;
    width: 100%;
    padding: 18px;
    font-size: 16px;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    letter-spacing: 4px;
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
}
.btn-new-spin:hover {
    background: var(--white);
    color: var(--black);
}

/* ─── Wheel ─── */
.wheel-container {
    position: relative;
    width: min(560px, 65vh);
    height: min(560px, 65vh);
    flex-shrink: 0;
}
.wheel-pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 22px solid transparent;
    border-right: 22px solid transparent;
    border-top: 38px solid var(--orange);
    z-index: 10;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.6));
}
#wheel-canvas {
    width: 100%; height: 100%;
    border-radius: 50%;
    box-shadow:
        0 0 0 6px var(--black),
        0 0 0 10px var(--orange),
        0 0 0 12px var(--black),
        0 12px 60px rgba(255,107,0,0.35),
        0 0 80px rgba(0,0,0,0.6);
}
@keyframes pulse-glow {
    0%,100% { box-shadow: 0 0 0 6px var(--black), 0 0 0 10px var(--orange), 0 0 0 12px var(--black), 0 12px 60px rgba(255,107,0,0.35); }
    50%      { box-shadow: 0 0 0 6px var(--black), 0 0 0 10px #FF8C42, 0 0 0 12px var(--black), 0 0 80px rgba(255,107,0,0.7); }
}
#wheel-canvas.spinning { animation: pulse-glow 0.6s ease-in-out infinite; }

.wheel-center {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 90px; height: 90px;
    background: var(--black);
    border: 3px solid var(--orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
.wheel-center-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--orange);
    line-height: 1;
}

/* ─── Bottom strip ─── */
.bottombar {
    background: var(--orange);
    color: var(--black);
    padding: 10px 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 4px;
    flex-shrink: 0;
    border-top: 2px solid var(--black);
}
.strip-text { padding: 0 12px; }
@media (max-width: 768px) {
    .bottombar { font-size: 11px; letter-spacing: 2px; gap: 12px; padding: 8px 0; }
    .strip-text { padding: 0 4px; }
    .bottombar .strip-text:nth-child(n+4),
    .bottombar .strip-dot:nth-child(n+4) { display: none; }
}
.strip-dot {
    width: 6px; height: 6px;
    background: var(--black);
    border-radius: 50%;
    flex-shrink: 0;
}

/* ─── Confetti ─── */
#confetti-canvas {
    position: fixed; top: 0; left: 0;
    width: 100vw; height: 100vh;
    pointer-events: none; z-index: 1000;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
    .app-layout {
        flex-direction: column;
        padding: 20px 20px;
        gap: 18px;
        justify-content: flex-start;
    }
    .panel-left {
        flex: 0 0 auto;
        width: 100%;
        max-width: 500px;
        gap: 12px;
        text-align: center;
        align-items: center;
    }
    .topbar { padding: 14px 20px; }
    .brand-text { font-size: 14px; letter-spacing: 2px; }
    .brand-right { display: none; }
    .title { font-size: 36px; }
    .wheel-container { width: min(380px, 45vh); height: min(380px, 45vh); }
    .email-form { width: 100%; }
}
@media (min-width: 901px) and (max-height: 750px) {
    .app-layout { padding: 16px 30px; gap: 28px; }
    .panel-left { flex: 0 0 320px; gap: 14px; }
    .title { font-size: 48px; }
    .wheel-container { width: min(480px, 70vh); height: min(480px, 70vh); }
    .btn-spin { padding: 18px 28px; font-size: 24px; }
}
