/* 注音字體 */
@font-face {
    font-family: 'BpmfGenSenRounded';
    src: url('../../fonts/BpmfGenSenRounded-R.ttf') format('truetype');
}

/* 一般字體 (非注音) */
@font-face {
    font-family: 'ZihaiKaiTi';
    src: url('../../fonts/字嗨注音標楷.ttf') format('truetype');
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

*::-webkit-scrollbar {
    width: 0;
    /* Chrome, Safari, Opera */
    display: none;
}

html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
    touch-action: manipulation;
    /* 防止瀏覽器預設的縮放行為 */
}

body {
    font-family: 'BpmfGenSenRounded', Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: hidden;
    position: relative;
    margin-right: calc(100vw - 100%);
    /* 防止滾動條出現時的跳動 */
    height: 100vh;
    -webkit-text-size-adjust: 100%;
    /* 禁止iOS調整文字大小 */
    -webkit-touch-callout: none;
    /* 禁止長按呼出選單 */
    -webkit-user-select: none;
    /* 禁止選取文字 */
    user-select: none;
}

@supports (-webkit-touch-callout: none) {

    /* iOS 裝置特定樣式 */
    body {
        height: -webkit-fill-available;
        /* 為 iOS Safari 底部導覽列添加安全區域 */
        padding-bottom: env(safe-area-inset-bottom);
    }

    /* 在 iOS 中，結果頁面也需要考慮底部安全區域 */
    body.show-results {
        height: auto;
        padding-bottom: calc(env(safe-area-inset-bottom) + 20px);
    }

    /* 在 iOS 中調整容器高度，考慮底部導覽列 */
    .container {
        min-height: calc(100vh - env(safe-area-inset-bottom));
        padding-bottom: calc(40px + env(safe-area-inset-bottom));
    }

    /* 修正 iOS 中在結果頁面時的滾動問題 */
    @media (max-width: 768px) {
        body {
            height: calc(100vh - 60px - env(safe-area-inset-bottom));
        }

        .container {
            height: calc(100vh - 60px - env(safe-area-inset-bottom));
            min-height: calc(100vh - 60px - env(safe-area-inset-bottom));
        }

        body.show-results .container {
            min-height: calc(100vh - 60px - env(safe-area-inset-bottom));
        }
    }
}

body.show-results {
    overflow-y: hidden;
    height: auto;
}

body.show-results.details-visible {
    overflow-y: auto;
}

.gradient-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    transition: background 0.5s ease;
}

/* 自定義滾動條樣式 */
.custom-scrollbar {
    position: fixed;
    top: 0;
    right: 0;
    width: 8px;
    height: 100vh;
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.custom-scrollbar.show {
    opacity: 1;
    pointer-events: auto;
}

.custom-scrollbar-thumb {
    position: absolute;
    width: 100%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.custom-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.container {
    width: 100%;
    max-width: 1200px;
    min-height: 100vh;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    padding-bottom: 40px;
    background: none;
    z-index: 1;
    transform: scale(0.9);
    transform-origin: top center;
    overflow-y: auto;
}

body.show-results .container {
    height: auto;
    min-height: calc(100vh - 60px);
}

.header-image {
    width: 100%;
    max-width: 500px;
    /* margin-bottom: 20px; */
    transition: all 0.8s ease;
    margin-top: 1rem;
    position: relative;
    /* 設置為相對定位 */
    z-index: 10;
    /* 確保在最上層 */
}

.header-image.quiz-mode {
    width: 10%;
    max-width: 120px;
    margin: 0;
    position: absolute;
    top: 15px;
    left: 20px;
    transform: none;
    padding: 0;
}

/* 確保在結果頁面中，標題圖片保持位置不變 */
body.show-results .header-image.quiz-mode {
    position: relative;
    top: 0;
    left: 0;
    max-width: 250px;
    margin: 0;
}

.game-container {
    width: 100%;
    max-width: 800px;
    /* padding: 20px; */
    display: none;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
    background: none;
    box-shadow: none;
    /* margin: auto 0; */
}

.game-container.show {
    opacity: 1;
    transform: translateY(0);
}

.progress {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    display: none;
    /* Hide by default */
}

body.game-active .progress {
    display: block;
}

.progress-bar {
    height: 100%;
    background: #4CAF50;
    transition: width 0.3s ease;
}

.quiz-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* gap: 15px; */
    margin-bottom: 20px;
    width: 100%;
    min-height: calc(100vh - 200px);
}

body.show-results .quiz-layout {
    min-height: auto;
}

.quiz-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.quiz-image-container {
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 15px 0;
    backdrop-filter: blur(5px);
}

.quiz-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.options {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    margin: 0;
}

.option-btn {
    width: 90px;
    height: 90px;
    border: none;
    border-radius: 50%;
    font-size: 42px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.option-btn:hover {
    transform: scale(1.1);
}

.option-btn.o {
    background: #4CAF50;
    color: white;
}

.option-btn.o:hover {
    background: #45a049;
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.4);
}

.option-btn.x {
    background: #f44336;
    color: white;
}

.option-btn.x:hover {
    background: #e53935;
    box-shadow: 0 5px 20px rgba(244, 67, 54, 0.4);
}

.question {
    font-size: 32px;
    font-weight: 600;
    margin: 15px 0;
    padding: 15px;
    min-height: 80px;
    color: white;
    text-align: left;
    line-height: 1.6;
    width: 100%;
    transition: opacity 0.5s ease;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 0, 0, 0.3);
    flex: 1;
    display: flex;
    align-items: center;
}

