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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3f 50%, #1a472a 100%);
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
}

/* Snowflake Animation */
.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.snowflake {
    position: absolute;
    top: -20px;
    color: #fff;
    font-size: 1.5rem;
    animation: fall linear infinite;
    opacity: 0.8;
}

.snowflake:nth-child(1) { left: 5%; animation-duration: 8s; animation-delay: 0s; font-size: 1rem; }
.snowflake:nth-child(2) { left: 15%; animation-duration: 12s; animation-delay: 1s; font-size: 1.5rem; }
.snowflake:nth-child(3) { left: 25%; animation-duration: 10s; animation-delay: 2s; font-size: 1.2rem; }
.snowflake:nth-child(4) { left: 35%; animation-duration: 14s; animation-delay: 0.5s; font-size: 1.8rem; }
.snowflake:nth-child(5) { left: 50%; animation-duration: 9s; animation-delay: 3s; font-size: 1rem; }
.snowflake:nth-child(6) { left: 60%; animation-duration: 11s; animation-delay: 1.5s; font-size: 1.4rem; }
.snowflake:nth-child(7) { left: 70%; animation-duration: 13s; animation-delay: 2.5s; font-size: 1.6rem; }
.snowflake:nth-child(8) { left: 80%; animation-duration: 8s; animation-delay: 4s; font-size: 1.1rem; }
.snowflake:nth-child(9) { left: 88%; animation-duration: 10s; animation-delay: 0s; font-size: 1.3rem; }
.snowflake:nth-child(10) { left: 95%; animation-duration: 15s; animation-delay: 2s; font-size: 1.7rem; }

@keyframes fall {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

.hero-image {
    width: 180px;
    height: 180px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #ffd700;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 215, 0, 0.3);
    animation: gentle-bounce 3s ease-in-out infinite;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

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

h1 {
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

#quiz-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.question-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.question-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.question-number {
    position: absolute;
    top: -12px;
    left: 20px;
    background: #c41e3a;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.question-card label {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.question-card input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.question-card input:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
}

.question-card input::placeholder {
    color: #888;
}

.submit-btn {
    background: linear-gradient(135deg, #c41e3a 0%, #a01830 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.4);
}

.submit-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.5);
}

.submit-btn:active {
    transform: scale(0.98);
}

.btn-icon {
    font-size: 1.4rem;
}

/* Result Section */
.result {
    margin-top: 2rem;
    transition: all 0.5s ease;
}

.result.hidden {
    display: none;
}

.result-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    color: #333;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: popIn 0.5s ease;
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.result-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #1a472a;
    transition: font-size 0.5s ease;
}

.result-title.large-title {
    font-size: 2.5rem;
    line-height: 1.3;
    color: #c41e3a;
}

.result-message {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 1.5rem;
}

.try-again-btn {
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3f 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.try-again-btn:hover {
    transform: scale(1.05);
}

/* Score-based styling */
.result-content.perfect {
    border: 3px solid #ffd700;
    background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
}

.result-content.suspense {
    animation: pulse-border 1s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% {
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 40px rgba(255, 215, 0, 0.6);
    }
}

.gift-reveal {
    font-size: 1.4rem;
    font-weight: bold;
    color: #c41e3a;
    animation: reveal-bounce 0.5s ease;
}

@keyframes reveal-bounce {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.result-content.good {
    border: 3px solid #c0c0c0;
}

.result-content.try-harder {
    border: 3px solid #cd7f32;
}

footer {
    text-align: center;
    padding: 2rem;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }

    .question-card {
        padding: 1.25rem;
    }

    .question-card label {
        font-size: 1rem;
    }
}
