:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --accent-color: #ffe66d;
    --bg-color: #f7fff7;
    --text-color: #2f3e46;
    --card-bg: #ffffff;
    --btn-hover: #ff8787;
}

* {
    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;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255, 107, 107, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(78, 205, 196, 0.05) 0%, transparent 20%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    width: 100%;
    flex-grow: 1;
}

.screen {
    display: none;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0 #fff;
}

h2 {
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.btn {
    display: inline-block;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    background-color: var(--primary-color);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    margin: 10px;
}

.btn:hover {
    background-color: var(--btn-hover);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.btn:active {
    transform: scale(0.95);
}

.btn.large {
    font-size: 1.5rem;
    padding: 20px 60px;
}

.btn.next {
    background-color: var(--secondary-color);
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
}

.btn.next:hover {
    background-color: #45b7af;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    font-weight: bold;
    color: #666;
}

.question-box {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    border: 3px dashed var(--secondary-color);
}

.choices-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.choice-btn {
    padding: 20px;
    font-size: 1.2rem;
    font-weight: bold;
    background: white;
    border: 3px solid #eee;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.choice-btn:hover {
    border-color: var(--primary-color);
    background: #fffafa;
    transform: translateY(-3px);
}

.choice-btn.correct {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.choice-btn.incorrect {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.feedback-area {
    margin-top: 30px;
    padding: 20px;
    border-radius: 15px;
    background: #fff9db;
    border-left: 5px solid var(--accent-color);
}

.hidden {
    display: none;
}

.explanation-box {
    text-align: left;
    margin: 15px 0;
}

footer {
    text-align: center;
    padding: 20px;
    color: #888;
    font-size: 0.9rem;
}

/* 虹色の進捗バー */
.progress-bar-container {
    width: 100%;
    height: 10px;
    background: #eee;
    border-radius: 5px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #ffe66d, #4ecdc4);
    width: 0%;
    transition: width 0.3s ease;
}

/* スタンプ風のアニメーション */
@keyframes stamp {
    0% {
        transform: scale(3);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.result-stamp {
    font-size: 5rem;
    margin: 20px 0;
    display: block;
    animation: stamp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}