.question.hide {
    margin: 0;
    padding: 0;
    min-height: 0;
    height: 0;
    opacity: 0;
    overflow: hidden;
}

.welcome-screen {
    text-align: center;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.welcome-screen h1 {
    color: white;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.welcome-screen p {
    color: white;
    margin-top: 20px;
    font-size: 18px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.result {
    text-align: center;
    font-size: 24px;
    /* margin-top: 20px; */
    color: white;
    /* text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2); */
}

.stars-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
    perspective: 1000px;
    transform-style: preserve-3d;
    padding: 10px;
    /* 添加內邊距避免裁切 */
}

.star {
    width: 100px;
    height: 100px;
    opacity: 0;
    transform: scale(0.3) rotateY(-180deg) translateZ(-200px);
    transition: all 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.6));
    transform-style: preserve-3d;
    perspective: 1000px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.star img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.star.show {
    opacity: 1;
    transform: scale(1) rotateY(0deg) translateZ(0);
    filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.8));
    animation: starRotate 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes starRotate {
    0% {
        transform: scale(0.3) rotate(-360deg) translateY(30px);
        opacity: 0;
    }

    70% {
        transform: scale(1.1) rotate(-90deg) translateY(0);
        opacity: 0.9;
    }

    100% {
        transform: scale(1) rotate(0deg) translateY(0);
        opacity: 1;
    }
}

@keyframes starShine {

    0%,
    100% {
        filter: brightness(1) drop-shadow(0 0 15px rgba(255, 215, 0, 0.6));
    }

    50% {
        filter: brightness(1.3) drop-shadow(0 0 25px rgba(255, 215, 0, 0.8));
    }
}

.score-text {
    font-size: 36px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin: 20px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.score-text.show {
    opacity: 1;
    transform: translateY(0);
}

.feedback-text {
    font-size: 28px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin: 20px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease 0.3s;
}

.feedback-text.show {
    opacity: 1;
    transform: translateY(0);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 40px auto 0 auto;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease 0.6s;
    width: 100%;
    max-width: 350px;
}

.action-buttons.show {
    opacity: 1;
    transform: translateY(0);
}

/* Share Button - 分享給朋友 (matching reveal-btn style) */
.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 40px;
    font-size: 24px;
    background: #06C755;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-family: inherit;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.share-btn svg {
    width: 24px;
    height: 24px;
}

.share-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(6, 199, 85, 0.4);
}

.share-btn:hover::before {
    width: 300px;
    height: 300px;
}

.share-btn:active {
    transform: translateY(1px);
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 500;
    z-index: 100000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: rgba(6, 199, 85, 0.95);
}

.toast.info {
    background: rgba(33, 150, 243, 0.95);
}

/* Reveal Button - 點我看詳解 */
.reveal-btn {
    padding: 12px 24px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.reveal-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
    transform: translateY(-2px);
}

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

