:root {
    --primary-color: #ffd60a;
    /* ビビッドなイエロー */
    --secondary-color: #7209b7;
    /* ミステリアスなパープル */
    --accent-color: #f72585;
    /* エネルギッシュなピンク */
    --bg-color: #fff9db;
    --text-color: #2b2d42;
    --card-bg: #ffffff;
    --btn-hover: #ffc300;
}

* {
    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(--secondary-color) 0.5px, transparent 0.5px);
    background-size: 40px 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    width: 100%;
    flex: 1;
}

.screen {
    display: none;
    background: var(--card-bg);
    padding: 50px;
    border-radius: 25px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    text-align: center;
    border: 6px solid var(--secondary-color);
    position: relative;
    overflow: hidden;
}

.screen.active {
    display: block;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

h1 {
    color: var(--secondary-color);
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0px var(--primary-color);
}

.btn {
    display: inline-block;
    padding: 20px 60px;
    font-size: 1.6rem;
    font-weight: bold;
    color: white;
    background-color: var(--secondary-color);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 6px 0 #5a078f;
    margin: 15px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 #5a078f;
    background-color: #8338ec;
}

.btn:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #5a078f;
}

.btn.next {
    background-color: var(--accent-color);
    box-shadow: 0 6px 0 #c91866;
}

.btn.next:hover {
    background-color: #ff4d6d;
    box-shadow: 0 8px 0 #c91866;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.question-box {
    background: #f1f0ff;
    padding: 40px;
    border-radius: 20px;
    margin-bottom: 30px;
    font-size: 2rem;
    position: relative;
}

.choices-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.choice-btn {
    padding: 25px;
    font-size: 1.4rem;
    background: white;
    border: 3px solid #eee;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: bold;
}

.choice-btn:hover {
    border-color: var(--primary-color);
    background: var(--bg-color);
}

.choice-btn.correct {
    background-color: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}

.choice-btn.incorrect {
    background-color: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

.feedback-area {
    margin-top: 30px;
    padding: 25px;
    border-radius: 15px;
    background: #fff;
    border: 4px solid var(--primary-color);
}

.progress-bar-container {
    width: 100%;
    height: 15px;
    background: #e9ecef;
    border-radius: 10px;
    margin-bottom: 40px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    width: 0%;
    transition: width 0.4s;
}

.back-to-portal {
    margin-top: 30px;
    display: block;
    color: #888;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
}

.back-to-portal:hover {
    color: var(--secondary-color);
}

footer {
    text-align: center;
    padding: 30px;
    color: #666;
}

.stamp {
    font-size: 5rem;
    margin: 20px 0;
    display: block;
}