/* ═══════════════════════════════════════════════════════════
   SPIN WHEEL — Slot Machine Horizontal
══════════════════════════════════════════════════════════════ */
.spin-wheel-section {
    max-width: 780px;
    margin: 0 auto;
    background: linear-gradient(135deg, #141814 0%, #1a1040 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 20px;
    padding: 24px 28px 28px;
    position: relative;
    overflow: hidden;
}
.spin-wheel-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(139,92,246,.15), transparent);
    pointer-events: none;
}

/* Header */
.spin-wheel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}
.spin-wheel-icon { font-size: 1.8rem; }
.spin-wheel-title {
    font-size: 1.2rem;
    font-weight: 800;
    background: linear-gradient(90deg, #a78bfa, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}
.spin-wheel-subtitle { color: #64748b; font-size: 0.82rem; }
.spin-countdown-wrap {
    margin-left: auto;
    background: rgba(239,68,68,.12);
    border: 1px solid rgba(239,68,68,.3);
    color: #f87171;
    font-size: 0.8rem;
    border-radius: 20px;
    padding: 4px 14px;
}
.spin-status-badge {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.spin-status-badge.online {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #4ade80;
}
.spin-status-badge.offline {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
}

/* Stage */
.spin-wheel-stage {
    position: relative;
    height: 140px;
    border-radius: 14px;
    overflow: hidden;
    background: #060d1a;
    border: 2px solid rgba(139,92,246,.4);
    box-shadow: inset 0 0 40px rgba(0,0,0,.6), 0 0 30px rgba(139,92,246,.15);
}

/* Center indicator */
.spin-wheel-indicator {
    position: absolute;
    top: 0; bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background: linear-gradient(180deg, transparent, #ef4444 20%, #ef4444 80%, transparent);
    z-index: 10;
    pointer-events: none;
}
.spin-wheel-indicator::before,
.spin-wheel-indicator::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border: 7px solid transparent;
}
.spin-wheel-indicator::before {
    top: 0;
    border-top-color: #ef4444;
    border-width: 10px 7px 0;
}
.spin-wheel-indicator::after {
    bottom: 0;
    border-bottom-color: #ef4444;
    border-width: 0 7px 10px;
}

/* Edge fades */
.spin-wheel-edge {
    position: absolute;
    top: 0; bottom: 0;
    width: 80px;
    z-index: 5;
    pointer-events: none;
}
.spin-wheel-edge-left  { left: 0;  background: linear-gradient(to right, #060d1a, transparent); }
.spin-wheel-edge-right { right: 0; background: linear-gradient(to left,  #060d1a, transparent); }

/* Track */
.spin-wheel-track-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
}
.spin-wheel-track {
    display: flex;
    align-items: center;
    height: 100%;
    will-change: transform;
    gap: 0;
}

/* Item card */
.spin-item {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    margin: 0 6px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #141814;
    border: 2px solid #1e293b;
    transition: border-color .15s;
    position: relative;
    overflow: hidden;
}
.spin-item.rarity-common    { border-color: #6b7280; box-shadow: 0 0 8px #6b728020; }
.spin-item.rarity-uncommon  { border-color: #22c55e; box-shadow: 0 0 8px #22c55e20; }
.spin-item.rarity-rare      { border-color: #3b82f6; box-shadow: 0 0 8px #3b82f620; }
.spin-item.rarity-epic      { border-color: #d97706; box-shadow: 0 0 12px #d9770630; }
.spin-item.rarity-legendary { border-color: #f59e0b; box-shadow: 0 0 16px #f59e0b40; }
.spin-item.is-winner {
    transform: scale(1.06);
    border-width: 3px;
}
.spin-item img {
    width: 70px;
    height: 70px;
    object-fit: contain;
}
.spin-item .spin-item-icon {
    font-size: 2.2rem;
    color: #475569;
}
.spin-item .spin-item-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #94a3b8;
    margin-top: 4px;
    text-align: center;
    max-width: 108px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    padding: 0 4px;
}
.spin-item .spin-item-rarity-dot {
    position: absolute;
    top: 5px; right: 5px;
    width: 8px; height: 8px;
    border-radius: 50%;
}
.rarity-common    .spin-item-rarity-dot { background: #6b7280; }
.rarity-uncommon  .spin-item-rarity-dot { background: #22c55e; }
.rarity-rare      .spin-item-rarity-dot { background: #3b82f6; }
.rarity-epic      .spin-item-rarity-dot { background: #d97706; }
.rarity-legendary .spin-item-rarity-dot { background: #f59e0b; }

/* Spin Button */
.spin-wheel-actions { display: flex; justify-content: center; }
.btn-spin {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #7c3aed, #d97706);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 14px 42px;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all .2s;
    box-shadow: 0 4px 20px rgba(139,92,246,.4);
    position: relative;
    overflow: hidden;
}
.btn-spin::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.15), transparent);
    opacity: 0;
    transition: opacity .2s;
}
.btn-spin:hover:not(:disabled)::before { opacity: 1; }
.btn-spin:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(139,92,246,.55);
}
.btn-spin:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(135deg, #374151, #4b5563);
    box-shadow: none;
}
.btn-spin.spinning {
    animation: spinBtnPulse 0.5s ease infinite alternate;
}
@keyframes spinBtnPulse {
    from { box-shadow: 0 4px 20px rgba(139,92,246,.4); }
    to   { box-shadow: 0 4px 40px rgba(139,92,246,.8); }
}
.btn-spin-icon { font-size: 1.1rem; }

/* Result Modal */
.spin-result-modal {
    background: linear-gradient(135deg, #141814 0%, #1a0a30 100%);
    border: 1px solid rgba(139,92,246,.4);
    border-radius: 20px;
    color: #fff;
}
.spin-result-img-wrap {
    width: 110px;
    height: 110px;
    margin: 0 auto;
    border-radius: 16px;
    background: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.spin-result-img-wrap img { width: 86px; height: 86px; object-fit: contain; }
.spin-result-img-wrap .result-icon { font-size: 3rem; color: #475569; }
.spin-result-name { font-size: 1.4rem; font-weight: 800; color: #f1f5f9; }
.spin-result-rarity {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 3px 14px;
    border-radius: 20px;
    display: inline-block;
}
.spin-result-rarity.common    { background:#6b728025;color:#9ca3af;border:1px solid #6b728050; }
.spin-result-rarity.uncommon  { background:#22c55e25;color:#4ade80;border:1px solid #22c55e50; }
.spin-result-rarity.rare      { background:#3b82f625;color:#60a5fa;border:1px solid #3b82f650; }
.spin-result-rarity.epic      { background:#d9770625;color:#c084fc;border:1px solid #d9770650; }
.spin-result-rarity.legendary { background:#f59e0b25;color:#fbbf24;border:1px solid #f59e0b50; }

.spin-result-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    top: -10px;
    animation: confettiFall linear forwards;
}
@keyframes confettiFall {
    to { transform: translateY(600px) rotate(720deg); opacity: 0; }
}