.floating-items {
    position: fixed;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.floating-item {
    position: absolute;
    animation: float 20s infinite linear;
    opacity: 0.15;
    will-change: transform, opacity;
}

.floating-item.slow {
    animation-duration: 25s;
}

.floating-item.fast {
    animation-duration: 15s;
}

@keyframes float {
    0% {
        transform: translate(0, 120vh) rotate(0deg) scale(1);
        opacity: 0.15;
    }

    20% {
        transform: translate(-20px, 80vh) rotate(90deg) scale(1.1);
        opacity: 0.15;
    }

    40% {
        transform: translate(20px, 40vh) rotate(180deg) scale(1.2);
        opacity: 0.15;
    }

    60% {
        transform: translate(-10px, 20vh) rotate(270deg) scale(1.1);
        opacity: 0.15;
    }

    80% {
        transform: translate(10px, -20vh) rotate(360deg) scale(1);
        opacity: 0.1;
    }

    100% {
        transform: translate(0, -40vh) rotate(420deg) scale(0.8);
        opacity: 0;
    }
}

.start-btn {
    padding: 15px 40px;
    font-size: 24px;
    background: #176847;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    margin: 20px 0;
}

.start-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(23, 104, 71, 0.4);
}

.start-btn:hover::before {
    width: 300px;
    height: 300px;
}

.start-btn:active {
    transform: translateY(1px);
}

/* Restart Button - 再玩一次 */
.restart-btn {
    padding: 15px 40px;
    font-size: 20px;
    background: #02a568;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 30px auto;
    display: block;
    /* box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4); */
}

.restart-btn:hover {
    transform: translateY(-3px);
    /* box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5); */
}

.restart-btn:active {
    transform: translateY(1px);
}

/* Explanation Section */
.explanation-section {
    width: 100%;
    max-width: 500px;
    margin: 30px auto;
    opacity: 1;
}

.explanation-section.show {
    opacity: 1;
}

/* Explanation Card */
.explanation-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    text-align: left;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.explanation-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.explanation-card .card-header span:first-child {
    font-weight: 600;
    color: #444;
    font-size: 16px;
}

.explanation-card .card-question {
    /* font-size: 18px; */
    font-weight: 500;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.6;
}

.explanation-card .card-explanation {
    /* font-size: 16px; */
    color: #555;
    line-height: 1.7;
    background: #e5f5fb;
    padding: 15px;
    border-radius: 12px;
    /* border-left: 4px solid #667eea; */
}

.mobile-options {
    display: none;
    /* 預設隱藏手機版按鈕容器 */
    position: relative;
    z-index: 10;
}

