/* ─── WRAPPER ─── */
.sp91-roulette-wrap {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #334155;
    max-width: 520px;
    margin: 0 auto;
    padding: 0 0 40px;
}

/* ─── CARD ─── */
.sp91-rl-card {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 20px 40px -8px rgba(3,61,92,.12);
    overflow: hidden;
    animation: sp91FadeIn .35s ease;
}
@keyframes sp91FadeIn {
    from { opacity:0; transform:translateY(16px); }
    to   { opacity:1; transform:translateY(0); }
}

/* ─── HEADER ─── */
.sp91-rl-header {
    padding: 32px 28px 28px;
    text-align: center;
    color: #fff;
}
.sp91-rl-header-green {
    background: linear-gradient(135deg, #15803d, #16a34a) !important;
}
.sp91-rl-pretitolo {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: rgba(255,255,255,.75);
    margin: 0 0 6px;
    font-weight: 600;
}
.sp91-rl-titolo {
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 900;
    margin: 0 0 8px;
    color: #fff;
    line-height: 1.15;
}
.sp91-rl-testo {
    font-size: .95rem;
    color: rgba(255,255,255,.85);
    margin: 0;
    line-height: 1.5;
}
.sp91-rl-premio-emoji {
    font-size: 3.5rem;
    line-height: 1;
    margin-bottom: 10px;
    animation: sp91Bounce .6s ease;
}
@keyframes sp91Bounce {
    0%,100% { transform: scale(1); }
    50%      { transform: scale(1.3); }
}

/* ─── BODY ─── */
.sp91-rl-body {
    padding: 28px 28px 32px;
}
.sp91-rl-body-roulette {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 20px 32px;
}
.sp91-rl-body-codice {
    padding: 24px 24px 32px;
}

/* ─── FORM ─── */
.sp91-rl-field {
    margin-bottom: 16px;
}
.sp91-rl-label {
    display: block;
    font-size: .85rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
}
.sp91-rl-label .req { color: #dc2626; }
.sp91-rl-input {
    width: 100%;
    padding: 13px 14px;
    font-size: 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
    font-family: inherit;
}
.sp91-rl-input:focus {
    border-color: #0369a1;
    box-shadow: 0 0 0 3px rgba(3,105,161,.1);
}
.sp91-rl-hint {
    display: block;
    font-size: .8rem;
    color: #64748b;
    margin-top: 5px;
}

/* ─── MESSAGGIO ERRORE ─── */
.sp91-rl-msg {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: .9rem;
    margin-bottom: 16px;
    line-height: 1.5;
}
.sp91-rl-msg.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.sp91-rl-msg.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* ─── BOTTONI ─── */
.sp91-rl-btn {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s, opacity .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    font-family: inherit;
}
.sp91-btn-registra,
.sp91-btn-spin {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;
    box-shadow: 0 4px 16px rgba(22,163,74,.35);
    animation: sp91Pulse 2.5s ease-in-out infinite;
}
@keyframes sp91Pulse {
    0%,100% { box-shadow: 0 4px 16px rgba(22,163,74,.35); }
    50%      { box-shadow: 0 8px 28px rgba(22,163,74,.6); }
}
.sp91-rl-btn:hover { transform: translateY(-2px); }
.sp91-rl-btn:active { transform: translateY(0); }
.sp91-rl-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    animation: none;
    box-shadow: none;
    transform: none;
}

/* ─── PRIVACY ─── */
.sp91-rl-privacy {
    font-size: .75rem;
    color: #94a3b8;
    text-align: center;
    margin: 14px 0 0;
    line-height: 1.4;
}

/* ─── RUOTA ─── */
.sp91-rl-wheel-wrap {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto 24px;
}
.sp91-rl-canvas {
    display: block;
    border-radius: 50%;
    box-shadow: 0 8px 32px rgba(3,61,92,.25);
}
.sp91-rl-arrow {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 24px solid #003d5c;
    z-index: 3;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.3));
}
.sp91-rl-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    width: 44px;
    height: 44px;
    background: #fff;
    border: 3px solid #003d5c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

/* ─── CODICE PREMIO ─── */
.sp91-rl-codice-box {
    background: linear-gradient(135deg, #fff, #f0f9ff);
    border: 3px solid #fbbf24;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}
.sp91-rl-codice-box::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 50%;
    opacity: .5;
}
.sp91-rl-codice-label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #b45309;
    font-weight: 700;
    margin: 0 0 8px;
    position: relative;
}
.sp91-rl-codice-value {
    font-family: 'Courier New', monospace;
    font-size: 2rem;
    font-weight: 900;
    color: #003d5c;
    letter-spacing: .15em;
    margin: 0 0 8px;
    position: relative;
}
.sp91-rl-codice-scadenza {
    font-size: .8rem;
    color: #64748b;
    margin: 0;
    position: relative;
}
.sp91-rl-istruzioni {
    background: #f0f9ff;
    border-left: 4px solid #0369a1;
    border-radius: 0 10px 10px 0;
    padding: 14px 16px;
    font-size: .88rem;
    color: #0c4a6e;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* ─── GDPR ─── */
.sp91-gdpr-field {
    margin-top: 16px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
}
.sp91-gdpr-label {
    display: flex;
    align-items: flex-start;
    gap: 0;
    cursor: pointer;
    line-height: 1.5;
}
.sp91-gdpr-label:has(input:checked) {
    border-color: #0369a1;
    background: #eff6ff;
}

/* ─── MOBILE ─── */
@media (max-width: 560px) {
    .sp91-rl-header { padding: 24px 20px 20px; }
    .sp91-rl-body   { padding: 20px 18px 24px; }
    .sp91-rl-wheel-wrap { width: 260px; height: 260px; }
    .sp91-rl-canvas { width: 260px; height: 260px; }
    .sp91-rl-codice-value { font-size: 1.6rem; }
}
