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

:root {
    --accent-primary: #ff4f9f;
    --accent-secondary: #00cdb5;
    --accent-ink: #1a3e66;
    --accent-soft: rgba(255, 79, 159, 0.14);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(-45deg, #ff4fa2, #4f46ff, #00d9b8);
    background-size: 280% 280%;
    animation: chaosShift 22s ease infinite;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

body::before,
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

body::before {
    background:
        radial-gradient(34% 40% at 20% 30%, rgba(255, 79, 162, 0.48) 0%, rgba(255, 79, 162, 0) 72%),
        radial-gradient(36% 42% at 76% 24%, rgba(79, 70, 255, 0.46) 0%, rgba(79, 70, 255, 0) 72%),
        radial-gradient(32% 40% at 68% 78%, rgba(0, 217, 184, 0.42) 0%, rgba(0, 217, 184, 0) 72%);
    filter: blur(28px);
    opacity: 0.58;
    animation: neonBlobDrift 24s ease-in-out infinite;
}

body::after {
    background-image:
        radial-gradient(circle at 12% 24%, rgba(255, 255, 255, 0.45) 0 3px, transparent 4px),
        radial-gradient(circle at 34% 70%, rgba(95, 198, 255, 0.4) 0 3px, transparent 4px),
        radial-gradient(circle at 66% 40%, rgba(255, 121, 198, 0.42) 0 3px, transparent 4px),
        radial-gradient(circle at 84% 18%, rgba(126, 255, 196, 0.4) 0 3px, transparent 4px);
    background-size: 260px 260px;
    opacity: 0.22;
    animation: confettiDrift 24s linear infinite;
}

@keyframes chaosShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes neonBlobDrift {
    0% {
        transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
    }
    50% {
        transform: translate3d(1%, -1.2%, 0) scale(1.06) rotate(2deg);
    }
    100% {
        transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
    }
}

@keyframes confettiDrift {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: -140px 140px;
    }
}

.container {
    width: 100%;
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.screen {
    display: none;
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Back Button */
.back-button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-5px);
}

/* Intro Screen */
.intro-content {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(4px);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(14, 18, 55, 0.28);
    text-align: center;
}

.intro-content h1 {
    color: var(--accent-ink);
    font-size: 2.2rem;
    margin-bottom: 10px;
    line-height: 1.2;
}

.subtitle {
    color: #999;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.intro-description {
    text-align: left;
    margin-bottom: 30px;
    color: #555;
    line-height: 1.8;
}

.intro-description p {
    margin-bottom: 15px;
}

.intro-description p strong {
    color: var(--accent-primary);
}

.start-button {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: white;
    border: none;
    padding: 15px 50px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 79, 159, 0.35);
}

.start-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 205, 181, 0.38);
}

/* Quiz Screen */
.quiz-content {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(4px);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(14, 18, 55, 0.28);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 30px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-secondary) 0%, var(--accent-primary) 100%);
    transition: width 0.4s ease;
}

#questionTitle {
    color: #999;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

#questionText {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 30px;
    line-height: 1.6;
}

.answers-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.answer-button {
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    padding: 16px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    color: #333;
    transition: all 0.3s ease;
    text-align: left;
}

.answer-button:hover {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: white;
    border-color: transparent;
    transform: translateX(5px);
}

/* Result Screen */
.result-content {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(4px);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(14, 18, 55, 0.28);
    text-align: center;
}

.result-content h1 {
    color: var(--accent-ink);
    font-size: 2rem;
    margin-bottom: 30px;
}

.result-card {
    background: linear-gradient(135deg, var(--accent-soft) 0%, rgba(0, 205, 181, 0.14) 100%);
    border: 2px solid var(--accent-primary);
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
    text-align: center;
}

.result-emoji {
    font-size: 5rem;
    margin-bottom: 20px;
    display: block;
    animation: bounce 2s ease-in-out infinite;
}

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

.result-card h2 {
    color: var(--accent-ink);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.result-card p {
    color: #555;
    font-size: 1.1rem;
    line-height: 1.8;
}

.button-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.retake-button,
.home-button {
    padding: 12px 30px;
    border-radius: 25px;
    border: none;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retake-button {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 79, 159, 0.35);
}

.retake-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 205, 181, 0.38);
}

.home-button {
    background: #f0f0f0;
    color: #333;
    border: 2px solid #ddd;
}

.home-button:hover {
    background: #e0e0e0;
    border-color: #999;
}

/* Responsive */
@media (max-width: 600px) {
    .intro-content,
    .quiz-content,
    .result-content {
        padding: 25px;
    }

    .intro-content h1 {
        font-size: 1.8rem;
    }

    #questionText {
        font-size: 1.3rem;
    }

    .result-card h2 {
        font-size: 1.5rem;
    }
}
