:root {
    --primary-color: #2D6A4F;
    /* Deep Green */
    --accent-color: #40916C;
    /* Medium Green */
    --highlight-color: #D8F3DC;
    /* Light Green */
    --bg-gradient-start: #1B4332;
    --bg-gradient-end: #081C15;
    --text-light: #ffffff;
    --text-dark: #1f2937;
    --card-bg: rgba(255, 255, 255, 0.95);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    --correct-color: #2a9d8f;
    --wrong-color: #e76f51;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    color: var(--text-dark);
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Background Shapes */
.background-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-color);
    top: -100px;
    right: -100px;
    animation: float 20s infinite ease-in-out;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: #00b4d8;
    /* Teal blue */
    bottom: -50px;
    left: -50px;
    animation: float 25s infinite ease-in-out reverse;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: #e9c46a;
    /* Golden for contrast */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 15s infinite ease-in-out;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.5;
    }
}

/* Main Container */
.game-container {
    width: 90%;
    max-width: 600px;
    z-index: 1;
    position: relative;
    perspective: 1000px;
}

.screen {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.5s ease;
    opacity: 1;
    transform: translateY(0);
}

.screen.hidden {
    display: none;
    opacity: 0;
    transform: translateY(20px);
}

/* Typography & Start Screen */
.content-box {
    text-align: center;
}

h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

p {
    font-size: 1.1rem;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.icon-container {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.features {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 500;
}

.feature-icon {
    font-size: 1.5rem;
    background: var(--highlight-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Buttons */
.primary-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(45, 106, 79, 0.3);
}

.primary-btn:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(45, 106, 79, 0.4);
}

.primary-btn:active {
    transform: translateY(0);
}

/* Quiz Screen */
.quiz-header {
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.5s ease;
}

.quiz-info {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    color: #4b5563;
    font-size: 0.9rem;
}

.question-card h2 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.options-grid {
    display: grid;
    gap: 1rem;
}

.option-btn {
    background: white;
    border: 2px solid #e5e7eb;
    padding: 1rem;
    border-radius: 12px;
    text-align: left;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-dark);
    font-weight: 500;
}

.option-btn:hover:not(:disabled) {
    border-color: var(--accent-color);
    background: var(--highlight-color);
}

.option-btn.correct {
    background-color: #d1fae5;
    border-color: var(--correct-color);
    color: #065f46;
}

.option-btn.wrong {
    background-color: #fee2e2;
    border-color: var(--wrong-color);
    color: #991b1b;
}

.feedback-area {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 12px;
    background: #f3f4f6;
    animation: fadeIn 0.4s ease;
    text-align: center;
}

.feedback-area.hidden {
    display: none;
}

.feedback-area p {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text-dark);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Result Screen */
.result-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.score-circle {
    width: 120px;
    height: 120px;
    background: var(--highlight-color);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 1.5rem auto;
    color: var(--primary-color);
}

#final-score {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

.score-label {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .screen {
        padding: 1.5rem;
    }

    h1 {
        font-size: 1.8rem;
    }

    .feature {
        font-size: 0.8rem;
    }
}

.copyright {
    margin-top: 2rem;
    font-size: 0.8rem;
    color: #9ca3af;
    font-weight: 400;
    letter-spacing: 0.5px;
}