:root {
    --color-primary: #4CAF50; /* Frog Green */
    --color-secondary: #FFC107; /* Sunny Yellow */
    --color-background: #E8F5E9; /* Light Mint */
    --color-text: #333;
    --color-bubble: #FFFFFF;
    --color-choice: #2196F3; /* Blue buttons */
    --color-feedback-correct: #4CAF50;
    --color-feedback-wrong: #F44336;
    --font-family-cartoon: 'Arial Rounded MT Bold', sans-serif; 
}

body {
    font-family: var(--font-family-cartoon);
    background-color: var(--color-background);
    margin: 0;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    color: var(--color-text);
}

#game-container {
    width: 100%;
    max-width: 600px;
    background: #fff;
    border: 10px solid var(--color-primary);
    border-radius: 20px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    padding-bottom: 20px;
}

header {
    background-color: var(--color-primary);
    color: white;
    padding: 15px 10px;
    text-align: center;
}

h1 {
    font-size: 1.5em;
    margin-bottom: 5px;
}

#chapter-title {
    font-size: 1.2em;
    font-weight: bold;
}

#story-area {
    padding: 15px;
}

#scene-image-container {
    position: relative;
    width: 100%;
    height: 200px;
    margin-bottom: 15px;
    border: 5px solid var(--color-secondary);
    border-radius: 10px;
    overflow: hidden;
    background-color: #aaa; /* Default placeholder */
}

#scene-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

#professor-bubble-overlay {
    position: absolute;
    bottom: -5px;
    right: 5px;
    width: 100px;
    height: auto;
    z-index: 10;
    filter: drop-shadow(2px 2px 5px rgba(0, 0, 0, 0.4));
}

#narration-box {
    background: var(--color-bubble);
    border: 3px solid var(--color-primary);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#story-text {
    margin: 0;
    font-size: 1.1em;
}

#feedback-message {
    margin-top: 10px;
    padding: 8px;
    border-radius: 8px;
    font-weight: bold;
    display: block; /* Managed by JS hidden class */
}

.correct {
    background-color: #E8F5E9; 
    color: var(--color-feedback-correct);
    border: 1px solid var(--color-feedback-correct);
}

.incorrect {
    background-color: #FFEBEE;
    color: var(--color-feedback-wrong);
    border: 1px solid var(--color-feedback-wrong);
}

.hidden {
    display: none !important;
}

#choice-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.choice-button {
    background-color: var(--color-choice);
    color: white;
    border: none;
    padding: 12px 15px;
    text-align: left;
    font-size: 1em;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 4px 0 0 #1565C0; /* Darker blue for 3D effect */
    line-height: 1.2;
}

.choice-button:hover:not(:disabled) {
    background-color: #0088CC;
}

.choice-button:active:not(:disabled) {
    transform: translateY(3px);
    box-shadow: 0 1px 0 0 #1565C0;
}

.choice-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#control-buttons {
    text-align: center;
    margin-top: 20px;
}

#continue-button {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 5px 0 0 #388E3C;
}

#continue-button:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 0 #388E3C;
}

/* Reward Screen Styling */
#reward-screen, #congratulations-screen {
    text-align: center;
    padding: 30px;
}

#reward-display {
    padding: 20px;
    margin: 20px auto;
    border: 5px dashed var(--color-secondary);
    border-radius: 15px;
    display: inline-block;
}

.reward-item {
    font-size: 1.5em;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 5px;
    display: block;
    margin: 10px 0;
    color: white;
    text-shadow: 1px 1px 2px #000;
}

#next-chapter-button, #play-again-button {
    margin-top: 20px;
    background-color: var(--color-secondary);
    color: var(--color-text);
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 5px 0 0 #FFA000;
}

#next-chapter-button:active, #play-again-button:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 0 #FFA000;
}

#all-rewards-summary {
    margin-top: 20px;
}
#all-rewards-summary h3 {
    color: var(--color-primary);
}

