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

:root {
    --primary-blue: #87CEEB;
    --primary-yellow: #FFD700;
    --primary-gray: #808080;
    --jackpot-red: #DC143C;
    --dark-bg: #1a1a2e;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    padding: 20px;
}

.container {
    text-align: center;
    max-width: 600px;
    width: 100%;
}

.header {
    margin-bottom: 30px;
}

.header h1 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FFD700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    margin-bottom: 10px;
    letter-spacing: 3px;
}

.header p {
    color: rgba(255,255,255,0.8);
    font-size: 1.1rem;
    font-weight: 300;
}

.wheel-section {
    position: relative;
    margin-bottom: 40px;
}

.wheel-container {
    position: relative;
    width: 550px;
    height: 550px;
    margin: 0 auto;
}

.wheel-outer-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(180deg, #ffd700 0%, #ff8c00 30%, #ffd700 50%, #ff8c00 70%, #ffd700 100%);
    box-shadow: 
        0 0 40px rgba(255, 215, 0, 0.6),
        0 0 80px rgba(255, 140, 0, 0.3),
        inset 0 0 30px rgba(255,255,255,0.4);
    padding: 10px;
}

.wheel-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #1a1a2e;
    padding: 5px;
}

#wheelCanvas {
    border-radius: 50%;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.3);
}

.pointer {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.5));
}

.pointer::before {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-top: 50px solid #DC143C;
}

.pointer::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 32px solid #ff4757;
}

.form-container {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    padding: 40px 35px;
    border-radius: 24px;
    max-width: 420px;
    margin: 0 auto;
    box-shadow: 
        0 25px 50px rgba(0,0,0,0.25),
        0 0 0 1px rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
    justify-content: center;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea, #764ba2, #DC143C, #FFD700);
}

.form-container h2 {
    color: #1a1a2e;
    margin-bottom: 8px;
    font-size: 1.8rem;
    font-weight: 700;
}

.form-subtitle {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e8e8e8;
    border-radius: 14px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    background: #fff;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.form-group input::placeholder {
    color: #aaa;
}

.spin-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.spin-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.spin-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.spin-btn:disabled {
    background: linear-gradient(135deg, #ccc 0%, #aaa 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.spin-btn.played {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.btn-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.modal-overlay {
    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(10px);
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: linear-gradient(145deg, #1a1a2e 0%, #2d2d44 100%);
    padding: 0;
    border-radius: 30px;
    text-align: center;
    max-width: 450px;
    width: 100%;
    animation: modalSlideIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 
        0 30px 100px rgba(0,0,0,0.6),
        0 0 0 2px rgba(255,215,0,0.3),
        0 0 100px rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: hidden;
}

.modal-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(255,215,0,0.1), transparent, rgba(220,20,60,0.1), transparent);
    animation: rotateGlow 4s linear infinite;
    pointer-events: none;
}

@keyframes rotateGlow {
    to { transform: rotate(360deg); }
}

.modal-content {
    position: relative;
    z-index: 1;
    padding: 50px 40px;
    background: linear-gradient(145deg, rgba(26,26,46,0.95) 0%, rgba(45,45,68,0.95) 100%);
}

.modal-header {
    margin-bottom: 30px;
}

.modal-stars {
    font-size: 2rem;
    margin-bottom: 10px;
    animation: twinkle 1s ease infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.modal h2 {
    color: #fff;
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.prize-display {
    margin: 30px 0;
    position: relative;
}

.prize-badge {
    display: inline-block;
    position: relative;
}

.prize-text {
    font-size: 2.5rem;
    font-weight: 800;
    padding: 25px 40px;
    border-radius: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: inline-block;
    box-shadow: 
        0 15px 40px rgba(102, 126, 234, 0.5),
        0 0 0 4px rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
}

.prize-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shine 2s ease infinite;
}

@keyframes shine {
    to { left: 100%; }
}

.prize-text.jackpot {
    background: linear-gradient(135deg, #DC143C 0%, #ff4757 50%, #DC143C 100%);
    background-size: 200% 200%;
    animation: jackpotPulse 1s ease infinite;
    box-shadow: 
        0 15px 50px rgba(220, 20, 60, 0.6),
        0 0 80px rgba(220, 20, 60, 0.4),
        0 0 0 4px rgba(255,215,0,0.5);
}

@keyframes jackpotPulse {
    0%, 100% {
        background-position: 0% 50%;
        transform: scale(1);
    }
    50% {
        background-position: 100% 50%;
        transform: scale(1.03);
    }
}

.prize-ribbon {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #FFD700;
    color: #1a1a2e;
    padding: 5px 15px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 5px;
    transform: rotate(15deg);
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

.modal-message {
    color: rgba(255,255,255,0.8);
    font-size: 1.1rem;
    line-height: 1.7;
    margin: 25px 0;
}

.modal-footer {
    margin-top: 30px;
}

.close-btn {
    padding: 18px 60px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1a1a2e;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4);
}

.close-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.5);
}

