:root {
    --bg-color: #050510;
    --neon-blue: #00f3ff;
    --neon-pink: #bc13fe;
    --neon-green: #0aff0a;
    --neon-purple: #7a00ff;
    --text-color: #ffffff;
    --modal-bg: rgba(10, 10, 20, 0.95);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Orbitron', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Cyberpunk Grid Background */
.neon-grid {
    position: absolute;
    width: 200%;
    height: 200%;
    background-image:
        linear-gradient(var(--bg-color) 2px, transparent 2px),
        linear-gradient(90deg, var(--bg-color) 2px, transparent 2px),
        linear-gradient(rgba(188, 19, 254, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px, 50px 50px, 50px 50px, 50px 50px;
    background-position: -2px -2px, -2px -2px, -1px -1px, -1px -1px;
    transform: perspective(500px) rotateX(60deg) translateY(-100px) translateZ(-200px);
    animation: gridMove 20s linear infinite;
    z-index: -1;
    opacity: 0.6;
}

@keyframes gridMove {
    0% {
        transform: perspective(500px) rotateX(60deg) translateY(0) translateZ(-200px);
    }

    100% {
        transform: perspective(500px) rotateX(60deg) translateY(50px) translateZ(-200px);
    }
}

.main-container {
    width: 100%;
    max-width: 480px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    z-index: 10;
}

header {
    margin-bottom: 30px;
    position: relative;
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 5px;
    text-shadow: 0 0 5px var(--neon-blue), 0 0 10px var(--neon-blue);
}

.flicker {
    color: var(--neon-pink);
    text-shadow: 0 0 5px var(--neon-pink), 0 0 10px var(--neon-pink);
    animation: flicker 2s infinite;
}

@keyframes flicker {

    0%,
    18%,
    22%,
    25%,
    53%,
    57%,
    100% {
        opacity: 1;
    }

    20%,
    24%,
    55% {
        opacity: 0.4;
    }
}

.headline {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 5px;
    background: linear-gradient(to right, var(--neon-green), var(--neon-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 2px rgba(0, 243, 255, 0.5));
}

.sub-headline {
    color: var(--neon-purple);
    font-size: 0.9rem;
    letter-spacing: 2px;
}

/* Wheel Styles */
.wheel-container {
    position: relative;
    width: 320px;
    height: 320px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
}

.wheel {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid var(--neon-blue);
    box-shadow: 0 0 20px var(--neon-blue), inset 0 0 20px var(--neon-blue);
    transition: transform 5s cubic-bezier(0.17, 0.67, 0.12, 0.99);
    overflow: hidden;
    /* Base dark color */
    background: #000;
}

.wheel::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(var(--neon-pink) 0deg 45deg,
            #111 45deg 90deg,
            var(--neon-blue) 90deg 135deg,
            #111 135deg 180deg,
            var(--neon-purple) 180deg 225deg,
            #111 225deg 270deg,
            var(--neon-green) 270deg 315deg,
            #111 315deg 360deg);
    mask: radial-gradient(transparent 0, transparent 0, white 0);
}

.segment {
    position: absolute;
    width: 50%;
    height: 50%;
    transform-origin: bottom right;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(calc(45deg * var(--i) + 45deg));
}

.segment span {
    position: absolute;
    left: 60%;
    top: 80%;
    transform: rotate(45deg) translate(-50%, -50%);
    font-weight: 700;
    font-size: 0.8rem;
    color: #fff;
    text-shadow: 0 0 4px #000;
    width: 90px;
    text-align: center;
    letter-spacing: 1px;
}

/* Neon text for colored segments */
.segment:nth-child(1) span {
    text-shadow: 0 0 5px var(--neon-pink);
}

/* 10 FREE */
.segment:nth-child(7) span {
    text-shadow: 0 0 5px var(--neon-green);
}

/* ERROR */
/* etc */

.center-piece {
    position: absolute;
    width: 70px;
    height: 70px;
    background: #000;
    border-radius: 50%;
    border: 2px solid var(--neon-blue);
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 15px var(--neon-blue);
}

#spinBtn {
    background: none;
    border: none;
    font-weight: 900;
    color: var(--neon-blue);
    cursor: pointer;
    font-size: 1rem;
    text-shadow: 0 0 5px var(--neon-blue);
    letter-spacing: 1px;
}

.marker {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 40px solid var(--neon-pink);
    filter: drop-shadow(0 0 10px var(--neon-pink));
    z-index: 20;
}

.status-bars {
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    font-size: 0.7rem;
    color: #666;
    border-top: 1px solid #333;
    padding-top: 10px;
}

.green {
    color: var(--neon-green);
    text-shadow: 0 0 5px var(--neon-green);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
}

.modal.active {
    display: flex;
    animation: glitchIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.modal-content {
    background: #0a0a10;
    padding: 40px;
    border: 2px solid var(--neon-green);
    box-shadow: 0 0 30px rgba(10, 255, 10, 0.3), inset 0 0 20px rgba(10, 255, 10, 0.1);
    border-radius: 5px;
    /* sharper corners for cyberpunk */
    text-align: center;
    max-width: 90%;
    width: 380px;
    position: relative;
}

/* Corner accents for modal */
.modal-content::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: 20px;
    height: 20px;
    border-top: 4px solid var(--neon-green);
    border-left: 4px solid var(--neon-green);
}

.modal-content::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    border-bottom: 4px solid var(--neon-green);
    border-right: 4px solid var(--neon-green);
}

.win-title {
    color: var(--neon-green);
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-shadow: 0 0 10px var(--neon-green);
}

.win-amount {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 15px;
    color: #fff;
    text-shadow: 2px 2px 0px var(--neon-pink), -2px -2px 0px var(--neon-blue);
    animation: shake 0.5s infinite;
}

.currency {
    font-size: 1.5rem;
    vertical-align: super;
    color: var(--neon-blue);
}

.win-desc {
    color: #ccc;
    margin-bottom: 30px;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
}

.cta-button {
    background: transparent;
    color: var(--neon-green);
    text-decoration: none;
    padding: 15px 40px;
    border: 2px solid var(--neon-green);
    font-weight: 700;
    font-size: 1.2rem;
    display: inline-block;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    text-shadow: 0 0 5px var(--neon-green);
    box-shadow: 0 0 10px rgba(10, 255, 10, 0.2);
}

.cta-button:hover {
    background: var(--neon-green);
    color: #000;
    box-shadow: 0 0 30px var(--neon-green);
}

.win-instruction {
    font-size: 0.7rem;
    color: #666;
    margin-bottom: 10px;
}

/* Animations */
@keyframes glitchIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    20% {
        clip-path: polygon(0 10%, 100% 0, 100% 90%, 0 100%);
        transform: translate(-10px, 5px);
    }

    40% {
        clip-path: polygon(10% 0, 90% 0, 90% 100%, 0 90%);
        transform: translate(10px, -5px);
    }

    60% {
        clip-path: polygon(0 0, 100% 10%, 100% 100%, 10% 90%);
    }

    80% {
        transform: translate(-5px, 2px);
    }

    100% {
        transform: scale(1);
        opacity: 1;
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

@keyframes shake {
    0% {
        transform: translate(1px, 1px) rotate(0deg);
    }

    10% {
        transform: translate(-1px, -2px) rotate(-1deg);
    }

    20% {
        transform: translate(-3px, 0px) rotate(1deg);
    }

    30% {
        transform: translate(3px, 2px) rotate(0deg);
    }

    40% {
        transform: translate(1px, -1px) rotate(1deg);
    }

    50% {
        transform: translate(-1px, 2px) rotate(-1deg);
    }

    60% {
        transform: translate(-3px, 1px) rotate(0deg);
    }

    70% {
        transform: translate(3px, 1px) rotate(-1deg);
    }

    80% {
        transform: translate(-1px, -1px) rotate(1deg);
    }

    90% {
        transform: translate(1px, 2px) rotate(0deg);
    }

    100% {
        transform: translate(1px, -2px) rotate(-1deg);
    }
}