        body { 
            font-family: 'Segoe UI', Arial, sans-serif;
            max-width: 1000px; 
            margin: 20px auto; 
            padding: 30px; 
            background-color: #f8f9fa; 
            line-height: 1.8;
        }

        .speak-container {
            padding: 20px;
            background: #f8f9fa;
            border-radius: 8px;
            margin: 15px 0;
            text-align: center;
        }
.speak-container .question-media {
    margin: 15px auto;
    max-width: 100%;
}

.speak-container .question-media img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.speak-container .question-media audio,
.speak-container .question-media video {
    width: 100%;
    max-width: 500px;
    margin: 10px auto;
    display: block;
}
        .speak-text {
            font-size: 1.2em;
            padding: 15px;
            background: white;
            border-radius: 8px;
            margin: 10px auto;
            line-height: 1.6;
            max-width: 90%;
            text-align: left;
        }
.wrong-bank-item > span:last-child {
    background: #fafafa !important;
    padding: 6px 10px;
    border-radius: 20px;
    font-weight: bold;
    min-width: 100px;
    text-align: center;
}
.wrong-bank-list {
    max-height: 400px;
    overflow-y: auto;
    margin: 15px 0;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
}
.wrong-bank-item {
    padding: 12px;
    margin: 8px 0;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e0e0e0;
}

.wrong-bank-item > div:first-child {
    flex: 1;
    margin-right: 15px;
}

.wrong-bank-item strong {
    color: #555;
    font-size: 0.9em;
}

.wrong-bank-item span {
    display: block;
    margin-top: 4px;
}
/* --- 为学生权限开关添加的样式 --- */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}
.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}
input:checked + .slider {
  background-color: #2196F3;
}
input:focus + .slider {
  box-shadow: 0 0 1px #2196F3;
}
input:checked + .slider:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}
.slider.round {
  border-radius: 34px;
}
.slider.round:before {
  border-radius: 50%;
}
/* --- 样式添加结束 --- */
.wrong-bank-item > span:last-child {
    background: #ffebee;
    padding: 6px 10px;
    border-radius: 20px;
    font-weight: bold;
    color: #d32f2f;
    min-width: 100px;
    text-align: center;
}
        .record-btn, .submit-speak, .stop-record-btn {
            margin: 10px 5px;
            padding: 10px 20px;
        }
        .recording-indicator {
            color: #e74c3c;
            font-weight: bold;
            margin: 10px 0;
        }
        .recording-dot {
            display: inline-block;
            width: 10px;
            height: 10px;
            background: #e74c3c;
            border-radius: 50%;
            margin-right: 5px;
            animation: pulse 1s infinite;
        }
        @keyframes pulse {
            0% { opacity: 1; }
            50% { opacity: 0.5; }
            100% { opacity: 1; }
        }
        .audio-waveform {
            margin: 15px auto;
            border: 1px solid #ccc;
            background: #f0f0f0;
            display: none;
        }
        .error-analysis {
            margin-top: 10px;
            padding: 10px;
            background: #fff8e1;
            border-radius: 6px;
        }
        .final-score {
            font-weight: bold;
            font-size: 1.2em;
            margin: 10px 0;
        }
        .partial {
            color: #ff9800;
            font-weight: bold;
        }
        .question-page { 
            display: none;
            padding: 30px; 
            margin: 25px 0; 
            background: white; 
            border-radius: 12px; 
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }
        .question-title { 
            font-size: 24px;
            margin-bottom: 25px; 
            color: #2c3e50; 
        }
        .question-media {
            margin: 15px 0;
            max-width: 100%;
        }
        .question-video {
            width: 100%;
            max-height: 400px;
            background: #000;
        }
       
.option-audio {
    margin-top: 8px;
}
.teacher-management {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.teacher-form {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  align-items: flex-end;
  flex-wrap: wrap;
}
/* 教师管理页面选项卡样式 */
.teacher-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 2px solid #ddd;
}

.tab-btn {
  padding: 10px 20px;
  background: #f1f1f1;
  border: none;
  border-radius: 5px 5px 0 0;
  margin-right: 5px;
  cursor: pointer;
  font-size: 16px;
}

.tab-btn.active {
  background: #3498db;
  color: white;
}

