* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f0f8ff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.game-container {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 800px;
    padding: 20px;
    text-align: center;
}

.game-header h1 {
    color: #4169e1;
    margin-bottom: 20px;
}

.image-container {
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.question-text {
    font-size: 1.2em;
    margin-bottom: 20px;
    color: #333;
}

.answer-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.answer-btn {
    background-color: #4169e1;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 30px;
    font-size: 1.2em;
    cursor: pointer;
    transition: background-color 0.3s;
}

.answer-btn:hover {
    background-color: #344eac;
}

.feedback-container {
    margin-top: 20px;
}

.feedback {
    padding: 15px;
    border-radius: 5px;
    font-size: 1.2em;
}

.correct-feedback {
    color: #2e8b57;
}

.incorrect-feedback {
    color: #cd5c5c;
}

.hidden {
    display: none;
}

.smiley-animation {
    font-size: 3em;
    margin-bottom: 10px;
}

.game-completion {
    text-align: center;
    padding: 15px;  /* Reduced padding from 20px to 15px */
    background-color: #f8f8ff;
    border-radius: 15px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.game-completion h2 {
    color: #4169e1;
    font-size: 1.8em;  /* Reduced from 2em to 1.8em */
    margin-bottom: 10px;  /* Reduced from 20px to 10px */
}

.game-completion p {
    color: #333;
    font-size: 1.2em;
    margin: 10px 0;  /* Reduced from 20px to 10px */
    font-weight: 500;
}

.completion-animation {
    font-size: 4em;
    margin: 30px 0;
}

.celebration-scene {
    position: relative;
    height: 250px;  /* Reduced height from 300px to 250px */
    margin: 10px 0;  /* Reduced margin from 20px to 10px */
    overflow: hidden;
}

.trees-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none; /* Make sure clicks pass through to elements below */
}

.timber-tree {
    position: absolute;
    height: 140px; /* Slightly reduced size */
    object-fit: contain;
    opacity: 0.9; /* Slightly transparent */
}

.left-tree {
    left: 5px;
    bottom: 5px;
    transform: scale(0.7); /* Smaller scale */
}

.right-tree {
    right: 5px;
    bottom: 5px;
    transform: scale(0.7) scaleX(-1); /* Flip horizontally for variety */
}

.celebration-image {
    max-width: 80%;  /* Further reduced from 90% to 80% */
    max-height: 80%;  /* Further reduced from 90% to 80% */
    object-fit: contain;
    position: relative;
    z-index: 1;
    margin: 0 auto; /* Center horizontally */
    display: block; /* Ensure proper centering */
}

.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 80%; /* Reduced from 100% to 80% to keep confetti away from button */
    z-index: 2;
    pointer-events: none;
}

.confetti {
    position: absolute;
    width: 15px;
    height: 15px;
    border-radius: 3px;
}

.confetti1 { background: #f44336; top: -10%; left: 10%; }
.confetti2 { background: #4caf50; top: -20%; left: 30%; }
.confetti3 { background: #2196f3; top: -5%; left: 50%; }
.confetti4 { background: #ffeb3b; top: -15%; left: 70%; }
.confetti5 { background: #9c27b0; top: -10%; left: 90%; }
.confetti6 { background: #ff9800; top: -20%; left: 20%; }
.confetti7 { background: #00bcd4; top: -15%; left: 40%; }
.confetti8 { background: #e91e63; top: -5%; left: 80%; }

.restart-btn {
    background-color: #2e8b57;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 12px 30px;
    font-size: 1.2em;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 15px;  /* Reduced from 20px to 15px */
    margin-bottom: 10px; /* Added bottom margin */
    z-index: 10; /* Ensure button is above other elements */
    position: relative; /* Added positioning context */
}

.restart-btn:hover {
    background-color: #236b43;
}
