﻿/* =========================================================
   基本設定
========================================================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: "Microsoft JhengHei", Arial, sans-serif;
    color: #24313d;
}

html {
    scroll-behavior: smooth;
}

body.bible-quiz-page {
    margin: 0;
    padding: 0;
    background: #f4f6f8;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}


/* =========================================================
   主要內容
========================================================= */

.page-wrap {
    width: 100%;
    max-width: 1157px;
    margin: 0 auto;
    padding: 105px 16px 45px;
}


.hidden-reference-trigger {
    display: none !important;
}


/* =========================================================
   聖經縮寫對照表
========================================================= */

.reference-panel {
    width: 100%;
    max-width: 100%;
    background: #fff;
    border: 1px solid #e1e6ea;
    border-radius: 18px;
    padding: 34px 36px;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(20, 35, 50, .07);
}


.reference-header {
    padding-bottom: 22px;
    margin-bottom: 24px;
    border-bottom: 1px solid #e6eaee;
}


/* =========================================================
   開始闖關
========================================================= */

.start-quiz-btn {
    display: inline-block;
    margin-top: 0;
    padding: 12px 22px;
    background: #d9912b;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 9px;
    font-size: 17px;
    font-weight: bold;
    transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}


    .start-quiz-btn:hover {
        background: #c77f1f;
        color: #fff !important;
        transform: translateY(-1px);
        box-shadow: 0 5px 12px rgba(198, 127, 31, .20);
    }


/* =========================================================
   對照表標題
========================================================= */

.reference-section h2 {
    margin: 0 0 26px;
    color: #1f3044;
    font-size: 28px;
    font-weight: 800;
}


.reference-section h3 {
    color: #2f69b1;
    padding-left: 12px;
    border-left: 5px solid #5a8edb;
    margin: 24px 0 18px;
    font-size: 20px;
    font-weight: 700;
}


/* =========================================================
   對照表內容
========================================================= */

.reference-item {
    width: 100%;
    background: #f7f9fb;
    border-radius: 12px;
    padding: 20px 22px;
    margin-bottom: 14px;
    line-height: 1.9;
    font-size: 18px;
    overflow-wrap: break-word;
}


.reference-memory {
    margin-bottom: 4px;
}


.memory-line {
    color: #c26520;
    margin-top: 8px;
    font-size: 20px;
    font-weight: bold;
}


.reference-books {
    overflow-wrap: break-word;
}


.reference-footer {
    text-align: center;
    padding-top: 10px;
}


/* =========================================================
   遊戲主卡
========================================================= */

.game-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 14px 40px rgba(20, 35, 50, .10);
    padding: 42px 46px 48px;
    overflow: hidden;
}


/* =========================================================
   開始畫面標題
========================================================= */

.title-area {
    text-align: center;
    margin-bottom: 16px;
}


    .title-area h1 {
        margin: 0;
        font-size: 34px;
        line-height: 1.4;
        color: #1f3044;
        font-weight: 800;
    }


/* =========================================================
   開始說明
========================================================= */

.start-description {
    margin: 0 0 16px;
    padding: 0 10px;
    text-align: center;
    color: #556575;
    font-size: 18px;
    line-height: 1.8;
    font-weight: 600;
}


/* =========================================================
   對照表按鈕
========================================================= */

.reference-cta-wrap {
    margin-top: 0;
    margin-bottom: 30px;
    text-align: center;
}


.reference-cta-btn {
    display: inline-block;
    padding: 12px 24px;
    background: #3f7fce;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 10px;
    font-size: 17px;
    font-weight: bold;
    transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}


    .reference-cta-btn:hover {
        background: #326db8;
        color: #fff !important;
        transform: translateY(-1px);
        box-shadow: 0 5px 14px rgba(63, 127, 206, .22);
    }


/* =========================================================
   難度
========================================================= */

.level-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}


.level-card {
    display: block;
    width: 100%;
    min-width: 0;
    text-decoration: none;
    padding: 42px 20px 36px;
    border-radius: 18px;
    border: 1px solid #dfe5ea;
    background: #fbfcfd;
    color: #24313d;
    text-align: center;
    transition: box-shadow .15s ease, transform .15s ease;
}


    .level-card:hover {
        color: #24313d;
        text-decoration: none;
        box-shadow: 0 8px 20px rgba(20, 35, 50, .08);
        transform: translateY(-2px);
    }


    .level-card.easy {
        border-top: 5px solid #4fa46a;
        border-bottom: 5px solid #4fa46a;
    }


    .level-card.normal {
        border-top: 5px solid #e0a726;
        border-bottom: 5px solid #e0a726;
    }


    .level-card.hard {
        border-top: 5px solid #ca5f5f;
        border-bottom: 5px solid #ca5f5f;
    }


.level-name {
    display: block;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 12px;
}


