/* === Wheel Container === */
.wheel-container {
    position: relative;
    width: min(280px, calc(100vw - 4rem));
    aspect-ratio: 1;
    margin: 0 auto;
}

@media (min-width: 380px) {
    .wheel-container { width: 320px; }
}
@media (min-width: 480px) {
    .wheel-container { width: 360px; }
}

/* === Outer Ring === */
.wheel-outer-ring {
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    border: 5px solid var(--accent-gold);
    box-shadow: 0 0 24px var(--glow-gold), inset 0 0 24px var(--glow-gold);
    animation: ringPulse 3s ease-in-out infinite;
    pointer-events: none;
}

/* === Pointer === */
.wheel-pointer-wrap {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.6));
    pointer-events: none;
}

.wheel-pointer {
    width: 0;
    height: 0;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-top: 32px solid var(--accent-gold);
}

/* === Wheel Disc ===
   IMPORTANT: background is set via inline style AND data-bg attribute.
   NO CSS transitions on this element — all animation is done via JS.
   This prevents the browser from ever recalculating/dropping the background.
*/
.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    box-shadow:
        0 0 0 5px var(--bg-primary),
        0 0 0 8px var(--accent-gold-dark),
        0 10px 50px rgba(0,0,0,0.5);
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    will-change: transform;
}

.wheel:active {
    cursor: grabbing;
}

/* Kinetic press glow — NO filter:brightness, uses box-shadow instead */
.wheel.charging {
    box-shadow:
        0 0 0 5px var(--bg-primary),
        0 0 0 8px var(--accent-gold),
        0 0 40px var(--glow-gold),
        0 0 80px var(--glow-gold);
}

/* === Segment Labels === */
.seg-label {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    pointer-events: none;
    white-space: nowrap;
    line-height: 1;

    font-family: var(--font);
    font-size: 1.4rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8), 0 0 20px rgba(0,0,0,0.5);

    --angle: calc(var(--i) * 45deg + 22.5deg);
    --rad: 60px;
    transform:
        translate(-50%, -50%)
        rotate(var(--angle))
        translateY(calc(var(--rad) * -1))
        rotate(calc(var(--angle) * -1));
}

@media (min-width: 380px) {
    .seg-label { font-size: 1.6rem; --rad: 68px; }
}
@media (min-width: 480px) {
    .seg-label { font-size: 1.8rem; --rad: 78px; }
}

/* === Center Hub === */
.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    border: 4px solid var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.8rem;
    color: var(--accent-gold);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 16px var(--glow-gold);
    z-index: 5;
    pointer-events: none;
}

/* === Charge Section === */
.charge-section {
    width: 100%;
    max-width: 380px;
    margin-top: 1.5rem;
    text-align: center;
    min-height: 56px;
}

.charge-hint {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.charge-hint.active {
    color: var(--accent-gold);
}

.charge-bar-wrap {
    width: 100%;
    height: 10px;
    background: var(--bg-elevated);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.charge-bar-wrap.visible {
    opacity: 1;
}

.charge-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-pink), #FF1744);
    border-radius: 5px;
    box-shadow: 0 0 12px var(--glow-gold);
}

.charge-level {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent-gold);
    opacity: 0;
    transition: opacity 0.2s;
    min-height: 1.5em;
}

.charge-level.visible {
    opacity: 1;
}

/* === Animations === */
@keyframes ringPulse {
    0%, 100% { box-shadow: 0 0 20px var(--glow-gold), inset 0 0 20px var(--glow-gold); }
    50% { box-shadow: 0 0 40px var(--glow-gold), inset 0 0 40px var(--glow-gold); }
}
