:root {
    /* Color Palette - Vibrant & Kid Friendly */
    --primary-color: #FF6B6B; /* Coral Red */
    --secondary-color: #4ECDC4; /* Turquoise */
    --accent-color: #FFE66D; /* Yellow */
    --background-color: #F7FFF7; /* Mint White */
    --text-color: #292F36; /* Dark Blue-Grey */
    --success-color: #95D5B2; /* Light Green */
    --error-color: #FF9F1C; /* Orange */
    
    /* Typography */
    --font-main: 'Fredoka', sans-serif;
    
    /* Spacing */
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 48px;
    
    /* Shadows & Radius */
    --shadow-soft: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-hard: 4px 4px 0 rgba(0,0,0,0.2);
    --radius-md: 12px;
    --radius-lg: 24px;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* App Container */
#app {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-md);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    margin-bottom: var(--space-lg);
}

h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    text-shadow: 2px 2px 0 var(--accent-color);
}

#player-status {
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    gap: var(--space-lg);
}

#score-display {
    color: var(--secondary-color);
    background: #f0fdfc;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    border: 2px solid var(--secondary-color);
}

#timer-display {
    color: var(--error-color);
    background: #fff8f0;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    border: 2px solid var(--error-color);
}

/* Common Screen Styles */
.screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    animation: fadeIn 0.5s ease-out;
}

.hidden {
    display: none !important;
}

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

/* Dashboard / Topic Grid */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    width: 100%;
    padding: var(--space-lg);
}

.topic-card {
    background: white;
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    text-align: center;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s, box-shadow 0.2s;
    border-bottom: 6px solid var(--secondary-color);
}

.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

.topic-card h3 {
    color: var(--text-color);
    margin-bottom: var(--space-sm);
}

/* Buttons */
.btn {
    font-family: var(--font-main);
    font-size: 1.2rem;
    font-weight: bold;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:active {
    transform: scale(0.95);
}

.btn.primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 0 #d94545;
}

.btn.secondary {
    background-color: var(--secondary-color);
    color: white;
    box-shadow: 0 4px 0 #2a9d8f;
}

/* Game Screen */
#game-screen {
    gap: var(--space-md);
}

#game-area {
    width: 100%;
    min-height: 400px;
    background: white;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.05);
    display: flex;
    justify-content: center;
    align-items: center;
}

#question-area {
    width: 100%;
    padding: var(--space-md);
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    min-height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Result Screen */
#result-screen {
    justify-content: center;
    gap: var(--space-xl);
}

#result-title {
    font-size: 3rem;
    color: var(--primary-color);
}

#result-score {
    font-size: 2rem;
    color: var(--text-color);
}
