:root {
    --wb-purple: #cb11ab;
    --wb-purple-glow: rgba(203, 17, 171, 0.6);
    --wb-pink: #ff13b0;
    --bg-dark: #0f0a18;
    --text-main: #ffffff;
    --text-meta: #b0a3c4;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Background effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
}

.blob-1 {
    width: 300px;
    height: 300px;
    background: var(--wb-purple);
    top: -100px;
    right: -100px;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: #4b0082;
    bottom: -150px;
    left: -150px;
}

.blob-3 {
    width: 200px;
    height: 200px;
    background: var(--wb-pink);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.3;
}

/* Layout */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

header {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 10px 0 20px;
}

.logo-container {
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 20px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.wb-logo {
    display: block;
    height: 40px;
}

main {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.promo-text {
    text-align: center;
    width: 100%;
}

.glow-text {
    font-size: 28px;
    font-weight: 900;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 0 10px var(--wb-purple-glow), 0 0 20px var(--wb-purple);
    margin-bottom: 15px;
    line-height: 1.2;
}

.subtitle {
    font-size: 14px;
    color: var(--text-meta);
    margin-bottom: 20px;
    font-weight: 400;
}

.timer-container {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: rgba(203, 17, 171, 0.15);
    padding: 10px 20px;
    border-radius: 15px;
    border: 1px solid var(--wb-purple);
    box-shadow: 0 0 15px var(--wb-purple-glow);
}

.timer-container span {
    font-size: 12px;
    color: #fff;
    opacity: 0.8;
}

.timer {
    font-size: 28px;
    font-weight: 800;
    color: var(--wb-pink);
    letter-spacing: 2px;
    font-variant-numeric: tabular-nums;
}

.wheel-section {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 30px 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.wheel-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 20px;
    text-align: center;
    color: #fff;
}

.wheel-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 15px var(--wb-purple-glow));
}

.wheel-pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 40px;
    background: linear-gradient(135deg, #fff, #ffd700);
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    z-index: 10;
    filter: drop-shadow(0 5px 5px rgba(0,0,0,0.5));
}

canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.1), 0 0 0 12px var(--wb-purple);
    transition: transform 5s cubic-bezier(0.2, 0.8, 0.2, 1); /* Fallback, logic in JS */
}

.instruction {
    text-align: center;
    font-size: 14px;
    color: var(--text-meta);
    margin-bottom: 25px;
    line-height: 1.4;
}

.spin-btn {
    position: relative;
    background: linear-gradient(90deg, var(--wb-purple), var(--wb-pink));
    border: none;
    border-radius: 30px;
    padding: 15px 40px;
    cursor: pointer;
    overflow: hidden;
    transform: scale(1);
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 5px 20px var(--wb-purple-glow);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80%;
}

.spin-btn:active {
    transform: scale(0.95);
}

.btn-text {
    position: relative;
    z-index: 2;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 60%);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1;
}

.spin-btn:hover .btn-glow {
    opacity: 1;
    transform: scale(1);
}

.spin-btn:disabled {
    filter: grayscale(0.8);
    cursor: not-allowed;
    transform: none;
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: linear-gradient(145deg, rgba(203, 17, 171, 0.1), rgba(0, 0, 0, 0.6));
    border: 1px solid var(--wb-purple);
    border-radius: 30px;
    padding: 40px 20px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 50px rgba(203, 17, 171, 0.4);
    position: relative;
    transform: scale(1);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.hidden .modal-content {
    transform: scale(0.8);
}

.modal-header h2 {
    font-size: 28px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 0 0 10px var(--wb-pink);
}

.win-prize-text {
    font-size: 18px;
    color: #e0d4f5;
    margin-bottom: 30px;
}

.prize-highlight {
    display: block;
    font-size: 32px;
    font-weight: 900;
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
    margin-top: 10px;
}

.claim-instruction {
    font-size: 14px;
    line-height: 1.5;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.download-btn {
    display: inline-block;
    background: #fff;
    color: var(--wb-purple);
    text-decoration: none;
    font-size: 18px;
    font-weight: 800;
    padding: 15px 30px;
    border-radius: 25px;
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
    margin-bottom: 15px;
    width: 100%;
}

.download-subtext {
    font-size: 12px;
    color: var(--text-meta);
}

@media (max-width: 400px) {
    .wheel-wrapper {
        width: 280px;
        height: 280px;
    }
    .glow-text {
        font-size: 24px;
    }
}

/* Confetti */
.confetti-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
    border-radius: 30px;
}

.confetti-piece {
    position: absolute;
    width: 10px; height: 20px;
    top: -20px;
    opacity: 0;
    animation: fall linear forwards;
}

@keyframes fall {
    0% { top: -20px; opacity: 1; transform: rotate(0deg) translateX(0); }
    100% { top: 100%; opacity: 0; transform: rotate(720deg) translateX(50px); }
}

