:root {
    --bg-color: #fce4ec; /* Light pink background */
    --primary: #ff4081;  /* Vibrant pink */
    --secondary: #00e676; /* Bright Green */
    --card-bg: #ffffff;
    --text-color: #37474f;
    --shadow: 0 8px 16px rgba(0,0,0,0.1);
    --border-radius: 20px;
}

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

body {
    font-family: 'Fredoka', sans-serif;
    background-color: var(--bg-color);
    background-image: radial-gradient(#ff80ab 1px, transparent 1px);
    background-size: 20px 20px;
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    user-select: none; /* Prevent accidental text selection by kids */
}

#game-container {
    width: 95%;
    max-width: 1000px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    text-align: center;
    border: 4px solid white;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

#score-board {
    font-size: 2rem;
    font-weight: 700;
    color: #ffd54f;
    text-shadow: 2px 2px 0px #ff8f00;
}

#start-btn {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    padding: 10px 20px;
    background-color: var(--secondary);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 6px 0 #00c853, 0 8px 15px rgba(0,0,0,0.2);
    transition: all 0.1s;
}

#start-btn:active {
    transform: translateY(6px);
    box-shadow: 0 0px 0 #00c853, 0 2px 5px rgba(0,0,0,0.2);
}

#question-text {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 30px;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
    opacity: 0;
    transition: opacity 0.5s;
}

#comparison-area {
    display: flex;
    justify-content: center;
    gap: 20px;
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none; /* Disabled until game starts */
}

.playing #question-text, .playing #comparison-area {
    opacity: 1;
}
.playing #comparison-area {
    pointer-events: auto;
}

.playing #start-btn {
    display: none;
}

.side-container {
    flex: 1;
    background-color: var(--card-bg);
    border-radius: 30px;
    min-height: 400px;
    border: 8px solid #e0f7fa;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    position: relative;
    overflow: hidden;
}

.side-container:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
    border-color: #b2ebf2;
}

.side-container:active {
    transform: scale(0.98);
}

/* Animations for interaction */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px) rotate(-2deg); border-color: #ff5252; }
    50% { transform: translateX(10px) rotate(2deg); border-color: #ff5252; }
    75% { transform: translateX(-10px) rotate(-2deg); border-color: #ff5252; }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes bounceSuccess {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); border-color: #69f0ae; background-color: #f1f8e9;}
}

.success-bounce {
    animation: bounceSuccess 0.8s ease-in-out;
}

.emoji-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
    gap: 15px;
    padding: 20px;
    width: 100%;
    height: 100%;
}

.emoji-item {
    font-size: 4rem; /* Big kid-friendly size */
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.2));
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
}

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

/* Responsive for smaller tablets/phones */
@media (max-width: 768px) {
    #comparison-area {
        flex-direction: column;
    }
    .side-container {
        min-height: 250px;
    }
    .emoji-item {
        font-size: 3rem;
    }
    #question-text {
        font-size: 2rem;
    }
}
