/* =====================================================================
   Roleta da Sorte – Estilo do totem
===================================================================== */

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #fff;
    background: radial-gradient(circle at 50% 20%, #1e4a9c 0%, #0a1f4d 60%, #061539 100%);
    overflow: hidden;
}

.totem {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
}

.totem h1 {
    font-size: 2.4rem;
    margin: 0 0 4px;
    letter-spacing: 1px;
    text-shadow: 0 2px 12px rgba(0,0,0,.4);
}

.totem .subtitle {
    font-size: 1.05rem;
    opacity: .85;
    margin-bottom: 24px;
}

/* ----------- Roleta ----------- */
.wheel-wrapper {
    position: relative;
    width: min(80vmin, 520px);
    aspect-ratio: 1 / 1;
    margin: 8px auto 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wheel-wrapper::before {
    /* Aro externo dourado */
    content: '';
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd966, #b8860b);
    box-shadow:
        0 0 30px rgba(255, 217, 102, .35),
        inset 0 0 12px rgba(0, 0, 0, .25);
    z-index: 0;
}

#wheel {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #fff;
    transition: transform 4.8s cubic-bezier(.17, .67, .25, 1);
    will-change: transform;
}

/* Ponteiro no topo */
.pointer {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 22px solid transparent;
    border-right: 22px solid transparent;
    border-top: 36px solid #ffd966;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,.45));
    z-index: 5;
}

/* Centro decorativo */
.hub {
    position: absolute;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff8d5, #c89b22);
    box-shadow: 0 4px 14px rgba(0,0,0,.35), inset 0 0 8px rgba(0,0,0,.25);
    z-index: 4;
}

/* ----------- Botão ----------- */
.btn-spin {
    background: linear-gradient(135deg, #ffd966, #f0a500);
    color: #0a1f4d;
    border: none;
    padding: 18px 56px;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0,0,0,.35);
    transition: transform .15s ease, box-shadow .15s ease, opacity .2s;
}
.btn-spin:hover:not(:disabled)  { transform: translateY(-2px); }
.btn-spin:active:not(:disabled) { transform: translateY(0); }
.btn-spin:disabled               { opacity: .55; cursor: not-allowed; }

/* ----------- Modal ----------- */
.modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
    backdrop-filter: blur(4px);
}
.modal-backdrop.open { display: flex; animation: fadeIn .25s ease; }

.modal-card {
    background: #fff;
    color: #0a1f4d;
    border-radius: 18px;
    padding: 32px 36px;
    max-width: 420px;
    width: calc(100% - 32px);
    text-align: center;
    box-shadow: 0 12px 40px rgba(0,0,0,.45);
    animation: popIn .35s cubic-bezier(.2,.9,.3,1.3);
}

.modal-card h2     { margin-top: 0; font-size: 1.6rem; }
.modal-card .prize { font-size: 1.9rem; font-weight: 800; margin: 12px 0 18px; color: #f0a500; }
.modal-card button {
    background: #0d6efd;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 1rem;
    cursor: pointer;
}

.confetti { font-size: 2.6rem; line-height: 1; }

@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes popIn  {
    from { opacity: 0; transform: scale(.7); }
    to   { opacity: 1; transform: scale(1); }
}

@media (max-width: 480px) {
    .totem h1   { font-size: 1.7rem; }
    .btn-spin   { padding: 14px 40px; font-size: 1.2rem; }
}
