/* CSS Variables for Theme */
:root {
    --primary-font: 'Outfit', sans-serif;
    
    /* Colors */
    --bg-gradient-start: #e0c3fc;
    --bg-gradient-end: #8ec5fc;
    --card-bg: rgba(255, 255, 255, 0.85);
    --text-main: #2d3748;
    --text-muted: #718096;
    --accent-color: #9f7aea; /* Soft Purple */
    --accent-hover: #805ad5;
    --success-color: #48bb78;
    
    /* Shadows */
    --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

body {
    font-family: var(--primary-font);
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    color: var(--text-main);
}

/* Background Blobs for depth */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: #FFD1FF;
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 350px;
    height: 350px;
    background: #A0C4FF;
    bottom: -50px;
    right: -50px;
}

/* Main Container */
.container {
    width: 100%;
    max-width: 480px; /* Mobile focused */
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Card Component */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 32px 24px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Header */
.header {
    margin-bottom: 24px;
    text-align: center;
}

.progress-badge {
    background: rgba(159, 122, 234, 0.15);
    color: var(--accent-hover);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Questions */
.question-text {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 32px;
    line-height: 1.3;
    color: #1a202c;
    min-height: 72px; /* Prevent layout shift */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Options Grid */
.options-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-btn {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    padding: 16px;
    border-radius: 16px;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.option-btn:hover {
    border-color: var(--accent-color);
    background: #fdfafd; /* Very light tint */
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

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

/* Feedback Overlay */
.feedback-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.feedback-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.feedback-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    animation: heartBeat 1.2s infinite;
}

.feedback-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-hover);
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
}

/* Celebration Screen */
.celebration {
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 500px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.celebration.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.celebration h1 {
    font-size: 2.5rem;
    color: var(--accent-hover);
    margin-bottom: 16px;
    background: -webkit-linear-gradient(45deg, var(--accent-hover), #ed64a6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.celebration p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Utilities */
.hidden {
    display: none;
}

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

/* Animation classes */
.fade-out {
    opacity: 0;
    transform: translateY(-20px);
}

.fade-in {
    animation: fadeIn 0.5s forwards;
}

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

/* Shake Animation for Wrong Answers */
.shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}
