:root {
    --primary-color: #e67e22;
    /* サバンナのオレンジ */
    --secondary-color: #5d4037;
    /* 大地のブラウン */
    --accent-color: #27ae60;
    /* 草のグリーン */
    --bg-color: #fdf2e9;
    /* 柔らかなクリーム色 */
    --text-color: #3e2723;
    --card-bg: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Zen Maru Gothic', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    background-image:
        radial-gradient(var(--primary-color) 0.5px, transparent 0.5px);
    background-size: 30px 30px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

.container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    width: 100%;
    flex: 1;
    z-index: 1;
}

.screen {
    display: none;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 30px;
    box-shadow: 0 15px 35px rgba(93, 64, 55, 0.15);
    text-align: center;
    border-bottom: 10px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

/* 背景の装飾 */
.background-decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* 肉球の足跡 */
.paw-print {
    position: absolute;
    width: 30px;
    height: 30px;
    color: var(--primary-color);
    opacity: 0;
    font-size: 2rem;
    animation: pawWalk 4s forwards;
}

@keyframes pawWalk {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }

    10% {
        opacity: 0.2;
        transform: scale(1) rotate(-10deg);
    }

    90% {
        opacity: 0.2;
        transform: scale(1) rotate(-10deg);
    }

    100% {
        opacity: 0;
        transform: scale(0.8) rotate(-10deg);
    }
}

/* サバンナの風景（下部） */
.savannah-silhouette {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    opacity: 0.15;
    z-index: -1;
}

.animal-silhouette {
    font-size: 5rem;
    margin-bottom: -10px;
    filter: brightness(0);
}

.acacia-tree {
    width: 100px;
    height: 80px;
    background-color: var(--secondary-color);
    clip-path: polygon(50% 100%, 45% 70%, 10% 60%, 5% 45%, 30% 35%, 50% 30%, 70% 35%, 95% 45%, 90% 60%, 55% 70%);
    margin-bottom: 5px;
}

.screen.active {
    display: block;
    animation: bounceIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bounceIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 0px #fff;
}

.icon {
    font-size: 4rem;
    margin: 15px 0;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.1));
}

.btn {
    display: inline-block;
    padding: 15px 45px;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    background-color: var(--primary-color);
    border: none;
    border-radius: 60px;
    cursor: pointer;
    transition: all 0.3s;
    margin: 10px;
    box-shadow: 0 6px 0 #d35400;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 9px 0 #d35400;
    background-color: #f39c12;
}

.btn:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #d35400;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--secondary-color);
    background: #fdf2e9;
    padding: 8px 20px;
    border-radius: 50px;
}

.question-box {
    background: #fff9c4;
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 20px;
    font-size: 1.4rem;
    border-left: 10px solid var(--accent-color);
    text-align: left;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
}

.choices-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.choice-btn {
    padding: 18px;
    font-size: 1.2rem;
    background: white;
    border: 3px solid #eee;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: bold;
    color: var(--text-color);
    box-shadow: 0 4px 0 #eee;
}

.choice-btn:hover {
    border-color: var(--primary-color);
    background: #fdf2e9;
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #eee;
}

.choice-btn.correct {
    background-color: #e8f5e9;
    border-color: #2ecc71;
    color: #1b5e20;
    box-shadow: 0 4px 0 #2ecc71;
}

.choice-btn.incorrect {
    background-color: #ffebee;
    border-color: #e74c3c;
    color: #b71c1c;
    box-shadow: 0 4px 0 #e74c3c;
}

.feedback-area {
    margin-top: 20px;
    padding: 20px;
    border-radius: 20px;
    background: #fff;
    border: 4px solid var(--primary-color);
    animation: fadeIn 0.4s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.progress-bar-container {
    width: 100%;
    height: 20px;
    background: #eceff1;
    border-radius: 10px;
    margin-bottom: 40px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    width: 0%;
    transition: width 0.4s;
}

.back-link {
    display: block;
    margin-top: 30px;
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: bold;
}

footer {
    text-align: center;
    padding: 40px;
    color: var(--secondary-color);
    font-weight: bold;
}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }

    h1 {
        font-size: 2rem;
    }

    .icon {
        font-size: 4rem;
    }

    .question-box {
        font-size: 1.3rem;
        padding: 20px;
    }

    .choices-container {
        grid-template-columns: 1fr;
    }

    .choice-btn {
        padding: 15px;
        font-size: 1.1rem;
    }
}