* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Righteous', sans-serif;
    background: radial-gradient(circle at 50% 50%,
        #FF6347 0%,
        #FF6347 10%,
        #FFD700 10%,
        #FFD700 20%,
        #FF6347 20%,
        #FF6347 30%,
        #A4C639 30%,
        #A4C639 40%,
        #008B8B 40%,
        #008B8B 50%,
        #FF69B4 50%,
        #FF69B4 60%,
        #9370DB 60%,
        #9370DB 70%,
        #CC5500 70%,
        #CC5500 80%,
        #222 80%
    );
    background-attachment: fixed;
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
}

/* Starburst background overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-conic-gradient(
        from 0deg,
        rgba(255, 215, 0, 0.1) 0deg,
        rgba(255, 215, 0, 0) 10deg,
        rgba(255, 215, 0, 0.1) 20deg
    );
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

.title {
    font-family: 'Alfa Slab One', sans-serif;
    font-size: clamp(32px, 8vw, 72px);
    color: #FFD700;
    text-shadow:
        4px 4px 0px #CC5500,
        8px 8px 0px #000,
        0 0 20px rgba(255, 215, 0, 0.8),
        0 0 40px rgba(255, 215, 0, 0.5);
    letter-spacing: 4px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.subtitle {
    font-size: clamp(14px, 3vw, 24px);
    color: #FFD700;
    text-shadow: 2px 2px 4px #000;
    margin-top: 10px;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

.input-section {
    background: rgba(0, 0, 0, 0.7);
    border: 5px solid #FFD700;
    border-radius: 20px;
    padding: 30px;
    box-shadow:
        0 0 20px rgba(255, 215, 0, 0.6),
        inset 0 0 20px rgba(255, 215, 0, 0.2);
}

.input-section label {
    display: block;
    font-size: 20px;
    color: #FFD700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px #000;
}

#options-input {
    width: 100%;
    font-family: 'Bungee', sans-serif;
    font-size: 16px;
    padding: 15px;
    border: 3px solid #CC5500;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    resize: vertical;
    margin-bottom: 20px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

#options-input:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow:
        inset 0 0 10px rgba(0, 0, 0, 0.3),
        0 0 15px rgba(255, 215, 0, 0.8);
}

.spin-button {
    width: 100%;
    font-family: 'Alfa Slab One', sans-serif;
    font-size: clamp(18px, 4vw, 28px);
    padding: 20px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    border: 5px solid #CC5500;
    border-radius: 15px;
    cursor: pointer;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.5);
    box-shadow:
        0 8px 0 #995500,
        0 10px 20px rgba(0, 0, 0, 0.5),
        inset 0 0 20px rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.spin-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.6) 50%,
        transparent 70%
    );
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.spin-button:hover:not(:disabled) {
    transform: translateY(-4px);
    box-shadow:
        0 12px 0 #995500,
        0 14px 25px rgba(0, 0, 0, 0.5),
        inset 0 0 30px rgba(255, 255, 255, 0.4),
        0 0 30px rgba(255, 215, 0, 0.8);
}

.spin-button:active:not(:disabled) {
    transform: translateY(4px);
    box-shadow:
        0 4px 0 #995500,
        0 6px 15px rgba(0, 0, 0, 0.5),
        inset 0 0 20px rgba(255, 255, 255, 0.3);
}

.spin-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.spin-button.spinning .button-text {
    animation: spin-text 1s linear infinite;
}

@keyframes spin-text {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.wheel-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pointer {
    font-size: 48px;
    color: #FFD700;
    text-shadow:
        0 0 10px #FF6347,
        0 0 20px #FF6347,
        2px 2px 4px #000;
    margin-bottom: -10px;
    z-index: 10;
    animation: pointer-bounce 1s ease-in-out infinite;
}

@keyframes pointer-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

#wheel-canvas {
    border: 8px solid #FFD700;
    border-radius: 50%;
    background: #000;
    box-shadow:
        0 0 30px rgba(255, 215, 0, 0.8),
        0 0 60px rgba(255, 215, 0, 0.4),
        inset 0 0 30px rgba(255, 215, 0, 0.2);
    max-width: 100%;
    height: auto;
}

.winner-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    border: 6px solid #FFD700;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow:
        0 0 40px rgba(255, 215, 0, 1),
        inset 0 0 20px rgba(255, 215, 0, 0.3);
    z-index: 20;
    animation: winner-popup 0.5s ease-out;
    min-width: 300px;
}

@keyframes winner-popup {
    0% { transform: translate(-50%, -50%) scale(0); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.winner-display.hidden {
    display: none;
}

.winner-title {
    font-family: 'Alfa Slab One', sans-serif;
    font-size: 36px;
    color: #FFD700;
    text-shadow:
        3px 3px 0px #CC5500,
        6px 6px 0px #000;
    margin-bottom: 20px;
}

.winner-text {
    font-family: 'Bungee', sans-serif;
    font-size: 28px;
    color: #FF69B4;
    text-shadow: 2px 2px 4px #000;
}

.confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 15;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -10px;
    animation: confetti-fall 3s linear forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}