@media (max-width: 768px) {
    body {
        height: calc(100vh - 60px);
        /* 扣除底部導覽列高度 */
        overflow: hidden;
    }

    body.show-results {
        height: auto;
        overflow-y: auto;
    }

    .container {
        justify-content: flex-start;
        transform: scale(0.95);
        padding: 10px;
        padding-bottom: 60px;
        height: calc(100vh - 60px);
        min-height: calc(100vh - 60px);
    }

    body.show-results .container {
        height: auto;
        min-height: calc(100vh - 60px);
    }

    .header-image {
        margin-top: 1rem;
        max-width: 400px;
    }

    .header-image.quiz-mode {
        max-width: 160px;
        margin: 8px 0;
    }

    .quiz-image-container {
        width: 280px;
        height: 280px;
        margin: 40px 0 20px 0;
    }

    .question {
        font-size: 22px;
        padding: 10px;
        min-height: 60px;
        margin: 10px 0;
    }

    .quiz-content .options {
        display: none;
        /* 隱藏電腦版按鈕 */
    }

    .option-btn {
        width: 70px;
        height: 70px;
        font-size: 32px;
    }

    .stars-container {
        gap: 12px;
        margin: 15px 0;
        padding: 8px;
        /* 手機版的內邊距 */
    }

    .star {
        width: 65px;
        /* 稍微再縮小一點 */
        height: 65px;
    }

    .quiz-content {
        flex-direction: column;
    }

    .mobile-options {
        display: none;
        /* Default hidden */
        flex-direction: row;
        justify-content: center;
        gap: 20px;
        width: 100%;
        position: fixed;
        bottom: 0;
        /* Align to bottom */
        left: 0;
        right: 0;
        z-index: 100;
        padding: 10px 0;
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        background: linear-gradient(to top, rgba(255, 255, 255, 0.1), transparent);
    }

    body.game-active .mobile-options {
        display: flex;
    }

    .progress {
        bottom: 0;
    }

    .welcome-screen {
        padding: 10px;
    }

    .welcome-screen h1 {
        font-size: 28px;
        margin-bottom: 15px;
    }

    .welcome-screen p {
        font-size: 16px;
        margin-top: 15px;
    }

    .start-btn {
        padding: 12px 30px;
        font-size: 20px;
        margin: 15px 0;
    }

    .action-buttons {
        gap: 15px;
        margin-top: 20px;
        margin-bottom: 20px;
    }

    .reveal-btn,
    .checklist-btn {
        padding: 12px 30px;
        font-size: 20px;
    }

    .explanation-card {
        padding: 15px;
        margin-bottom: 10px;
    }

    .card-question {
        font-size: 18px;
        text-align: left;
    }

    .card-explanation {
        font-size: 16px;
        padding: 5px 0;
    }

    .modal-content {
        padding: 20px;
        margin: 10px;
    }

    .form-group {
        gap: 3px;
    }

    .form-group label {
        font-size: 14px;
    }

    .form-group input {
        padding: 8px;
        font-size: 14px;
    }

    .submit-btn {
        padding: 10px;
        font-size: 16px;
    }

    .score-text {
        font-size: 28px;
        /* 調整分數文字大小 */
        margin: 15px 0;
    }
}

.quiz-content,
.mobile-options {
    transition: opacity 0.3s ease;
}

.quiz-content.fade-out,
.mobile-options.fade-out {
    opacity: 0;
}

.explanation-section {
    position: relative;
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: center;
    background: transparent;
    padding: 0;
    margin-top: 30px;
    opacity: 0;
    transform: translateY(30px);
    visibility: hidden;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    scroll-margin-top: 20px;
}

.explanation-section.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.explanation-cards {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 0;
    overflow: hidden;
    transition: all 0.5s ease;
    align-items: stretch;
}

.explanation-cards.show {
    height: auto;
    align-items: center;
}

.explanation-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    width: 100%;
    max-width: 800px;
}

.explanation-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.card-question {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    text-align: left;
    gap: 10px;
}

.card-explanation {
    font-size: 20px;
    color: #666;
    line-height: 1.7;
    padding: 10px 0;
    text-align: left;
}

.reveal-btn {
    padding: 15px 40px;
    font-size: 24px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-family: inherit;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.reveal-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.reveal-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(33, 150, 243, 0.4);
}

.reveal-btn:hover::before {
    width: 300px;
    height: 300px;
}

.reveal-btn:active {
    transform: translateY(1px);
}

.checklist-btn {
    padding: 15px 40px;
    font-size: 24px;
    background: #FF9800;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-family: 'BpmfGenSenRounded', Arial, sans-serif;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 10px;
}

.checklist-btn svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.checklist-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(255, 152, 0, 0.4);
}

.checklist-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.checklist-btn:hover::before {
    width: 300px;
    height: 300px;
}

.checklist-btn:active {
    transform: translateY(1px);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.checklist-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 16px;
    color: #333;
}

.form-group input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.submit-btn {
    padding: 12px;
    background: #FF9800;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    margin-top: 10px;
}

.submit-btn:hover {
    background: #F57C00;
}

@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .reveal-btn,
    .checklist-btn {
        width: 100%;
    }
}

.answer-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.answer-indicator svg {
    width: 100%;
    height: 100%;
}

.answer-indicator.correct svg {
    fill: none;
    stroke: #4CAF50;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.answer-indicator.incorrect svg {
    fill: none;
    stroke: #f44336;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 768px) {
    .explanation-card {
        padding: 15px;
        margin-bottom: 10px;
        width: calc(100% - 20px);
        max-width: none;
    }

    .explanation-section {
        padding: 0px;
        padding-top: 10px;
    }

    .explanation-cards {
        gap: 0px;
    }
}