@keyframes modalSlideIn {
    0% {
        transform: scale(0.3) translateY(100px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.error-message {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: white;
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: none;
    font-weight: 500;
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.3);
}

.error-message.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

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

.particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    animation: float 15s infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

.footer-text {
    margin-top: 30px;
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    font-weight: 300;
}

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

.confetti-piece {
    position: absolute;
    width: 12px;
    height: 12px;
    top: -20px;
}

.confetti-piece.circle {
    border-radius: 50%;
}

.confetti-piece.square {
    border-radius: 2px;
}

.confetti-piece.ribbon {
    width: 8px;
    height: 20px;
    border-radius: 2px;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(1440deg) scale(0.3);
        opacity: 0;
    }
}

@keyframes confettiSway {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(30px); }
    75% { transform: translateX(-30px); }
}



@media (max-width: 768px) {
    body {
        padding: 10px;
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
    
    .container {
        padding: 5px;
    }
    
    .header {
        margin-bottom: 15px;
    }
    
    .header h1 {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }
    
    .header p {
        font-size: 0.9rem;
    }
    
    .wheel-section {
        margin-bottom: 20px;
    }
    
    .wheel-container {
        width: calc(100vw - 40px);
        height: calc(100vw - 40px);
        max-width: 500px;
        max-height: 500px;
    }
    
    .wheel-outer-ring {
        padding: 8px;
    }
    
    .pointer::before {
        border-left: 20px solid transparent;
        border-right: 20px solid transparent;
        border-top: 42px solid #DC143C;
    }
    
    .pointer::after {
        border-left: 12px solid transparent;
        border-right: 12px solid transparent;
        border-top: 26px solid #ff4757;
    }
    
    
  .form-container {
    padding: 25px 20px;
    border-radius: 18px;
    margin: 0 auto;
    margin-left: 50px;
    margin-right: 30px;
  }


    
    .form-container h2 {
        font-size: 1.4rem;
        margin-bottom: 5px;
    }
    
    .form-subtitle {
        font-size: 0.85rem;
        margin-bottom: 20px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group label {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }
    
    .form-group input {
        padding: 14px 16px;
        font-size: 0.95rem;
        border-radius: 12px;
    }
    
    .spin-btn {
        padding: 16px;
        font-size: 1rem;
        border-radius: 12px;
        letter-spacing: 1px;
    }
    
    .footer-text {
        margin-top: 20px;
        font-size: 0.75rem;
    }
    
    .modal {
        border-radius: 20px;
        margin: 10px;
    }
    
    .modal-content {
        padding: 35px 20px;
    }
    
    .modal-header {
        margin-bottom: 20px;
    }
    
    .modal-stars {
        font-size: 1.5rem;
    }
    
    .modal h2 {
        font-size: 1.6rem;
    }
    
    .prize-display {
        margin: 20px 0;
    }
    
    .prize-text {
        font-size: 1.5rem;
        padding: 18px 25px;
        border-radius: 15px;
    }
    
    .prize-ribbon {
        font-size: 0.6rem;
        padding: 4px 10px;
        top: -8px;
        right: -8px;
    }
    
    .modal-message {
        font-size: 0.95rem;
        margin: 15px 0;
    }
    
    .modal-footer {
        margin-top: 20px;
    }
    
    .close-btn {
        padding: 14px 40px;
        font-size: 0.95rem;
        border-radius: 10px;
    }
}

@media (max-width: 400px) {
    .header h1 {
        font-size: 1.6rem;
    }
    
    .header p {
        font-size: 0.85rem;
    }
    
    .wheel-container {
        width: calc(100vw - 30px);
        height: calc(100vw - 30px);
        max-width: 450px;
        max-height: 450px;
    }
    
    .form-container {
        padding: 20px 15px;
                margin: 0px 20px
    }
    
    .form-container h2 {
        font-size: 1.3rem;
    }
    
    .form-group input {
        padding: 12px 14px;
    }
    
    .spin-btn {
        padding: 14px;
        font-size: 0.9rem;
    }
    
    .prize-text {
        font-size: 1.3rem;
        padding: 15px 20px;
    }
    
    .modal h2 {
        font-size: 1.4rem;
    }
    
    .close-btn {
        padding: 12px 30px;
        font-size: 0.85rem;
    }
}
