/**
 * YESORNOWHEEL.NET - Wheel Stylesheet
 * High-performance Game Show & Modern Arcade Wheel, Pointer, and Spin Controls.
 */

.wheel-stage {
    padding: 10px 16px 36px;
    width: 100%;
}

.app-layout-grid {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Wheel Arena */
.wheel-arena {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 100%;
}

/* Viewport for Wheel & Pointer */
.wheel-viewport {
    position: relative;
    width: 100%;
    max-width: 480px;
    aspect-ratio: 1 / 1;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-user-select: none;
}

/* Radial Glow Behind Wheel */
.wheel-glow-ring {
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, rgba(99, 102, 241, 0.05) 60%, transparent 80%);
    opacity: 0.6;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}
.wheel-viewport.is-spinning .wheel-glow-ring {
    opacity: 0.9;
    animation: pulseGlow 1.5s infinite alternate ease-in-out;
}

@keyframes pulseGlow {
    from { transform: scale(0.98); opacity: 0.6; }
    to { transform: scale(1.03); opacity: 1; }
}

/* Outer Arcade Bezel Ring with metallic styling */
.wheel-bezel {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 8px solid rgba(255, 255, 255, 0.12);
    box-shadow: 
        inset 0 0 16px rgba(0, 0, 0, 0.8),
        0 8px 24px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    pointer-events: none;
    z-index: 2;
}

[data-theme="light"] .wheel-bezel {
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 
        inset 0 0 12px rgba(0, 0, 0, 0.15),
        0 8px 20px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.06);
}

/* Main Wheel Canvas */
.wheel-canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: block;
    cursor: pointer;
    touch-action: none;
    z-index: 1;
}

/* Particles & Confetti Canvas Overlay */
.effects-canvas {
    position: absolute;
    inset: -30px;
    width: calc(100% + 60px);
    height: calc(100% + 60px);
    pointer-events: none;
    z-index: 10;
}

/* Precision Pointer at 12 o'clock */
.wheel-pointer-container {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 38px;
    height: 48px;
    z-index: 20;
    pointer-events: none;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.7));
    transform-origin: 50% 12px;
    transition: transform 0.08s ease-out;
}

/* Precision Needle Shape */
.wheel-pointer-needle {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 70%, #b45309 100%);
    clip-path: polygon(15% 0%, 85% 0%, 100% 30%, 50% 100%, 0% 30%);
    border-radius: 4px 4px 0 0;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.6);
}

/* Ruby needle style option */
[data-pointer="ruby"] .wheel-pointer-needle {
    background: linear-gradient(180deg, #f43f5e 0%, #e11d48 70%, #9f1239 100%);
}

/* Cyber needle style option */
[data-pointer="cyber"] .wheel-pointer-needle {
    background: linear-gradient(180deg, #38bdf8 0%, #06b6d4 70%, #0891b2 100%);
}

/* Dynamic Needle Tick Reaction */
.wheel-pointer-container.tick {
    animation: pointerTick 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pointerTick {
    0% { transform: translateX(-50%) rotate(0deg); }
    35% { transform: translateX(-50%) rotate(-18deg); }
    70% { transform: translateX(-50%) rotate(6deg); }
    100% { transform: translateX(-50%) rotate(0deg); }
}

/* Center Hub / Cap Button */
.wheel-center-hub {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 4px solid #ffffff;
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.6),
        0 0 12px rgba(99, 102, 241, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    padding: 0;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.wheel-center-hub:hover {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.8),
        0 0 18px rgba(99, 102, 241, 0.6);
}
.wheel-center-hub:active {
    transform: translate(-50%, -50%) scale(0.96);
}

.hub-inner {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.hub-label {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Action Controls Row (Primary SPIN + Manual Stop) */
.action-controls-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
    max-width: 480px;
    margin-bottom: 16px;
}

/* Primary Game Show SPIN Button */
.btn-primary-spin {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 50%, #06b6d4 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-full);
    padding: 18px 36px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 
        0 6px 20px rgba(99, 102, 241, 0.45),
        inset 0 1px 2px rgba(255, 255, 255, 0.4);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
    position: relative;
    overflow: hidden;
    user-select: none;
    min-height: 64px;
}

.btn-primary-spin:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 
        0 10px 28px rgba(99, 102, 241, 0.6),
        inset 0 1px 2px rgba(255, 255, 255, 0.5);
    filter: brightness(1.08);
}

.btn-primary-spin:active:not(:disabled) {
    transform: translateY(2px);
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.4);
}

.btn-primary-spin:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary-spin.is-spinning {
    background: linear-gradient(135deg, #1e293b, #334155);
    color: var(--text-secondary);
    box-shadow: none;
}

.spin-icon {
    font-size: 1.4rem;
}

/* Manual Stop Button */
.btn-manual-stop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-full);
    padding: 16px 28px;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
    min-height: 64px;
    animation: pulseStop 1.2s infinite alternate ease-in-out;
}
.btn-manual-stop:hover {
    filter: brightness(1.1);
}

@keyframes pulseStop {
    from { transform: scale(1); }
    to { transform: scale(1.04); }
}

/* Quick Modes & Indicators Bar */
.quick-modes-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

.segmented-control {
    display: inline-flex;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 3px;
}

.segmented-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.segmented-btn:hover:not(.active) {
    color: var(--text-primary);
}

.segmented-btn.active {
    background: var(--bg-elevated);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.quick-action-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.quick-action-pill:hover {
    color: var(--text-primary);
    border-color: var(--border-strong);
}
.quick-action-pill[aria-pressed="true"] {
    background: var(--accent-glow);
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

/* Fullscreen Mode adjustments */
:fullscreen .wheel-viewport,
:-webkit-full-screen .wheel-viewport {
    max-width: 75vh;
}
:fullscreen .site-body,
:-webkit-full-screen .site-body {
    background-color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}
