* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}

body {
    background: linear-gradient(135deg, #050C1C 0%, #0a1628 40%, #0d2137 100%);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-container {
    width: 100%;
    max-width: 480px;
    height: 100vh;
    height: 100dvh;
    position: relative;
    overflow: hidden;
}

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

.particles .dot {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    animation: floatUp 6s infinite ease-in;
}

@keyframes floatUp {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 0.5; }
    100% { transform: translateY(-20px) scale(1); opacity: 0; }
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
    transform: scale(0.95);
    z-index: 1;
}

.screen.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.welcome-content,
.register-content,
.wheel-content,
.prize-content,
.quiz-content,
.quiz-result-content,
.thankyou-content {
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 2;
}

.welcome-logo {
    height: 44px;
    width: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.2));
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.welcome-subtitle {
    font-size: 1.1rem;
    color: #94a3b8;
    margin-bottom: 2rem;
}

.prize-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.prize-preview-item {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.prize-preview-item i {
    color: #FFD700;
    font-size: 0.75rem;
}

.screen-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.25rem;
}

.screen-subtitle {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 1.5rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    max-width: 320px;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #050C1C;
    border: none;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-glow {
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.5); }
}

.btn-back-website {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.7rem 1.5rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-back-website:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    max-width: 320px;
    padding: 0.85rem 2rem;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.75rem;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 0.35rem;
    padding-left: 0.25rem;
}

.form-group label i {
    margin-right: 0.35rem;
    color: #FFD700;
    width: 14px;
}

.form-group input {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    outline: none;
}

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

.form-group input:focus,
.form-group select:focus {
    border-color: #FFD700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.form-group select {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    cursor: pointer;
}

.form-group select option {
    background: #0a1628;
    color: #fff;
}

.form-group input.has-error,
.form-group select.has-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.field-error {
    font-size: 0.75rem;
    color: #ef4444;
    margin-top: 0.3rem;
    padding-left: 0.25rem;
    min-height: 0;
    transition: all 0.2s ease;
}

.field-error:empty {
    display: none;
}

.required-star {
    color: #ef4444;
    font-weight: 400;
}

.wheel-wrapper {
    position: relative;
    display: inline-block;
    margin: 1rem auto 1.5rem;
}

.wheel-pointer {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    font-size: 2.5rem;
    color: #FFD700;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
    animation: pointerBounce 1.5s ease-in-out infinite;
}

@keyframes pointerBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(4px); }
}

.wheel-pointer.spinning {
    animation: none;
}

#wheelCanvas {
    border-radius: 50%;
    box-shadow: 0 0 0 6px #FFD700, 0 0 0 10px rgba(255, 215, 0, 0.3), 0 0 60px rgba(255, 215, 0, 0.15);
}

.spin-hint {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.75rem;
}

.prize-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #050C1C;
    animation: prizePopIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes prizePopIn {
    0% { transform: scale(0) rotate(-180deg); }
    100% { transform: scale(1) rotate(0); }
}

.prize-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #FFD700;
    margin-bottom: 0.5rem;
}

.prize-description {
    font-size: 1rem;
    color: #94a3b8;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.prize-card {
    background: rgba(255, 215, 0, 0.08);
    border: 2px solid rgba(255, 215, 0, 0.25);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    animation: cardSlideUp 0.5s ease-out 0.3s both;
}

@keyframes cardSlideUp {
    0% { transform: translateY(20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.prize-card-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #FFD700;
    margin-bottom: 0.5rem;
}

.prize-card-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}

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

.confetti-piece {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    animation: confettiFall 2.5s ease-out forwards;
}

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

.quiz-header {
    margin-bottom: 1.5rem;
}

.quiz-progress {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin: 0.75rem 0 0.5rem;
    overflow: hidden;
}

.quiz-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    border-radius: 3px;
    transition: width 0.4s ease;
    width: 20%;
}

.quiz-counter {
    font-size: 0.8rem;
    color: #64748b;
}

.quiz-question {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 1.25rem;
    line-height: 1.5;
    min-height: 3.3rem;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-size: 0.95rem;
    color: #cbd5e1;
    font-family: 'Inter', sans-serif;
    width: 100%;
}

.quiz-option:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 215, 0, 0.3);
}

.quiz-option.selected {
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.1);
    color: #fff;
}

.quiz-option.correct {
    border-color: #2DC653;
    background: rgba(45, 198, 83, 0.15);
    color: #2DC653;
}

.quiz-option.wrong {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.quiz-option .option-letter {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.quiz-option.selected .option-letter {
    background: #FFD700;
    color: #050C1C;
}

.quiz-option.correct .option-letter {
    background: #2DC653;
    color: #fff;
}

.quiz-option.wrong .option-letter {
    background: #ef4444;
    color: #fff;
}

.quiz-feedback {
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.quiz-feedback.correct {
    color: #2DC653;
    background: rgba(45, 198, 83, 0.08);
}

.quiz-feedback.wrong {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

.quiz-score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #FFD700;
    margin: 0 auto 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: prizePopIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.quiz-score-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: #FFD700;
    line-height: 1;
}

.quiz-score-label {
    font-size: 0.75rem;
    color: #94a3b8;
}

.thankyou-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #0077B6 0%, #00B4D8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    animation: prizePopIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.thankyou-logo {
    height: 36px;
    width: auto;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.btn-website-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    text-decoration: none;
}

.powered-by {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
}

.powered-by-text {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.45);
}

.powered-by-logo {
    height: 28px;
    width: auto;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.powered-by-logo:hover {
    opacity: 1;
}

@media (max-height: 680px) {
    .welcome-title { font-size: 2rem; }
    .welcome-subtitle { margin-bottom: 1rem; }
    .prize-preview { margin-bottom: 1.25rem; }
    .form-group { margin-bottom: 0.75rem; }
    .form-group input { padding: 0.7rem 1rem; }
    .btn-primary { padding: 0.85rem 1.5rem; }
    .wheel-wrapper { margin: 0.5rem auto 1rem; }
    #wheelCanvas { width: 280px !important; height: 280px !important; }
}

@media (max-height: 580px) {
    .welcome-logo { height: 32px; margin-bottom: 0.75rem; }
    .welcome-title { font-size: 1.75rem; }
    .prize-preview { display: none; }
    .screen { padding: 1rem; }
}

@media (min-width: 481px) {
    body { align-items: center; }
    .game-container {
        max-height: 900px;
        border-radius: 24px;
        overflow: hidden;
        box-shadow: 0 0 80px rgba(0, 0, 0, 0.5);
    }
}
