/* ========================================
   The Wheel Components
   ======================================== */

.wheel-container {
    position: relative;
    width: 600px;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.5s ease;
}

/* The Frame (Outer Ring) */
.wheel-frame {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(from 0deg,
            transparent 0%,
            var(--glass-border) 10%,
            transparent 20%);
    box-shadow:
        0 0 50px rgba(0, 0, 0, 0.5),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    border: 20px solid rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wheel-frame::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: var(--grad-holo);
    opacity: 0.1;
    z-index: -1;
    filter: blur(10px);
}

/* The Spinning part */
.the-wheel {
    width: 90%;
    height: 90%;
    border-radius: 50%;
    /* Gradient handled by JS via conic-gradient */
    position: relative;
    transition: transform 4s cubic-bezier(0.1, 0, 0.2, 1);
    /* Fallback */
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    will-change: transform;
}

/* Wheel Segments Text */
.wheel-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: 0 0;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    pointer-events: none;
    width: 50%;
    /* Radius length */
    text-align: right;
    padding-right: 40px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.wheel-label span {
    display: block;
}

/* ========================================
   Center Cap
   ======================================== */
.center-cap {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90px;
    height: 90px;
    background: #0a0a12;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    border: 4px solid rgba(255, 255, 255, 0.1);
}

.cap-gem {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--grad-holo);
    box-shadow:
        inset 0 0 10px rgba(255, 255, 255, 0.5),
        0 0 20px var(--primary);
    animation: pulse 2s infinite alternate;
}

@keyframes pulse {
    from {
        transform: scale(1);
        filter: brightness(1);
    }

    to {
        transform: scale(1.1);
        filter: brightness(1.3);
    }
}

/* ========================================
   Pointer
   ======================================== */
/* ========================================
   Pointer (Arrow)
   ======================================== */
.pointer-wrapper {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 70px;
    z-index: 100;
    pointer-events: none;
    display: flex;
    justify-content: center;
}

.pointer-jewel {
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 45px solid #FF0050;
    position: relative;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.pointer-jewel::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -18px;
    width: 36px;
    height: 10px;
    background: #FFD700;
    /* Gold top */
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.pointer-jewel::after {
    content: '';
    position: absolute;
    top: -45px;
    left: -15px;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    z-index: -1;
}

/* Active Spin Effect (Motion Blur) */
.is-spinning .the-wheel {
    filter: blur(2px);
}

/* Ticking Animation for pointer */
.pointer-tick {
    animation: tick 0.1s ease-out;
}

@keyframes tick {
    0% {
        transform: translateX(-50%) rotate(0deg);
    }

    50% {
        transform: translateX(-50%) rotate(15deg);
    }

    100% {
        transform: translateX(-50%) rotate(0deg);
    }
}

/* Responsive Wheel */
@media (max-width: 768px) {
    .wheel-container {
        width: 320px;
        height: 320px;
    }

    .wheel-label {
        font-size: 0.8rem;
        padding-right: 20px;
    }
}