:root {
    --bg-color: #fcebd5;
    --primary: #ff5e7e;
    --secondary: #6c5ce7;
    --accent: #fdcb6e;
    --text-color: #2d3436;
    --card-bg: rgba(255, 255, 255, 0.9);
    --btn-shadow: rgba(0, 0, 0, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Fredoka', sans-serif;
}

body {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    overflow: hidden; /* For canvas effects */
}

#game-container {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    z-index: 10;
    position: relative;
    transition: transform 0.3s ease;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: var(--secondary);
    font-size: 2.5rem;
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
    animation: bounceIn 1s ease-out;
}

.level-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

#level-text {
    font-weight: 600;
    color: var(--primary);
    font-size: 1.2rem;
}

.progress-bar-bg {
    width: 100%;
    height: 15px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

#progress-bar-fill {
    height: 100%;
    width: 10%;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.question-container {
    background: white;
    padding: 25px;
    border-radius: 15px;
    font-size: 1.4rem;
    text-align: center;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05), inset 0 0 0 2px var(--accent);
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.5;
}

.answers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.answer-btn {
    background: white;
    border: 3px solid var(--secondary);
    border-radius: 12px;
    padding: 15px 10px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 6px 0 var(--secondary);
    position: relative;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.answer-btn:hover {
    filter: brightness(0.95);
    transform: translateY(-2px);
    box-shadow: 0 8px 0 var(--secondary);
}

.answer-btn:active {
    top: 6px;
    box-shadow: 0 0px 0 var(--secondary);
    transform: translateY(0);
}

.answer-btn.correct {
    background-color: #55efc4;
    border-color: #00b894;
    color: white;
    box-shadow: 0 6px 0 #00b894;
    animation: correctPulse 0.5s ease;
}

.answer-btn.wrong {
    background-color: #ff7675;
    border-color: #d63031;
    color: white;
    box-shadow: 0 6px 0 #d63031;
    animation: shake 0.5s;
}

#victory-screen {
    text-align: center;
    padding: 20px 0;
}

#victory-screen h2 {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 10px;
}

#victory-screen p {
    font-size: 1.5rem;
    margin-bottom: 25px;
}

.primary-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 0 #d63031;
    transition: all 0.2s;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 #d63031;
}

.primary-btn:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #d63031;
}

.hidden {
    display: none !important;
}

#effects-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 100;
}

/* Animations */
@keyframes bounceIn {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

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

@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Container shake for wrong answer */
.shake-container {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

/* Container pop for correct answer */
.pop-container {
    animation: bounceIn 0.5s ease;
}
