body {
    font-family: 'Open Sans', sans-serif;
    background-color: #f0f8ff;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto; /* Allow scrolling for smaller screens */
}

h1, h2 {
    font-family: 'Luckiest Guy', cursive;
    color: #2e8b57;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

h1 {
    font-size: 3em;
    margin-bottom: 20px;
}

h2 {
    font-size: 2em;
    margin-top: 30px;
    margin-bottom: 15px;
}

.container {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    padding: 40px;
    max-width: 800px;
    width: 100%;
    text-align: center;
    animation: fadeIn 1s ease-out;
}

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

.quiz-screen {
    display: block;
}

.question-counter {
    font-size: 1.2em;
    font-weight: bold;
    color: #555;
    margin-bottom: 20px;
}

.question-card {
    background-color: #e6f7ff;
    border: 2px solid #aaddff;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}

.animal-image {
    width: 100%;
    max-width: 350px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.animal-image:hover {
    transform: scale(1.02);
}

.question-text {
    font-size: 1.3em;
    margin-bottom: 20px;
    color: #444;
}

#answer-input {
    width: calc(100% - 40px);
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 2px solid #add8e6;
    border-radius: 8px;
    font-size: 1.1em;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#answer-input:focus {
    border-color: #2e8b57;
    box-shadow: 0 0 8px rgba(46, 139, 87, 0.3);
    outline: none;
}

button {
    background-color: #2e8b57;
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 1.2em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

button:hover {
    background-color: #3cb371;
    transform: translateY(-2px);
}

button:active {
    background-color: #28a745;
    transform: translateY(0);
}

.feedback {
    margin-top: 15px;
    font-size: 1.1em;
    font-weight: bold;
}

.feedback.correct {
    color: #28a745; /* Green */
}

.feedback.incorrect {
    color: #dc3545; /* Red */
}

.sticker-shelf {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    gap: 15px;
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f8f8;
    border: 1px dashed #ccc;
    border-radius: 10px;
}

.sticker-slot {
    width: 70px;
    height: 70px;
    background-color: #e0e0e0;
    border: 2px dashed #bbb;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9em;
    color: #888;
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.sticker-slot.earned {
    border: none;
    background-color: transparent;
}

.sticker-slot.earned img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: stickerPop 0.5s ease-out;
}

@keyframes stickerPop {
    0% { transform: scale(0); opacity: 0; }
    80% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); }
}

.certificate-screen {
    display: none; /* Hidden by default */
    text-align: center;
    background-color: #fefefe;
    border: 3px solid #ffd700; /* Gold border */
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
    animation: certificateFadeIn 1.5s ease-out;
}

@keyframes certificateFadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.certificate-screen h2 {
    color: #ffd700; /* Gold */
    font-size: 3.5em;
    margin-bottom: 25px;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.2);
}

.certificate-screen p {
    font-size: 1.4em;
    color: #555;
    margin-bottom: 25px;
}

.certificate-image {
    max-width: 100%;
    width: 600px;
    height: auto;
    margin-bottom: 30px;
    border: 5px solid #ffd700;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.certificate-text {
    font-family: 'Dancing Script', cursive; /* A fancier font for the certificate */
    font-size: 2em;
    font-weight: bold;
    color: #8b4513; /* SaddleBrown */
    margin-top: 15px;
}

#restart-quiz-btn {
    background-color: #007bff; /* Blue */
    margin-top: 20px;
    font-size: 1.3em;
    padding: 15px 30px;
}

#restart-quiz-btn:hover {
    background-color: #0056b3;
}

.hidden {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5em;
    }
    h2 {
        font-size: 1.8em;
    }
    .container {
        padding: 25px;
        margin: 10px;
    }
    .question-card {
        padding: 15px;
    }
    .animal-image {
        max-width: 90%;
    }
    #answer-input {
        width: calc(100% - 30px);
        padding: 10px 12px;
        font-size: 1em;
    }
    button {
        padding: 12px 20px;
        font-size: 1.1em;
    }
    .sticker-slot {
        width: 60px;
        height: 60px;
    }
    .certificate-screen h2 {
        font-size: 2.5em;
    }
    .certificate-screen p {
        font-size: 1.1em;
    }
    .certificate-text {
        font-size: 1.5em;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2em;
    }
    h2 {
        font-size: 1.5em;
    }
    .container {
        padding: 15px;
    }
    .question-card {
        padding: 10px;
    }
    #answer-input {
        width: calc(100% - 20px);
    }
    .sticker-shelf {
        grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
        gap: 10px;
    }
    .sticker-slot {
        width: 50px;
        height: 50px;
    }
    .certificate-screen h2 {
        font-size: 2em;
    }
    .certificate-screen p {
        font-size: 1em;
    }
    .certificate-text {
        font-size: 1.2em;
    }
}

