/* ============================================
   TRATTORIA RUSTICONE ALLING - Wheel of Prizes
   Stili isolati: nessuna interferenza con style.css
   ============================================ */

.wheel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 12, 6, 0.78);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
    animation: wheelFadeIn 0.25s ease;
}
.wheel-overlay.active { display: flex; }

@keyframes wheelFadeIn { from { opacity: 0 } to { opacity: 1 } }

.wheel-modal {
    background: linear-gradient(160deg, #fff8f0 0%, #f5e6cc 100%);
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    padding: 24px 22px 22px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    position: relative;
    border: 3px solid #B22222;
    animation: wheelPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes wheelPop {
    from { transform: scale(0.6); opacity: 0 }
    to   { transform: scale(1);   opacity: 1 }
}

.wheel-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: transparent;
    border: 0;
    font-size: 28px;
    color: #2C1810;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 50%;
}
.wheel-close:hover { background: rgba(0,0,0,0.08); }

.wheel-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    color: #2C1810;
    margin: 4px 0 4px;
}
.wheel-subtitle {
    font-size: 0.9rem;
    color: #6b5848;
    margin-bottom: 14px;
}

.wheel-stage {
    position: relative;
    width: 320px;
    height: 320px;
    margin: 0 auto 18px;
    max-width: 100%;
}
.wheel-pointer {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-top: 28px solid #B22222;
    z-index: 3;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}
.wheel-disc {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 0 8px #2C1810, 0 10px 30px rgba(0,0,0,0.4);
    overflow: hidden;
    transition: transform 5s cubic-bezier(0.17, 0.67, 0.21, 1.0);
    transform: rotate(0deg);
}
.wheel-disc svg { width: 100%; height: 100%; display: block; }
.wheel-hub {
    position: absolute;
    top: 50%; left: 50%;
    width: 48px; height: 48px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, #fff 0%, #f5e6cc 60%, #B22222 100%);
    border-radius: 50%;
    box-shadow: 0 0 0 4px #2C1810, inset 0 -2px 4px rgba(0,0,0,0.3);
    z-index: 2;
}

.wheel-spin-btn {
    background: linear-gradient(180deg, #B22222 0%, #8B1818 100%);
    color: #fff;
    border: 0;
    padding: 12px 32px;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(178,34,34,0.4);
    transition: transform 0.15s, box-shadow 0.15s;
    font-family: 'Inter', sans-serif;
}
.wheel-spin-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(178,34,34,0.5); }
.wheel-spin-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.wheel-result {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.95rem;
    display: none;
    animation: wheelFadeIn 0.3s ease;
}
.wheel-result.win {
    background: #e8f5e9;
    border: 1px solid #4CAF50;
    color: #1b5e20;
    display: block;
}
.wheel-result.lose {
    background: #f5f5f5;
    border: 1px solid #bbb;
    color: #555;
    display: block;
}
.wheel-result strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }

@media (max-width: 480px) {
    .wheel-stage { width: 280px; height: 280px; }
}