.level-target {
    display: block;
    color: #6f7d8b;
    font-size: 17px;
    margin-bottom: 4px;
}


.level-start {
    margin-top: 0;
    margin-bottom: 0;
}


/* =========================================================
   宣傳圖
========================================================= */

.quiz-share-banner {
    width: 100%;
    margin-top: 32px;
    overflow: hidden;
    border-radius: 16px;
}


    .quiz-share-banner img {
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: 1200 / 630;
        object-fit: contain;
        border-radius: 16px;
    }


/* =========================================================
   遊戲狀態
========================================================= */

.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    background: #f7f9fb;
    border-radius: 14px;
    padding: 18px 22px;
    margin-bottom: 12px;
}


.status-label {
    display: block;
    font-size: 13px;
    color: #8a96a1;
    margin-bottom: 3px;
}


.status-value {
    font-weight: bold;
    font-size: 17px;
}


.score {
    font-size: 24px;
}


/* =========================================================
   進度條
========================================================= */

.progress-track {
    height: 11px;
    background: #edf0f2;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 24px;
}


.progress-bar {
    height: 100%;
    background: #4b8dd8;
}


/* =========================================================
   題目區
========================================================= */

.question-box {
    width: 100%;
    border: 1px solid #e2e7ec;
    border-radius: 18px;
    padding: 30px 34px 26px;
}


/* =========================================================
   上一題結果
========================================================= */

.previous-result {
    margin-bottom: 22px;
    padding: 15px 18px;
    border-radius: 11px;
    font-weight: bold;
    line-height: 1.65;
    font-size: 16px;
}


    .previous-result.correct {
        background: #edf8f1;
        color: #23844d;
        border: 1px solid #cfe8d8;
    }


    .previous-result.wrong {
        background: #fff1f1;
        color: #b83f3f;
        border: 1px solid #f0cccc;
    }


/* =========================================================
   題號 + 題目
   全部同一行
========================================================= */

.question-title-row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 14px;
    margin-bottom: 26px;
    white-space: nowrap;
}


.question-no {
    color: #768391;
    font-size: 15px;
    margin: 0;
    flex: 0 0 auto;
}


.quiz-prompt {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    margin: 0;
    line-height: 1.4;
    white-space: nowrap;
}


/* =========================================================
   藍色簡稱
========================================================= */

.short-name {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 9px 15px;
    margin: 0;
    border-radius: 11px;
    background: #3f7fce;
    color: #fff;
    font-size: 29px;
    flex: 0 0 auto;
}


/* =========================================================
   答案
========================================================= */

.answer-area {
    background: #f5f8fb;
    border-radius: 13px;
    padding: 17px;
    text-align: center;
    margin-bottom: 22px;
}


.answer-label {
    font-size: 13px;
    color: #7a8792;
    margin-bottom: 6px;
}


.answer-display {
    min-height: 43px;
    font-size: 29px;
    font-weight: bold;
    letter-spacing: 6px;
    color: #203040;
}


/* =========================================================
   提示
========================================================= */

.char-help {
    text-align: center;
    color: #657687;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 14px;
    line-height: 1.6;
}


/* =========================================================
   選字
========================================================= */

.char-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 11px;
    margin-bottom: 10px;
}


.char-btn {
    width: 100%;
    min-width: 0;
    min-height: 62px;
    border: 1px solid #dbe2e8;
    background: #fff;
    border-radius: 11px;
    font-size: 24px;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    transition: all .15s ease;
}


    .char-btn:hover {
        background: #eef5ff;
        border-color: #4b8dd8;
    }


    .char-btn.selected-char {
        background: #dfe6ec;
        color: #9aa4ad;
        border-color: #d5dde4;
    }


        .char-btn.selected-char:hover {
            background: #fbe6e6;
            color: #b84a4a;
            border-color: #e6aaaa;
        }


/* =========================================================
   訊息
========================================================= */

.message {
    display: block;
    min-height: 0;
    margin: 4px 0 8px;
    font-weight: bold;
    line-height: 1.7;
}


    .message:empty {
        display: none;
    }


    .message.warning {
        color: #b67618;
    }


/* =========================================================
   操作按鈕
========================================================= */

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}


.btn {
    border: 0;
    border-radius: 9px;
    padding: 12px 19px;
    font-family: inherit;
    font-size: 16px;
    cursor: pointer;
}


    .btn.primary {
        background: #2f78c4;
        color: #fff;
    }


        .btn.primary:hover {
            background: #2769aa;
        }


    .btn.clear-btn {
        background: #e9edf1;
        color: #455563;
    }


    .btn.text-btn {
        background: #f2f4f6;
        color: #5a6670;
    }


/* =========================================================
   過關
========================================================= */

.success-panel {
    text-align: center;
    padding: 34px 10px;
}


.trophy {
    width: 80px;
    height: 80px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #fff3c9;
    color: #d39a19;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
}


.success-panel h2 {
    font-size: 30px;
}


