:root {
    --ink: #172033;
    --muted: #667085;
    --brand: #2563eb;
    --brand-dark: #1e3a8a;
    --paper: #ffffff;
    --soft: #f4f7fb;
}

body {
    background: var(--soft);
    color: var(--ink);
}

.app-nav {
    background: #111827;
}

.hero-panel {
    min-height: 360px;
    display: flex;
    align-items: center;
    padding: 48px;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, .92), rgba(30, 64, 175, .68)),
        url("https://images.unsplash.com/photo-1513151233558-d860c5398176?auto=format&fit=crop&w=1600&q=80") center/cover;
    border-radius: 8px;
}

.eyebrow {
    color: #60a5fa;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.page-heading {
    margin-bottom: 24px;
}

.page-heading h1 {
    font-weight: 800;
}

.sorteio-card,
.form-card,
.helper-card,
.metric,
.empty-state {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .08);
}

.mini-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.mini-stats span {
    background: #eef4ff;
    color: var(--brand-dark);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: .8rem;
    font-weight: 700;
}

.empty-state {
    background: var(--paper);
    padding: 40px;
    text-align: center;
}

.comment-box {
    font-family: Consolas, "Courier New", monospace;
}

.script-box {
    background: #101828;
    color: #d1e7ff;
    border-radius: 8px;
    padding: 18px;
    max-height: 360px;
    overflow: auto;
    font-size: .86rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.step-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px;
}

.step-item span {
    display: grid;
    place-items: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-weight: 800;
}

.step-item p {
    margin: 0;
    color: #344054;
    font-size: .94rem;
}

.metric {
    background: var(--paper);
    padding: 22px;
}

.metric span {
    display: block;
    color: var(--muted);
    font-size: .9rem;
}

.metric strong {
    display: block;
    font-size: 2rem;
    line-height: 1.1;
}

.draw-stage,
.result-stage {
    min-height: calc(100vh - 170px);
    border-radius: 8px;
    display: grid;
    place-items: center;
    overflow: hidden;
    position: relative;
}

.draw-stage {
    background:
        linear-gradient(135deg, rgba(14, 165, 233, .9), rgba(37, 99, 235, .92)),
        url("https://images.unsplash.com/photo-1530103862676-de8c9debad1d?auto=format&fit=crop&w=1600&q=80") center/cover;
}

.draw-card {
    color: #fff;
    text-align: center;
    width: min(760px, 92%);
}

.draw-card h1,
.result-content h1 {
    font-size: clamp(2.6rem, 8vw, 6rem);
    font-weight: 900;
}

.draw-card p {
    font-size: 1.2rem;
}

.draw-numbers {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin: 34px 0;
    flex-wrap: wrap;
}

.draw-numbers div {
    min-width: 150px;
    padding: 18px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 8px;
}

.draw-numbers span {
    display: block;
    font-size: 2.6rem;
    font-weight: 900;
}

.draw-numbers small {
    display: block;
    color: rgba(255, 255, 255, .86);
}

.draw-button {
    font-weight: 800;
    min-width: 220px;
}

.result-stage {
    background: linear-gradient(135deg, #111827, #1d4ed8 48%, #0f766e);
    color: #fff;
    padding: 48px 18px;
}

.result-content {
    width: min(900px, 96%);
    text-align: center;
    position: relative;
    z-index: 1;
}

.winner-list {
    display: grid;
    gap: 16px;
    margin-top: 32px;
}

.winner-card {
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .32);
    border-radius: 8px;
    padding: 24px;
}

.winner-card span,
.winner-card small {
    display: block;
    color: rgba(255, 255, 255, .82);
}

.winner-card strong {
    display: block;
    font-size: clamp(2rem, 7vw, 4.5rem);
    line-height: 1.05;
    word-break: break-word;
}

.result-footnote {
    margin-top: 28px;
    color: rgba(255, 255, 255, .82);
}

.confetti {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 12% 20%, #facc15 0 6px, transparent 7px),
        radial-gradient(circle at 76% 22%, #f472b6 0 5px, transparent 6px),
        radial-gradient(circle at 86% 74%, #22d3ee 0 7px, transparent 8px),
        radial-gradient(circle at 22% 78%, #a3e635 0 6px, transparent 7px),
        radial-gradient(circle at 50% 12%, #fb7185 0 5px, transparent 6px);
    opacity: .85;
}

@media (max-width: 640px) {
    .hero-panel {
        padding: 30px;
        min-height: 440px;
    }

    .draw-stage,
    .result-stage {
        min-height: 720px;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }
}
