:root {
    --primary: #FFD700;
    --primary-glow: #ffdb1a;
    --secondary: #9d00ff;
    --dark-bg: #0a0a0a;
    --wheel-bg: #1a1a1a;
    --text: #ffffff;
    --modal-bg: rgba(20, 20, 20, 0.95);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--dark-bg);
    /* PNG Gambling Theme: Black, Gold, Red */
    background-image:
        /* Subtle texture */
        repeating-linear-gradient(45deg, rgba(200, 16, 46, 0.05) 0px, rgba(200, 16, 46, 0.05) 2px, transparent 2px, transparent 10px),
        /* Gold Glows */
        radial-gradient(circle at 15% 25%, rgba(255, 215, 0, 0.15) 0%, transparent 45%),
        radial-gradient(circle at 85% 75%, rgba(255, 215, 0, 0.15) 0%, transparent 45%),
        /* Deep dark base */
        linear-gradient(to bottom, #0a0a0a, #1a0505);
    background-attachment: fixed;
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.main-container {
    width: 100%;
    max-width: 480px;
    /* Mobile focused */
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

header {
    margin-bottom: 30px;
}

.logo {
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.headline {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 10px;
    background: linear-gradient(to right, #fff, #ccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sub-headline {
    color: #aaa;
    font-size: 1rem;
}

/* Wheel Styles */
.wheel-container {
    position: relative;
    width: 320px;
    height: 320px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.wheel {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(#2a2a2a 0deg 45deg,
            #222 45deg 90deg,
            #2a2a2a 90deg 135deg,
            #222 135deg 180deg,
            #2a2a2a 180deg 225deg,
            #222 225deg 270deg,
            #2a2a2a 270deg 315deg,
            #222 315deg 360deg);
    border: 4px solid var(--primary);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
    transition: transform 5s cubic-bezier(0.17, 0.67, 0.12, 0.99);
    /* Custom easing */
    overflow: hidden;
}

.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));
    clip-path: polygon(0 0, 100% 0, 100% 100%);
    /* Triangle shape approx */
}

/* Better Segment Text Positioning */
.segment span {
    position: absolute;
    left: 60%;
    top: 80%;
    transform: rotate(45deg) translate(-50%, -50%);
    transform-origin: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    text-shadow: 1px 1px 2px #000;
    white-space: nowrap;
    width: 100px;
    text-align: center;
}

/* Correcting visual segments with colors */
.wheel::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(#9d00ff 0deg 45deg,
            /* 10 FREE */
            #333 45deg 90deg,
            /* Try Again */
            #00c3ff 90deg 135deg,
            /* 500 Bonus */
            #ff0055 135deg 180deg,
            /* 5 Free */
            #ffd700 180deg 225deg,
            /* Jackpot */
            #00ff88 225deg 270deg,
            /* 20 Free */
            #333 270deg 315deg,
            /* No Luck */
            #ff9900 315deg 360deg
            /* 100 Free */
        );
    mask: radial-gradient(transparent 0, transparent 0, white 0);
    /* Full circle */
    z-index: -1;
}

.segment:nth-child(even) span {
    color: #fff;
}

.segment:nth-child(odd) span {
    color: #000;
    font-weight: 900;
}

.segment:nth-child(1) span {
    color: #fff;
}

/* 10 Free on purple */

.center-piece {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 15px var(--primary-glow);
    border: 4px solid #fff;
}

#spinBtn {
    background: none;
    border: none;
    font-weight: 900;
    color: #000;
    cursor: pointer;
    font-size: 0.9rem;
}

.marker {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 40px;
    background: #fff;
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    z-index: 20;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.trusted-badges {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    opacity: 0.6;
}

.badge {
    font-size: 0.7rem;
    border: 1px solid #555;
    padding: 5px 10px;
    border-radius: 20px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: linear-gradient(135deg, #2a0044, #000);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    border: 2px solid var(--primary);
    box-shadow: 0 0 50px rgba(157, 0, 255, 0.4);
    max-width: 90%;
    width: 350px;
    position: relative;
    overflow: hidden;
    animation: popIn 0.5s cubic-bezier(0.17, 0.67, 0.43, 1.4);
}

.win-title {
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.win-amount {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 10px;
    color: #fff;
    text-shadow: 0 0 20px var(--primary);
}

.active .win-amount {
    animation: pulse 1s infinite;
}

.currency {
    font-size: 1.5rem;
    vertical-align: super;
    color: var(--primary);
}

.win-desc {
    color: #ccc;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.cta-button {
    background: #25D366;
    /* WhatsApp Green */
    color: white;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.6);
}

.win-instruction {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 15px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes popIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Simple Confetti */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary);
    animation: fall linear forwards;
}

@keyframes fall {
    to {
        transform: translateY(500px) rotate(720deg);
    }
}