.success-text {
    display: block;
    margin-bottom: 24px;
    line-height: 1.8;
}


.success-main {
    display: block;
    font-size: 30px;
    font-weight: bold;
    color: #1f4f8f;
    margin-bottom: 8px;
}


.success-sub {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #d17a00;
}


/* =========================================================
   平板
========================================================= */

@media (max-width: 900px) {

    .page-wrap {
        padding-top: 95px;
    }

    .game-card {
        padding: 34px 28px 40px;
    }

    .level-card {
        padding: 35px 15px 30px;
    }
}


/* =========================================================
   手機
========================================================= */

@media (max-width: 700px) {


    .page-wrap {
        width: 100%;
        max-width: 100%;
        padding: 82px 10px 30px;
    }


    .game-card {
        width: 100%;
        padding: 24px 14px 22px;
        border-radius: 16px;
    }


    /* =====================
       開始畫面
    ===================== */

    .title-area h1 {
        font-size: 27px;
        line-height: 1.45;
    }


    .start-description {
        margin-bottom: 14px;
        padding: 0 3px;
        font-size: 15px;
        line-height: 1.75;
    }


    .reference-cta-wrap {
        margin-bottom: 24px;
    }


    .reference-cta-btn {
        padding: 11px 18px;
        font-size: 15px;
    }


    /* =====================
       難度
    ===================== */

    .level-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }


    .level-card {
        padding: 28px 16px 24px;
    }


    .level-name {
        font-size: 25px;
    }


    .level-target {
        font-size: 16px;
    }


    /* =====================
       遊戲狀態
    ===================== */

    .status-row {
        gap: 10px;
        padding: 15px 16px;
    }


    .status-value {
        font-size: 15px;
    }


    .score {
        font-size: 21px;
    }


    .progress-track {
        margin-bottom: 18px;
    }


    /* =====================
       題目框
    ===================== */

    .question-box {
        padding: 21px 13px 18px;
    }


    /* =====================
       第7題 + 簡稱 + 題目
       手機固定一行
    ===================== */

    .question-title-row {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: nowrap;
        gap: 7px;
        margin-bottom: 18px;
        white-space: nowrap;
    }


    .question-no {
        font-size: 13px;
        margin: 0;
        flex: 0 0 auto;
    }


    .quiz-prompt {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: nowrap;
        gap: 5px;
        font-size: 15px;
        margin: 0;
        line-height: 1.4;
        white-space: nowrap;
    }


    .short-name {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 21px;
        min-width: 48px;
        padding: 7px 9px;
        margin: 0;
        flex: 0 0 auto;
    }


    /* =====================
       答案
    ===================== */

    .answer-area {
        padding: 9px 12px 10px;
        margin-bottom: 14px;
    }

    .answer-label {
        font-size: 12px;
        margin-bottom: 2px;
        line-height: 1.3;
    }

    .answer-display {
        min-height: 32px;
        font-size: 22px;
        line-height: 1.35;
        letter-spacing: 3px;
    }


    /* =====================
       提示
    ===================== */

    .char-help {
        font-size: 14px;
        margin-bottom: 10px;
        line-height: 1.5;
    }


    /* =====================
       選字
    ===================== */

    .char-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 7px;
        margin-bottom: 6px;
    }


    .char-btn {
        min-height: 52px;
        padding: 0;
        font-size: 21px;
    }


    /* =====================
       訊息
    ===================== */

    .message {
        min-height: 0;
        margin: 3px 0 6px;
    }


        .message:empty {
            display: none;
        }


    /* =====================
       下方按鈕
    ===================== */

    .action-row {
        margin-top: 4px;
    }


        .action-row .btn {
            flex: 1 1 45%;
        }


    /* =====================
       對照表
    ===================== */

    .reference-panel {
        padding: 22px 15px;
        border-radius: 14px;
    }


    .reference-section h2 {
        font-size: 24px;
    }


    .reference-section h3 {
        font-size: 19px;
    }


    .reference-item {
        padding: 13px;
        font-size: 16px;
    }
}


/* =========================================================
   小手機
========================================================= */

@media (max-width: 420px) {

    .page-wrap {
        padding-left: 8px;
        padding-right: 8px;
    }


    .game-card {
        padding-left: 12px;
        padding-right: 12px;
    }


    .title-area h1 {
        font-size: 24px;
    }


    /*
       小螢幕也盡量維持整題同一行
    */

    .question-title-row {
        gap: 5px;
    }


    .question-no {
        font-size: 12px;
    }


    .quiz-prompt {
        gap: 4px;
        font-size: 14px;
    }


    .short-name {
        min-width: 46px;
        padding: 7px 8px;
        font-size: 20px;
    }


    .char-grid {
        gap: 6px;
        margin-bottom: 5px;
    }


    .char-btn {
        min-height: 48px;
        font-size: 19px;
    }
}
