:root {
    --bg-color: #87CEEB; /* Sky Blue */
    --container-bg: #ffffff;
    --text-color: #333;
    --shadow-color: #3a3a3a;
    --correct-color: #4CAF50; /* Green */
    --wrong-color: #F44336; /* Red */
    --button-bg: #FFC107; /* Amber */
    --button-hover: #FFA000; /* Darker Amber */
}

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

body {
    font-family: sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
    overflow: hidden;
}

#game-container {
    background-color: var(--container-bg);
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    padding: 1.5rem 2rem;
    width: 100%;
    max-width: 500px;
    text-align: center;
}

header {
    margin-bottom: 1.5rem;
}

h1 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

#level-indicator {
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: #666;
    background-color: #f0f0f0;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: inline-block;
}

#shadow-container {
    background-color: #f9f9f9;
    border: 2px dashed #ccc;
    border-radius: 15px;
    padding: 1rem;
    margin-bottom: 2rem;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#shadow-image {
    max-width: 100%;
    max-height: 180px;
    filter: brightness(0);
    object-fit: contain;
}

#options-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.option {
    background-color: #fff;
    border: 3px solid #ddd;
    border-radius: 15px;
    padding: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1 / 1;
}

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

.option img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Feedback Animations */
.option.correct {
    animation: correct-pulse 0.8s;
    border-color: var(--correct-color);
}

.option.wrong {
    animation: wrong-shake 0.5s;
    border-color: var(--wrong-color);
}

@keyframes correct-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); box-shadow: 0 0 20px var(--correct-color); }
    100% { transform: scale(1); }
}

@keyframes wrong-shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-10px); }
    40%, 80% { transform: translateX(10px); }
}


#result-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.result-box {
    background-color: white;
    padding: 2rem 3rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slide-in 0.5s ease-out;
}

@keyframes slide-in {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.result-box h2 {
    font-size: 2.5rem;
    color: var(--correct-color);
    margin-bottom: 1rem;
}

.result-box p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

#restart-button {
    background-color: var(--button-bg);
    color: var(--text-color);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.2s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#restart-button:hover {
    background-color: var(--button-hover);
}

.hidden {
    display: none !important;
}

@media (max-width: 480px) {
    body {
        padding: 0.5rem;
    }
    #game-container {
        padding: 1rem;
    }
    #options-container {
        gap: 0.5rem;
    }
    .option {
        padding: 0.25rem;
    }
    .result-box {
        padding: 1.5rem;
    }
}