.teacher-tab-content {
  display: none;
  padding: 20px;
  background: white;
  border-radius: 0 0 5px 5px;
}

.teacher-tab-content.active {
  display: block;
}

/* 题库管理相关样式 */
.bank-management {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.bank-list {
  max-height: 300px;
  overflow-y: auto;
  margin: 15px 0;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.bank-item {
  padding: 10px;
  margin: 8px 0;
  background: #f8f9fa;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #e0e0e0;
}

.upload-section {
  margin: 20px 0;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
}
.teacher-form input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.teacher-form button {
  padding: 8px 16px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.teacher-form button:hover {
  background: #45a049;
}

.teacher-list {
  margin-top: 20px;
}

.teacher-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  margin: 8px 0;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}
.option-audio audio {
    width: 100%;
    max-width: 300px;
    margin-top: 5px;
} 
.options { 
    display: flex; 
    flex-wrap: wrap;
    gap: 10px;
}

/* 2. Label 移除固定的 font-size，改由内部的 option-text 控制 */
.options label { 
    flex: 1 1 auto;
    margin: 5px;
    /* font-size: 20px;  <-- 建议删除这一行，让内部控制 */
    padding: 12px; 
    border-radius: 8px; 
    transition: background 0.3s; 
    box-sizing: border-box;
    border: 1px solid #ddd;
    display: flex; /* 建议增加，方便对齐 */
    align-items: center; /* 垂直居中 */
}

/* 3. 新增：专门给选项文字定义的样式 */
.option-text {
    flex: 1;
    font-size: 20px; /* 这里设置默认字号 */
    color: #333;      /* 这里设置默认颜色 */
}

.options label:hover { background-color: #f1f4f7; }

.options label input[type="radio"], 
.options label input[type="checkbox"] {
    margin-right: 10px;
    width: 20px;  /* 固定勾选框大小，不随字号变大而变大 */
    height: 20px;
}
        .text-answer { 
            font-size: 20px;
            padding: 12px; 
            width: 100%; 
            max-width: 600px; 
            border: 2px solid #ddd; 
            border-radius: 8px;
        }
        button { 
            padding: 15px 30px;
            margin: 15px 0; 
            background-color: #3498db; 
            color: white; 
            border: none; 
            border-radius: 8px; 
            cursor: pointer; 
            font-size: 18px; 
            transition: background 0.3s;
        }
        button:hover { background-color: #2980b9; }
        .timer { 
            position: fixed;
            top: 20px; 
            left: 20px; 
            background: #fff; 
            padding: 15px 25px; 
            border-radius: 8px; 
            box-shadow: 0 4px 6px rgba(0,0,0,0.1); 
            font-size: 20px; 
            color: #e74c3c;
            font-weight: bold; 
        }
        .score-board { 
            position: fixed;
            top: 20px; 
            right: 20px; 
            background: #fff; 
            padding: 15px 25px; 
            border-radius: 8px; 
            box-shadow: 0 4px 6px rgba(0,0,0,0.1); 
            font-size: 20px;
        }
        .feedback { 
            margin-top: 20px;
            padding: 20px; 
            border-radius: 8px; 
            font-size: 18px; 
        }
        .correct { 
            background-color: #dfffdf;
            border: 1px solid #4CAF50; 
        }
        .incorrect { 
            background-color: #ffe6e6;
            border: 1px solid #ff4444; 
            animation: shake 0.5s ease-in-out;
        }
        .editor-settings { 
            background: white;
            padding: 20px; 
            border-radius: 8px; 
            margin-bottom: 30px; 
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        }
        #exam-title { 
            color: #2c3e50;
            text-align: center; 
            margin-bottom: 40px; 
            padding-bottom: 20px; 
            border-bottom: 3px solid #3498db;
        }
        #error-msg { 
            display: none;
            position: fixed; 
            top: 20px; 
            left: 50%; 
            transform: translateX(-50%); 
            background: #ff4444; 
            color: white; 
            padding: 15px; 
            border-radius: 8px; 
            z-index: 1000;
        }
        .option-image {
            max-width: 100%;
            height: auto;
            margin-top: 10px;
        }
        .explanation-media {
            margin: 10px 0;
            max-width: 100%;
        }
        .explanation-media img {
            max-width: 100%;
            height: auto;
            border-radius: 6px;
        }
        .explanation-media audio, .explanation-media video {
            width: 100%;
            max-width: 400px;
            margin-top: 10px;
        }
        @media (max-width: 768px) {
            .options label {
                flex: 1 1 100%;
                margin: 5px 0;
            }
        }
        .retry-mode {
            border-left: 4px solid #ff4444;
            background-color: #fff5f5;
        }
        .retry-count {
            color: #ff4444;
            font-size: 0.8em;
            margin-left: 10px;
        }
        #final-result { 
            display: none;
            position: fixed; 
            top: 0; 
            left: 0; 
            width: 100%; 
            height: 100%; 
            background: rgba(255,255,255,0.95); 
            z-index: 9999; 
            text-align: center; 
            padding-top: 5%;
           transform: translateY(-5%);
        }
#final-result h2 {
        margin-top: 0;
        padding-top: 20px;
}
    
    #final-result p {
        margin: 10px 0;
}
        .media-upload-section {
            margin: 10px 0;
            padding: 10px;
            background: #f8f9fa;
            border-radius: 8px;
        }
        .option-item {
            margin: 10px 0;
            padding: 10px;
            border: 1px solid #eee;
            border-radius: 8px;
        }
        .bank-list, .records-list {
            min-height: 300px;
            max-height: 400px;
            overflow-y: auto;
            margin: 15px 0; 
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 8px;
        }
        .bank-item {
            padding: 8px;
            margin: 5px 0;
            background: #f8f9fa;
            border-radius: 4px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .bank-item.active {
            background-color: #e3f2fd;
            border-left: 4px solid #2196F3;
        }
        .explanation {
            margin-top: 10px;
            padding: 10px;
            background-color: #fff3e0;
            border-radius: 6px;
            font-size: 16px;
            color: #666;
        }
        .next-btn {
            margin-top: 15px;
            background-color: #4CAF50 !important;
            transition: opacity 0.3s;
        }
        .next-btn:hover {
            opacity: 0.9;
        }
        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-10px); }
            75% { transform: translateX(10px); }
        }
        #auth-overlay {
            display: none;
            position: fixed; 
            top: 0; 
            left: 0; 
            width: 100%; 
            height: 100%; 
            background: rgba(255,255,255,0.95); 
            z-index: 9999; 
            text-align: center; 
            padding-top: 15%;
        }
        .progress-container {
            width: 100%;
            background-color: #f3f3f3;
            border-radius: 5px;
            margin: 10px 0;
            overflow: hidden;
        }
        .progress-bar {
            height: 20px;
            background-color: #4CAF50;
            width: 0%;
            transition: width 0.3s ease;
            text-align: center;
            color: white;
            line-height: 20px;
            font-size: 14px;
        }
        .question-list-item {
            padding: 10px;
            margin: 5px 0;
            background: #f8f9fa;
            border-radius: 4px;
        }
        .language-hint {
            color: #3498db;
            font-weight: bold;
            margin: 0 5px;
        }
        .highlight-correct {
            color: #4CAF50;
            font-weight: bold;
        }
        .highlight-incorrect {
            color: #ff4444;
            font-weight: bold;
        }
