@charset "UTF-8";
:root {
    --primary-color: #C0392B; /* 深红色 - 中国红 */
    --bg-color: #F5F5F5; /* 浅灰 - 背景色 */
    --accent-color: #F1C40F; /* 金黄色 - 传统金 */
    --success-color: #2ECC71; /* 绿色 - 正确提示 */
    --text-color: #333333;
    --font-family: 'KaiTi', '楷体', 'STKaiti', 'Microsoft YaHei', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 18px; /* 大字体，适合老年人 */
    background-image: linear-gradient(rgba(245, 245, 245, 0.85), rgba(245, 245, 245, 0.85)), url('assets/bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

#app {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.screen {
    display: none;
    width: 100%;
    max-width: 600px;
    height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    flex-direction: column;
}

.screen.active {
    display: flex;
}

/* 登录界面 */
.login-container {
    background-color: #fff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    text-align: center;
    margin: auto;
    border: 2px solid var(--accent-color);
}

h1, h2, h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: bold;
}

h1 {
    font-size: 2.5rem;
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

label {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--primary-color);
}

input {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    box-sizing: border-box;
    outline: none;
    font-family: var(--font-family);
}

input:focus {
    border-color: var(--primary-color);
}

button {
    cursor: pointer;
    font-size: 1.2rem;
    border: none;
    border-radius: 10px;
    padding: 15px 30px;
    font-family: var(--font-family);
    transition: all 0.3s;
    font-weight: bold;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #A93226;
}

.btn-large {
    width: 100%;
    padding: 20px;
    font-size: 1.5rem;
}

.btn-secondary {
    background-color: var(--accent-color);
    color: #333;
}

.btn-secondary:hover {
    background-color: #D4AC0D;
}

.btn-tool {
    background-color: #3498DB;
    color: white;
    width: 100%;
    margin-top: 20px;
}

.btn-tool:disabled {
    background-color: #95A5A6;
    cursor: not-allowed;
}

/* 主界面 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    padding: 15px 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-left: 5px solid var(--primary-color);
}

.user-info {
    font-size: 1.2rem;
    font-weight: bold;
}

.stats {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: bold;
}

.level-selection {
    flex: 1;
    overflow-y: auto;
    background-color: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.chapter-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    margin-top: 20px;
    margin-bottom: 15px;
}

.level-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.level-btn {
    background-color: var(--bg-color);
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 15px 0;
    font-size: 1.2rem;
    font-weight: bold;
    color: #666;
    transition: all 0.3s;
}

.level-btn.unlocked {
    background-color: white;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.level-btn.unlocked:hover {
    background-color: var(--primary-color);
    color: white;
}

.level-btn.completed {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #333;
}

/* 游戏界面 */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    padding: 15px 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-left: 5px solid var(--primary-color);
}

.game-stats {
    display: flex;
    gap: 15px;
    font-size: 1.1rem;
    font-weight: bold;
}

.timer {
    color: var(--primary-color);
}

.game-content-container {
    flex: 1;
    background-color: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 2px solid var(--accent-color);
}

.question-box {
    text-align: center;
    margin-bottom: 40px;
}

#question-context {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 15px;
}

#question-text {
    font-size: 2rem;
    line-height: 1.5;
    font-weight: bold;
    color: var(--text-color);
}

.blank {
    display: inline-block;
    min-width: 60px;
    border-bottom: 3px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0 10px;
}

.options-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.option-btn {
    background-color: #f9f9f9;
    border: 2px solid #ddd;
    border-radius: 12px;
    padding: 20px;
    font-size: 1.5rem;
    color: var(--text-color);
    transition: all 0.3s;
}

.option-btn:hover {
    border-color: var(--primary-color);
    background-color: #fdf2f0;
}

.option-btn.correct {
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.option-btn.wrong {
    background-color: #E74C3C;
    border-color: #E74C3C;
    color: white;
}

.tools-container {
    margin-top: 20px;
}

.hint-text {
    margin-top: 15px;
    padding: 15px;
    background-color: #FEF9E7;
    border-left: 4px solid var(--accent-color);
    border-radius: 5px;
    font-size: 1.2rem;
    color: #333;
}

.hidden {
    display: none;
}

/* 结果弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 90%;
    width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border: 3px solid var(--accent-color);
}

.modal-content h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.modal-content p {
    font-size: 1.5rem;
    margin: 20px 0;
}

#result-score {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 2rem;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

/* 认知报告特有样式 */
.report-content {
    width: 500px;
    max-width: 95%;
    max-height: 85vh;
    overflow-y: auto;
}

.report-user-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: var(--text-color);
    background-color: #FEF9E7;
    padding: 10px;
    border-radius: 8px;
    border: 1px dashed var(--accent-color);
}

.report-user-info p {
    margin: 0 !important;
    font-size: 1.2rem !important;
}

.report-user-info span {
    font-weight: bold;
    color: var(--primary-color);
}

.report-stats {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    background-color: var(--bg-color);
    padding: 15px;
    border-radius: 10px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 1rem;
    color: #666;
}

.stat-value {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: bold;
    margin-top: 5px;
}

.report-details {
    text-align: left;
    margin-top: 20px;
}

.report-details h3 {
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 5px;
    color: var(--primary-color);
}

.wrong-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 250px;
    overflow-y: auto;
}

.wrong-list li {
    background-color: #f9f9f9;
    margin-bottom: 10px;
    padding: 15px;
    border-left: 4px solid #E74C3C;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.wrong-q {
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 1.1rem;
    color: var(--text-color);
}

.wrong-a {
    color: var(--success-color);
    font-size: 1rem;
    font-weight: bold;
}