.custom-audio-player {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s;
    -webkit-user-select: none; /* 新增此行以兼容 Safari */
    user-select: none;
}
.custom-audio-player:hover {
    background-color: #e9e9e9;
}
.speaker-icon {
    font-size: 22px;
    /* 可根据需要调整大小 */
    line-height: 1;
}
.speaker-icon.playing {
    /* 播放时动画效果 */
    animation: pulse-speaker 1.2s infinite ease-in-out;
}
.custom-audio-player audio {
    display: none; /* 隐藏原始的audio标签 */
}

@keyframes pulse-speaker {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}
        .exam-records-management {
            background: white;
            padding: 20px;
            border-radius: 8px;
            margin-bottom: 30px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        }
.alchemy-furnace {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.furnace-table-container {
    max-height: 400px;
    overflow-y: auto;
    margin: 15px 0;
}

.furnace-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.furnace-table th, .furnace-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

.furnace-table th {
    background-color: #f2f2f2;
    position: sticky;
    top: 0;
}

.furnace-table tr:nth-child(even) {
    background-color: #f9f9f9;
}
.new-question-mode .question-title {
    border-left: 4px solid #17a2b8;
    padding-left: 10px;
}
/* 炼丹炉控制按钮样式 */
.furnace-controls {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.furnace-btn {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
}

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

.danger-btn {
    background-color: #ff4444;
    color: white;
}

.furnace-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

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

/* 添加小提示文本样式 */
.furnace-hint {
    font-size: 12px;
    color: #666;
    margin-right: auto;
    padding-left: 10px;
}
.new-question-feedback {
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.leaderboard-tab {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background-color: #f8f9fa;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
}
.leaderboard-tab:hover {
    background-color: #e9ecef;
}
.leaderboard-tab.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.bank-leaderboard-tab {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background-color: #f8f9fa;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
}
.bank-leaderboard-tab:hover {
    background-color: #e9ecef;
}
.bank-leaderboard-tab.active {
    background-color: #28a745; /* 使用绿色以区分 */
    color: white;
    border-color: #28a745;
}
/* 新增：题库拿捏率进度条样式 */
.bank-item {
  /* 使用 flex 布局，将名称和进度条分开在两端 */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  margin: 8px 0;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  cursor: pointer;
}

/* 题库名称和题目数部分 */
.bank-info {
  flex-grow: 1;
  margin-right: 15px;
}

/* 拿捏率显示整体容器 (包含百分比文本和进度条) */
.bank-mastery-display {
    display: flex;
    align-items: center;
    min-width: 170px; 
}
/* 通用榜单容器 */
.leaderboard-section {
    margin-bottom: 30px;
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.leaderboard-title {
    color: #34495e;
    font-size: 1.5em;
    border-bottom: 2px solid #f2f2f2;
    padding-bottom: 10px;
    margin-bottom: 15px;
}
/* 列表样式 */
.points-leaderboard-list {
    list-style: none;
    padding: 0;
    margin: 0;
max-height: 400px; /* 设置榜单的最大高度，您可以根据实际情况调整此值 */
    overflow-y: auto;
}
.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
    transition: background-color 0.2s;
    font-size: 0.95em;
}
.leaderboard-item:hover {
    background-color: #f7f9fb;
}
.leaderboard-header-row {
    display: flex;
    justify-content: space-between; 
    align-items: flex-end; 
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee; 
}

/* 个人积分信息区整体布局 */
.user-points-summary {
    display: flex;
    gap: 15px; /* 各项积分之间的间距 */
    white-space: nowrap; /* 防止换行 */
}

/* 单个积分项目的基础样式 */
.user-points-item {
    font-size: 0.85em;
    color: #666;
}

/* 突出显示总积分 (大字体，醒目颜色) */
.user-points-item.total-points {
    font-size: 1.2em; 
    font-weight: bold;
    color: #e74c3c; 
}
.points-detail-box .today-points,
.points-detail-box .yesterday-points {
    font-size: 0.9em; /* 字体大小适中 */
    padding: 1px 0;
    margin-bottom: 2px;
}

/* 强调今日积分，使用稍深的颜色 */
.points-detail-box .today-points {
    font-weight: bold;
    color: #34495e; /* 深蓝色/深灰色，强调当前 */
}

/* 区分昨日积分，使其更低调 */
.points-detail-box .yesterday-points {
    font-weight: normal; /* 正常字重 */
    color: #7f8c8d; /* 灰色，低调的颜色 */
}

/* 设置积分数值的字体，使其统一 */
.points-detail-box .today-total-pts,
.points-detail-box .yesterday-total-pts {
    font-weight: bold; /* 积分数值可以加粗 */
    margin-left: 3px;
}
/* 字段布局 */
.rank-box { width: 5%; text-align: center; font-weight: bold; color: #e67e22; }
.rank-box:nth-child(1) { color: gold; } /* 前三名特殊颜色 */
.rank-box:nth-child(2) { color: silver; }
.rank-box:nth-child(3) { color: #cc9966; }

.student-info-box { flex-grow: 1; display: flex; align-items: center; }
.student-name { font-weight: 600; cursor: default; margin-left: 5px; }
.avatar-placeholder { margin-right: 5px; color: #f1c40f; font-size: 1.2em; } /* 模拟头像及装饰功能 */

.points-detail-box { width: 45%; display: flex; flex-direction: column; text-align: right; }
.today-points { font-weight: bold; color: #2980b9; margin-bottom: 3px; }

.breakdown-list { margin-top: 5px; font-size: 0.85em; color: #7f8c8d; }
.point-item { 
    margin-left: 10px; 
    position: relative; 
    cursor: help; 
    display: inline-block;
} 

/* 悬停规则提示 (Tooltip) */
.tooltip-rule {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.8em;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 100;
}
.point-item:hover .tooltip-rule {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

.total-points-box { width: 15%; text-align: right; font-size: 1.2em; font-weight: bold; color: #e74c3c; }
/* 百分比文字在进度条外部显示时的样式 */
.mastery-outer-text {
    font-size: 10px;
    font-weight: bold;
    margin-right: 5px; 
    min-width: 30px; 
    text-align: right;
}

/* 进度条容器 */
.bank-mastery-container {
    width: 140px; 
    height: 18px;
    background-color: #e0e0e0; 
    border-radius: 9px;
    overflow: hidden;
    position: relative; 
}

/* 进度条主体 */
.bank-mastery-bar {
    height: 100%;
    transition: width 0.4s ease;
    text-align: right;
    line-height: 18px;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding-right: 5px;
    box-sizing: border-box;
    white-space: nowrap; 
}
.bank-info {
    flex: 1;
    margin-right: 15px;
}

.bank-stats {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.bank-mastery-display {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 150px;
}

.bank-mastery-container {
    width: 100px;
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.bank-mastery-bar {
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.mastery-outer-text {
    font-size: 14px;
    font-weight: bold;
    min-width: 40px;
    text-align: right;
}
  //今日榜单

                        .lb-tab {
                            /* 关键：大幅减小左右 padding，从 14px 降至 8px */
                            padding: 5px 8px;
                            font-size: 12px;
                            cursor: pointer;
                            border-radius: 16px;
                            transition: all 0.3s;
                            color: #666;
                            font-weight: bold;
                            text-align: center;
                            min-width: 32px; /* 缩减最小宽度 */
                        }
                        .lb-tab:hover { background: #e0e0e0; }
                        .lb-tab.active {
                            background: #3498db;
                            color: white;
                            box-shadow: 0 2px 5px rgba(52,152,219,0.3);
                        }
                    
//教师端


/* 教师端基础样式 */
.admin-page { padding: 20px; background: white; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 10px; border: 1px solid #ddd; text-align: left; }
.primary-btn, .secondary-btn { padding: 8px 15px; border-radius: 4px; cursor: pointer; }
.primary-btn { background-color: #3498db; color: white; border: none; }
.secondary-btn { background-color: #ecf0f1; color: #34495e; border: 1px solid #bdc3c7; }

/* 模态框 (Modal) 基础样式 */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.4); }
.modal-content { background-color: #fefefe; margin: 5% auto; padding: 20px; border: 1px solid #888; width: 80%; max-width: 600px; border-radius: 8px; }
.modal-content label { display: block; margin-top: 10px; font-weight: bold; }
.modal-content input[type="text"], .modal-content input[type="number"], .modal-content select, .modal-content textarea { width: calc(100% - 12px); padding: 6px; margin-top: 5px; border: 1px solid #ccc; border-radius: 4px; }
.modal-actions { margin-top: 20px; display: flex; justify-content: flex-end; gap: 10px; }

//温故知新

                .records-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
                .records-table th, .records-table td { 
                    border: 1px solid #ddd; padding: 8px; 
                    text-align: center;
                    font-size: 14px;
                }
                .records-table th { 
                    background-color: #f2f2f2; font-weight: bold; 
                    cursor: pointer; 
                    position: sticky;
                    top: 0;
                }
                .records-table th:hover { background-color: #e6e6e6; }
                .records-table tr:nth-child(even) { background-color: #f9f9f9; }
                .sort-icon { margin-left: 5px; }
                .rank-cell { font-weight: bold; color: #e67e22; }
                .latest-record { font-weight: bold; background-color: #e8f5e9 !important; }
                .review-bank { color: #000000 } /* 温故知新题库特殊样式 */

//消灭错题数
 
                .records-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14px; }
                .records-table th, .records-table td { border: 1px solid #ddd; padding: 8px; text-align: center; }
                .records-table th { 
                    background-color: #f2f2f2; font-weight: bold; 
                    cursor: pointer;
                    position: sticky;
                    top: 0;
                }
                .records-table th:hover { background-color: #e6e6e6; }
                .records-table tr:nth-child(even) { background-color: #f9f9f9; }
                .sort-icon { margin-left: 5px; }
                .rank-cell { font-weight: bold; color: #e67e22; }
                .latest-record { font-weight: bold; background-color: #e8f5e9 !important; }
            

//嚼嚼世界

    /* 1. 布局激活状态：上方 20% 操作区，下方 80% 游戏区 */
    body.game-layout-active {
        overflow: hidden !important;
        height: 100vh;
        width: 100vw;
    }

    /* 2. 上方内容区：独立滚动，增加硬件加速 */
    body.game-layout-active #student-main,
    body.game-layout-active #chewWorld,
    body.game-layout-active #itemShop,
    body.game-layout-active #inventory {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100%;
        height: 20vh !important;
        overflow-y: auto !important;
        background: #f8f9fa;
        z-index: 2001;
        margin: 0 !important;
        padding: 10px !important;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
        -webkit-overflow-scrolling: touch;
    }

    /* 3. 下方游戏容器 */
    #global-game-container {
        overflow-x: auto !important; 
        overflow-y: hidden !important;
        display: flex;
        -webkit-overflow-scrolling: touch; 
        scroll-behavior: smooth;
        will-change: scroll-position;
    }

    /* 4. 地图块样式 */
    .map-sector {
        min-width: 100vw; 
        height: 100%;
        background-size: 100% 100% !important; 
        background-repeat: no-repeat;
        background-position: center bottom;
        flex-shrink: 0; 
        position: relative;
    }

    /* 5. 核心：小人精灵复合样式 */
    .player-sprite {
        position: absolute;
        /* 这里的 transition 秒数会在 JS 中被动态覆盖，所以这里是默认值 */
        transition: left 0.8s linear, bottom 0.8s linear;
        z-index: 100;
        display: flex;
        flex-direction: column;
        align-items: center;
        will-change: transform, left;
        transform: translateZ(0); 
        cursor: pointer;
    }

    /* 角色主体容器：固定 60px 范围 */
    .char-container {
        position: relative;
        width: 60px;
        height: 60px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* 💰 钱袋标签样式 (找回的功能) */
    .money-bag-tag {
        position: absolute;
        top: -12px;
        right: -8px;
        background: transparent;
        border: none;
        padding: 0; 
        font-size: 11px;
        font-weight: bold;
        color: #b84000;
        z-index: 15;
                animation: money-bounce 2s infinite ease-in-out;
        white-space: nowrap;
    }

    @keyframes money-bounce {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-5px); }
    }

    /* 基础头像 */
    .base-avatar {
        width: 50px;
        height: 50px;
        object-fit: contain;
        -webkit-user-drag: none;
        pointer-events: none;
        z-index: 1;
    }

    /* 武器图层 */
    .weapon-layer {
        position: absolute;
        width: 35px; 
        height: 35px; 
        right: -10px; 
        bottom: 5px;  
        z-index: 5;   
        pointer-events: none;
        transition: transform 0.2s ease-out;
    }

    .weapon-sprite-img {
        width: 100%;
        height: 100%;
        object-fit: contain; 
        filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.3));
        animation: weapon-float 2s infinite ease-in-out;
    }

    /* 6. 状态进度条 (血条 + 能量条) */
    .stat-bars {
        width: 50px; /* 进度条总宽度 */
        margin-top: 4px;
        display: flex;
        flex-direction: column;
        gap: 2px; /* 血条和能量条的间距 */
    }

    /* 血条容器 */
    .hp-bar-container {
        width: 100%;
        height: 6px;
        background: rgba(0,0,0,0.4);
        border-radius: 3px;
        overflow: hidden;
        border: 1px solid rgba(255,255,255,0.2);
    }

    .hp-bar-fill {
        height: 100%;
        background: linear-gradient(to right, #ff4757, #ff6b81);
        transition: width 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    }

    /* ⚡ 紫色能量条容器 */
    .energy-bar-container {
        width: 100%;
        height: 4px; /* 能量条稍微细一点 */
        background: rgba(0,0,0,0.5);
        border-radius: 2px;
        overflow: hidden;
        border: 1px solid rgba(255,255,255,0.1);
    }

    .energy-bar-fill {
        height: 100%;
        background: linear-gradient(to right, #a020f0, #e066ff); /* 紫色渐变 */
        box-shadow: 0 0 5px rgba(160, 32, 240, 0.8);
        transition: width 0.6s ease-out;
    }

    /* 7. 状态特效：死亡 */
    .player-sprite.is-dead {
        filter: grayscale(100%) blur(0.5px);
        z-index: 10 !important;
        bottom: 5% !important; 
        transform: rotate(90deg) scale(0.8) !important;
        transition: bottom 1s cubic-bezier(0.47, 0, 0.74, 0.71), transform 0.5s ease-out !important;
    }

    .player-sprite.is-dead .stat-bars,
    .player-sprite.is-dead .money-bag-tag {
        opacity: 0;
        transition: opacity 0.5s;
        pointer-events: none;
    }

    /* 8. 战斗动作与反馈 */
    .weapon-attacking {
        animation: weapon-slash 0.3s ease-out !important;
    }

    @keyframes weapon-slash {
        0% { transform: rotate(0deg) scale(1); }
        30% { transform: rotate(-35deg) scale(1.2); }
        100% { transform: rotate(80deg) scale(1); }
    }

    @keyframes weapon-float {
        0%, 100% { transform: translateY(0) rotate(0); }
        50% { transform: translateY(-3px) rotate(5deg); }
    }
.visual-bullet {
    position: absolute;
    width: 20px;
    height: 6px;
    border-radius: 3px;
    z-index: 9999;
    pointer-events: none; /* 防止遮挡点击 */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
     {
        animation: hit-flash 0.3s ease-out;
    }
    @keyframes hit-flash {
        0% { filter: brightness(1); }
        50% { filter: brightness(2.5) sepia(1); }
        100% { filter: brightness(1); }
    }

    /* 保护盾效果 */
    .shield-effect-glow {
        position: absolute;
        width: 100%; height: 100%;
        border-radius: 50%;
        box-shadow: 0 0 20px 5px rgba(0, 191, 255, 0.7);
        animation: shield-pulse 1.5s infinite alternate;
        pointer-events: none;
        z-index: 1;
    }
    @keyframes shield-pulse {
        from { transform: scale(1); opacity: 0.5; }
        to { transform: scale(1.15); opacity: 0.8; }
    }

    .shield-status-label {
        position: absolute;
        bottom: -15px;
        font-size: 10px;
        color: #00ffff;
        text-shadow: 1px 1px 2px #000;
        white-space: nowrap;
    }
/* 子弹通用样式 */
.bullet-projectile {
    position: absolute;
    z-index: 10001; /* 必须高于所有精灵 */
    pointer-events: none;
    height: 4px;
    width: 30px;
    background: linear-gradient(to right, #fff, #ffeb3b);
    box-shadow: 0 0 10px #ffeb3b, 0 0 20px #ff5722;
    border-radius: 2px;
    transition: all 0.3s linear;
}

/* 目标受击红光闪烁 */
 {
    filter: brightness(2) sepia(1) hue-rotate(-50deg) !important;
    transition: filter 0.1s;
}

/* 人物基础容器（用于转向） */
.char-container {
    transition: transform 0.2s ease;
}
 /* 虚拟摇杆样式 */
/* 更加透明流行的摇杆样式 */
#joystick-container {
    position: fixed;
    width: 120px;
    height: 120px;
    /* 背景改为更淡的 0.05 透明度 */
    background: rgba(255, 255, 255, 0.02); 
    /* 边框改为极淡的 0.15 */
    border: 1.5px solid rgba(255, 255, 255, 0.15); 
    border-radius: 50%;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 20000;
    pointer-events: none;
    /* 增加模糊感，即使透明也会有高级感 */
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

#joystick-knob {
    width: 45px;
    height: 45px;
    /* 摇杆头改为 0.3 透明度 */
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    /* 减弱阴影，让它看起来更轻盈 */
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
    /* 给摇杆头加一个微弱的内发光 */
    border: 1px solid rgba(255, 255, 255, 0.2);
}
/* 9. 辅助文字 */
    .player-label {
        font-size: 12px;
        color: white;
        text-shadow: 1px 1px 2px black;
        white-space: nowrap;
        margin-bottom: 2px;
    }

    #global-game-container::-webkit-scrollbar { height: 6px; }
    #global-game-container::-webkit-scrollbar-track { background: #5d4037; }
    #global-game-container::-webkit-scrollbar-thumb { background: #a2d149; border-radius: 3px; }
/* 金币动画相关样式 */
@keyframes coin-fly {
    0% { transform: translateY(0) scale(1); opacity: 0; }
    20% { opacity: 1; transform: translateY(-20px) scale(1.2); }
    100% { transform: translateY(50px) scale(0.5); opacity: 0; }
}

@keyframes gold-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.coin-particle {
    position: absolute;
    font-size: 24px;
    animation: coin-fly 0.8s ease-out forwards;
    z-index: 10;
}

.result-stat-card {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.result-stat-card.pop-active {
    animation: gold-pop 0.3s ease-in-out;
}
/* 权限开关样式 */
.permission-switch { position: relative; display: inline-block; width: 40px; height: 20px; }
.permission-switch input { opacity: 0; width: 0; height: 0; }
.slider-round {
  position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc; transition: .4s; border-radius: 20px;
}
.slider-round:before {
  position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px;
  background-color: white; transition: .4s; border-radius: 50%;
}
input:checked + .slider-round { background-color: #2ecc71; }
input:checked + .slider-round:before { transform: translateX(20px); }
.challenge-style {
    display: block !important; /* 强制显示 */
    background: rgba(20, 20, 20, 0.95); /* 稍微加深不透明度，防止透底 */
    border: 1px solid #ffd700;
    border-radius: 12px;
    padding: 15px;
    margin: 20px auto;
    width: 95%; /* 适配移动端，使用百分比 */
    max-width: 600px;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.3);
    animation: chFadeIn 0.5s ease forwards; /* 确保动画结束后保持状态 */
    position: relative; /* 确保 z-index 生效 */
    z-index: 9999; /* 设为最高，防止被其他层遮挡 */
    overflow: visible; /* 防止内部内容被截断 */
    clear: both; /* 破开浮动布局 */
}

.ch-title {
    color: #ffd700;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 12px;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
    line-height: 1.4;
}

.ch-row {
    display: grid;
    /* 调整比例：确保在小屏幕上不会挤压到一起 */
    grid-template-columns: 50px 80px 80px 60px 1fr;
    gap: 5px;
    padding: 12px 5px;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #eee;
    font-size: 13px;
}

.ch-me {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.05));
    color: #fff;
    border-left: 4px solid #ffd700;
    font-weight: bold;
}

/* 装饰细节 */
.ch-rank { font-weight: bold; color: #aaa; }
.ch-me .ch-rank { color: #ffd700; }
.ch-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-level { font-size: 11px; color: #00d2ff; }
.ch-score { color: #2ecc71; text-align: center; font-family: monospace; }
.ch-time { color: #888; font-size: 10px; text-align: right; }

@keyframes chFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.dictation-box {
    background: #fff;
    border: 2px dashed #3498db;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

#hw-canvas {
    border: 1px solid #ddd;
    background-color: #fff;
    cursor: crosshair;
    touch-action: none; /* 极其重要：防止移动端书写时页面滚动 */
    display: block;
    margin: 0 auto;
}
.canvas-controls {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 10px;
}        
.long-text-container { margin-top: 15px; padding: 15px; background: #fff; border: 1px solid #ddd; border-radius: 8px; line-height: 2; text-align: left; }
.char-match { color: #2ecc71; font-weight: bold; } /* 匹配正确-绿色 */
.char-mismatch { color: #e74c3c; text-decoration: underline; } /* 匹配错误-红色 */
.score-badge { display: inline-block; padding: 2px 10px; border-radius: 10px; margin-bottom: 10px; font-weight: bold; }
.score-high { background: #e8f5e9; color: #2e7d32; }
.score-low { background: #ffebee; color: #c62828; }