--- /dev/null
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+import os
+import sys
+import io
+
+# ================= 配置区域 =================
+# 输出文件名
+OUTPUT_FILENAME = "project_all_in_one.txt"
+
+# 需要排除的目录名(完全匹配),例如:['.git','gitea', 'node_modules', 'ZZ Old Version']
+EXCLUDE_DIRS = {".git", "__pycache__", "ZZ Old Version", "Media"}
+
+# 需要排除的文件后缀(不区分大小写),例如:['.exe', '.pyc', '.png', '.jpg']
+EXCLUDE_EXTS = {".exe", ".pyc", ".png", ".jpg", ".jpeg", ".gif", ".pdf", ".zip", ".tar", ".gz"}
+
+# 需要排除的具体文件名
+EXCLUDE_FILES = {OUTPUT_FILENAME, ".DS_Store","gitea"}
+# ===========================================
+
+ROOT_DIR = os.path.abspath(os.path.dirname(__file__))
+
+def write_line(f, line=""):
+ f.write(line + "\n")
+
+def should_exclude(path):
+ """检查路径中是否包含任何被排除的目录"""
+ parts = path.split(os.sep)
+ for d in EXCLUDE_DIRS:
+ if d in parts:
+ return True
+ return False
+
+def collect_tree(root):
+ """生成目录结构树"""
+ lines = []
+ for dirpath, dirnames, filenames in os.walk(root):
+ # 过滤掉排除目录,修改 dirnames 会影响 os.walk 的后续遍历
+ dirnames[:] = [d for d in dirnames if d not in EXCLUDE_DIRS]
+
+ rel = os.path.relpath(dirpath, root)
+ if rel == ".":
+ indent_level = 0
+ display_path = "."
+ else:
+ indent_level = rel.count(os.sep) + 1
+ display_path = rel.replace(os.sep, "/")
+
+ indent = " " * indent_level
+ lines.append(f"{indent}{display_path}/")
+
+ for fn in sorted(filenames):
+ if fn in EXCLUDE_FILES:
+ continue
+ _, ext = os.path.splitext(fn)
+ if ext.lower() in EXCLUDE_EXTS:
+ continue
+ lines.append(f"{indent} {fn}")
+ return lines
+
+def gather_all_files(root):
+ """收集所有符合条件的文件路径"""
+ matches = []
+ for dirpath, dirnames, filenames in os.walk(root):
+ # 过滤排除目录
+ dirnames[:] = [d for d in dirnames if d not in EXCLUDE_DIRS]
+
+ for fn in filenames:
+ # 过滤排除的文件名和后缀
+ if fn in EXCLUDE_FILES:
+ continue
+ _, ext = os.path.splitext(fn)
+ if ext.lower() in EXCLUDE_EXTS:
+ continue
+
+ full_path = os.path.join(dirpath, fn)
+ rel_path = os.path.relpath(full_path, root).replace(os.sep, "/")
+ matches.append((rel_path, full_path))
+
+ matches.sort()
+ return matches
+
+def read_file_content(path):
+ """尝试多种编码读取文件内容,非文本或无法读取则跳过"""
+ encodings = ["utf-8", "utf-8-sig", "gbk", "latin-1"]
+ for enc in encodings:
+ try:
+ with io.open(path, "r", encoding=enc, errors="strict") as f:
+ return f.read()
+ except (UnicodeDecodeError, Exception):
+ continue
+ return "[警告:该文件编码不兼容或为二进制格式,已跳过内容提取]"
+
+def generate_report(root, out_path):
+ with io.open(out_path, "w", encoding="utf-8") as out:
+ # 第一部分:目录结构
+ write_line(out, "==================================================")
+ write_line(out, "第一部分:项目目录结构")
+ write_line(out, "==================================================")
+ tree_lines = collect_tree(root)
+ for ln in tree_lines:
+ write_line(out, ln)
+ write_line(out, "\n")
+
+ # 第二部分:文件内容整合
+ write_line(out, "==================================================")
+ write_line(out, "第二部分:文件内容整合")
+ write_line(out, "==================================================")
+
+ all_files = gather_all_files(root)
+ if not all_files:
+ write_line(out, "[未找到符合条件的可处理文件]")
+
+ for rel_path, full_path in all_files:
+ write_line(out, f"\n>>> FILE START: {rel_path} <<<")
+ write_line(out, "=" * 40)
+
+ content = read_file_content(full_path)
+ out.write(content)
+
+ if not content.endswith("\n"):
+ out.write("\n")
+ write_line(out, "=" * 40)
+ write_line(out, f">>> FILE END: {rel_path} <<<\n")
+
+if __name__ == "__main__":
+ try:
+ output_full_path = os.path.join(ROOT_DIR, OUTPUT_FILENAME)
+ generate_report(ROOT_DIR, output_full_path)
+ print(f"成功!整合后的文件已保存至:{OUTPUT_FILENAME}")
+ except Exception as e:
+ print(f"程序运行出错:{e}")
+ sys.exit(1)
--- /dev/null
+==================================================
+第一部分:项目目录结构
+==================================================
+./
+ .gitignore
+ app.py
+ generate_report.py
+ custom/
+ custom/conf/
+ app.ini
+ templates/
+ index.html
+ templates/settings/
+ index.html
+ templates/questions/
+ index.html
+ templates/papers/
+ index.html
+ templates/subject/
+ index.html
+ static/
+ static/css/
+ style.css
+
+
+==================================================
+第二部分:文件内容整合
+==================================================
+
+>>> FILE START: .gitignore <<<
+========================================
+__pycache__/
+*.py[cod]
+*$py.class
+.venv/
+venv/
+ENV/
+*.db
+.DS_Store
+========================================
+>>> FILE END: .gitignore <<<
+
+
+>>> FILE START: app.py <<<
+========================================
+from flask import Flask, render_template
+
+app = Flask(__name__)
+
+# 首页
+@app.route('/')
+def index():
+ return render_template('index.html')
+
+# 科目面板
+@app.route('/subject/')
+def subject():
+ return render_template('subject/index.html')
+
+# 题目管理
+@app.route('/questions/')
+def questions():
+ return render_template('questions/index.html')
+
+# 试卷管理
+@app.route('/papers/')
+def papers():
+ return render_template('papers/index.html')
+
+# 系统设定
+@app.route('/settings/')
+def settings():
+ return render_template('settings/index.html')
+
+if __name__ == '__main__':
+ app.run(host='0.0.0.0', port=5000)
+========================================
+>>> FILE END: app.py <<<
+
+
+>>> FILE START: custom/conf/app.ini <<<
+========================================
+[server]
+LOCAL_ROOT_URL = http://localhost:4999/
+========================================
+>>> FILE END: custom/conf/app.ini <<<
+
+
+>>> FILE START: generate_report.py <<<
+========================================
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+import os
+import sys
+import io
+
+# ================= 配置区域 =================
+# 输出文件名
+OUTPUT_FILENAME = "project_all_in_one.txt"
+
+# 需要排除的目录名(完全匹配),例如:['.git','gitea', 'node_modules', 'ZZ Old Version']
+EXCLUDE_DIRS = {".git", "__pycache__", "ZZ Old Version", "Media"}
+
+# 需要排除的文件后缀(不区分大小写),例如:['.exe', '.pyc', '.png', '.jpg']
+EXCLUDE_EXTS = {".exe", ".pyc", ".png", ".jpg", ".jpeg", ".gif", ".pdf", ".zip", ".tar", ".gz"}
+
+# 需要排除的具体文件名
+EXCLUDE_FILES = {OUTPUT_FILENAME, ".DS_Store","gitea"}
+# ===========================================
+
+ROOT_DIR = os.path.abspath(os.path.dirname(__file__))
+
+def write_line(f, line=""):
+ f.write(line + "\n")
+
+def should_exclude(path):
+ """检查路径中是否包含任何被排除的目录"""
+ parts = path.split(os.sep)
+ for d in EXCLUDE_DIRS:
+ if d in parts:
+ return True
+ return False
+
+def collect_tree(root):
+ """生成目录结构树"""
+ lines = []
+ for dirpath, dirnames, filenames in os.walk(root):
+ # 过滤掉排除目录,修改 dirnames 会影响 os.walk 的后续遍历
+ dirnames[:] = [d for d in dirnames if d not in EXCLUDE_DIRS]
+
+ rel = os.path.relpath(dirpath, root)
+ if rel == ".":
+ indent_level = 0
+ display_path = "."
+ else:
+ indent_level = rel.count(os.sep) + 1
+ display_path = rel.replace(os.sep, "/")
+
+ indent = " " * indent_level
+ lines.append(f"{indent}{display_path}/")
+
+ for fn in sorted(filenames):
+ if fn in EXCLUDE_FILES:
+ continue
+ _, ext = os.path.splitext(fn)
+ if ext.lower() in EXCLUDE_EXTS:
+ continue
+ lines.append(f"{indent} {fn}")
+ return lines
+
+def gather_all_files(root):
+ """收集所有符合条件的文件路径"""
+ matches = []
+ for dirpath, dirnames, filenames in os.walk(root):
+ # 过滤排除目录
+ dirnames[:] = [d for d in dirnames if d not in EXCLUDE_DIRS]
+
+ for fn in filenames:
+ # 过滤排除的文件名和后缀
+ if fn in EXCLUDE_FILES:
+ continue
+ _, ext = os.path.splitext(fn)
+ if ext.lower() in EXCLUDE_EXTS:
+ continue
+
+ full_path = os.path.join(dirpath, fn)
+ rel_path = os.path.relpath(full_path, root).replace(os.sep, "/")
+ matches.append((rel_path, full_path))
+
+ matches.sort()
+ return matches
+
+def read_file_content(path):
+ """尝试多种编码读取文件内容,非文本或无法读取则跳过"""
+ encodings = ["utf-8", "utf-8-sig", "gbk", "latin-1"]
+ for enc in encodings:
+ try:
+ with io.open(path, "r", encoding=enc, errors="strict") as f:
+ return f.read()
+ except (UnicodeDecodeError, Exception):
+ continue
+ return "[警告:该文件编码不兼容或为二进制格式,已跳过内容提取]"
+
+def generate_report(root, out_path):
+ with io.open(out_path, "w", encoding="utf-8") as out:
+ # 第一部分:目录结构
+ write_line(out, "==================================================")
+ write_line(out, "第一部分:项目目录结构")
+ write_line(out, "==================================================")
+ tree_lines = collect_tree(root)
+ for ln in tree_lines:
+ write_line(out, ln)
+ write_line(out, "\n")
+
+ # 第二部分:文件内容整合
+ write_line(out, "==================================================")
+ write_line(out, "第二部分:文件内容整合")
+ write_line(out, "==================================================")
+
+ all_files = gather_all_files(root)
+ if not all_files:
+ write_line(out, "[未找到符合条件的可处理文件]")
+
+ for rel_path, full_path in all_files:
+ write_line(out, f"\n>>> FILE START: {rel_path} <<<")
+ write_line(out, "=" * 40)
+
+ content = read_file_content(full_path)
+ out.write(content)
+
+ if not content.endswith("\n"):
+ out.write("\n")
+ write_line(out, "=" * 40)
+ write_line(out, f">>> FILE END: {rel_path} <<<\n")
+
+if __name__ == "__main__":
+ try:
+ output_full_path = os.path.join(ROOT_DIR, OUTPUT_FILENAME)
+ generate_report(ROOT_DIR, output_full_path)
+ print(f"成功!整合后的文件已保存至:{OUTPUT_FILENAME}")
+ except Exception as e:
+ print(f"程序运行出错:{e}")
+ sys.exit(1)
+========================================
+>>> FILE END: generate_report.py <<<
+
+
+>>> FILE START: static/css/style.css <<<
+========================================
+/* 全局样式 */
+body {
+ margin: 0;
+ padding: 0;
+ background-color: #f0f2f5;
+ font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft YaHei", sans-serif;
+}
+
+/* 顶部导航栏 */
+.navbar {
+ height: 60px;
+ background: linear-gradient(135deg, #4088d8 0%, #2a69b5 100%);
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ color: white;
+ font-size: 24px;
+ font-weight: bold;
+ box-shadow: 0 2px 10px rgba(0,0,0,0.1);
+}
+
+/* 主体区域 - 设置为不换行,确保在一行显示 */
+.container {
+ display: flex;
+ flex-direction: row; /* 横向排列 */
+ justify-content: center;
+ align-items: center;
+ gap: 20px; /* 适当缩小间距以适应屏幕宽度 */
+ padding: 60px 20px;
+ margin: 0 auto;
+ overflow-x: auto; /* 如果屏幕太窄,允许横向滚动 */
+}
+
+/* 卡片按钮基础样式 */
+.card {
+ width: 260px; /* 略微调窄一点点确保一行能放下 */
+ height: 80px;
+ background-color: white;
+ border-radius: 12px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 18px;
+ font-weight: 600;
+ cursor: pointer;
+ transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
+ text-decoration: none;
+ box-shadow: 0 4px 6px rgba(0,0,0,0.05);
+ border: 1px solid rgba(0,0,0,0.05);
+}
+
+.card:hover {
+ transform: translateY(-5px);
+ box-shadow: 0 8px 15px rgba(0,0,0,0.1);
+}
+
+/* 丰富的配色方案 */
+/* ① 科目面板 - 蓝色系 */
+.card-subject { color: #0066cc; border-left: 6px solid #0066cc; }
+.card-subject:hover { background-color: #f0f7ff; color: #004499; }
+
+/* ② 题目管理 - 绿色系 */
+.card-question { color: #009944; border-left: 6px solid #009944; }
+.card-question:hover { background-color: #f0fff4; color: #007733; }
+
+/* ③ 试卷管理 - 橙色系 */
+.card-paper { color: #e67e22; border-left: 6px solid #e67e22; }
+.card-paper:hover { background-color: #fffaf5; color: #d35400; }
+
+/* ④ 系统设定 - 紫色/灰色系 */
+.card-setting { color: #8e44ad; border-left: 6px solid #8e44ad; }
+.card-setting:hover { background-color: #f9f5fb; color: #732d91; }
+
+.icon-num {
+ margin-right: 12px;
+ font-size: 22px;
+ font-style: italic;
+ opacity: 0.8;
+}
+
+/* 子页面特定的 Header 颜色 */
+.header-subject { background: linear-gradient(135deg, #0066cc 0%, #004499 100%) !important; }
+.header-question { background: linear-gradient(135deg, #009944 0%, #007733 100%) !important; }
+.header-paper { background: linear-gradient(135deg, #e67e22 0%, #d35400 100%) !important; }
+.header-setting { background: linear-gradient(135deg, #8e44ad 0%, #732d91 100%) !important; }
+
+========================================
+>>> FILE END: static/css/style.css <<<
+
+
+>>> FILE START: templates/index.html <<<
+========================================
+<!DOCTYPE html>
+<html lang="zh">
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>错题智能整理系统</title>
+ <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
+</head>
+<body>
+ <div class="navbar">错题智能整理系统</div>
+
+ <div class="container">
+ <a href="/subject/" class="card card-subject"><span class="icon-num">①</span> 科目面板</a>
+ <a href="/questions/" class="card card-question"><span class="icon-num">②</span> 题目管理</a>
+ <a href="/papers/" class="card card-paper"><span class="icon-num">③</span> 试卷管理</a>
+ <a href="/settings/" class="card card-setting"><span class="icon-num">④</span> 系统设定</a>
+ </div>
+</body>
+</html>
+========================================
+>>> FILE END: templates/index.html <<<
+
+
+>>> FILE START: templates/papers/index.html <<<
+========================================
+<!DOCTYPE html>
+<html lang="zh">
+<head>
+ <meta charset="UTF-8">
+ <title>试卷管理 - 错题系统</title>
+ <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
+ <style>
+ .sub-container { padding: 50px; text-align: center; }
+ .back-btn { display: inline-block; margin-top: 20px; padding: 10px 20px; background: #666; color: white; text-decoration: none; border-radius: 5px; }
+ </style>
+</head>
+<body>
+ <div class="navbar header-paper">试卷管理</div>
+ <div class="sub-container">
+ <h2>这里是试卷管理内容区域</h2>
+ <p>正在从原 Python 程序迁移逻辑...</p>
+ <a href="/" class="back-btn">返回首页</a>
+ </div>
+</body>
+</html>
+========================================
+>>> FILE END: templates/papers/index.html <<<
+
+
+>>> FILE START: templates/questions/index.html <<<
+========================================
+<!DOCTYPE html>
+<html lang="zh">
+<head>
+ <meta charset="UTF-8">
+ <title>科目面板 - 错题系统</title>
+ <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
+ <style>
+ .sub-container { padding: 50px; text-align: center; }
+ .back-btn { display: inline-block; margin-top: 20px; padding: 10px 20px; background: #666; color: white; text-decoration: none; border-radius: 5px; }
+ </style>
+</head>
+<body>
+ <div class="navbar header-question">科目面板</div>
+ <div class="sub-container">
+ <h2>这里是科目面板内容区域</h2>
+ <p>正在从原 Python 程序迁移逻辑...</p>
+ <a href="/" class="back-btn">返回首页</a>
+ </div>
+</body>
+</html>
+========================================
+>>> FILE END: templates/questions/index.html <<<
+
+
+>>> FILE START: templates/settings/index.html <<<
+========================================
+<!DOCTYPE html>
+<html lang="zh">
+<head>
+ <meta charset="UTF-8">
+ <title>系统设定 - 错题系统</title>
+ <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
+ <style>
+ .sub-container { padding: 50px; text-align: center; }
+ .back-btn { display: inline-block; margin-top: 20px; padding: 10px 20px; background: #666; color: white; text-decoration: none; border-radius: 5px; }
+ </style>
+</head>
+<body>
+ <div class="navbar header-setting">系统设定</div>
+ <div class="sub-container">
+ <h2>这里是系统设定内容区域</h2>
+ <p>正在从原 Python 程序迁移逻辑...</p>
+ <a href="/" class="back-btn">返回首页</a>
+ </div>
+</body>
+</html>
+========================================
+>>> FILE END: templates/settings/index.html <<<
+
+
+>>> FILE START: templates/subject/index.html <<<
+========================================
+<!DOCTYPE html>
+<html lang="zh">
+<head>
+ <meta charset="UTF-8">
+ <title>科目首页 - 错题系统</title>
+ <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
+ <style>
+ .sub-container { padding: 50px; text-align: center; }
+ .back-btn { display: inline-block; margin-top: 20px; padding: 10px 20px; background: #666; color: white; text-decoration: none; border-radius: 5px; }
+ </style>
+</head>
+<body>
+ <div class="navbar header-subject">科目首页</div>
+ <div class="sub-container">
+ <h2>这里是科目首页内容区域</h2>
+ <p>正在从原 Python 程序迁移逻辑...</p>
+ <a href="/" class="back-btn">返回首页</a>
+ </div>
+</body>
+</html>
+========================================
+>>> FILE END: templates/subject/index.html <<<
+
-/* 全局样式 */
+/* 全局基础样式 */
body {
margin: 0;
padding: 0;
background-color: #f0f2f5;
- font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft YaHei", sans-serif;
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
+ -webkit-font-smoothing: antialiased;
}
-/* 顶部导航栏 */
+/* 顶部导航栏基础样式 */
.navbar {
height: 60px;
background: linear-gradient(135deg, #4088d8 0%, #2a69b5 100%);
justify-content: center;
align-items: center;
color: white;
- font-size: 24px;
+ font-size: 22px;
font-weight: bold;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
+ position: sticky;
+ top: 0;
+ z-index: 1000;
}
-/* 主体区域 - 设置为不换行,确保在一行显示 */
+/* 子页面特定的 Header 颜色 - 对应首页按钮色系 */
+.header-subject { background: linear-gradient(135deg, #0066cc 0%, #004499 100%) !important; }
+.header-question { background: linear-gradient(135deg, #009944 0%, #007733 100%) !important; }
+.header-paper { background: linear-gradient(135deg, #e67e22 0%, #d35400 100%) !important; }
+.header-setting { background: linear-gradient(135deg, #8e44ad 0%, #732d91 100%) !important; }
+
+/* 主体容器 - 响应式 Flex 布局 */
.container {
display: flex;
- flex-direction: row; /* 横向排列 */
+ flex-wrap: wrap; /* 核心:允许在空间不足时换行 */
+ flex-direction: row;
justify-content: center;
align-items: center;
- gap: 20px; /* 适当缩小间距以适应屏幕宽度 */
- padding: 60px 20px;
+ gap: 20px;
+ padding: 40px 20px;
+ max-width: 1200px;
+ margin: 0 auto;
+}
+
+/* 详情页容器 */
+.sub-container {
+ padding: 30px 20px;
+ text-align: center;
+ max-width: 800px;
margin: 0 auto;
- overflow-x: auto; /* 如果屏幕太窄,允许横向滚动 */
}
/* 卡片按钮基础样式 */
.card {
- width: 260px; /* 略微调窄一点点确保一行能放下 */
- height: 80px;
+ flex: 1; /* 自动伸缩 */
+ min-width: 240px; /* 保证电脑端不会太窄 */
+ max-width: 280px; /* 保证电脑端不会太宽 */
+ height: 85px;
background-color: white;
- border-radius: 12px;
+ border-radius: 15px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
text-decoration: none;
- box-shadow: 0 4px 6px rgba(0,0,0,0.05);
+ box-shadow: 0 4px 12px rgba(0,0,0,0.08);
border: 1px solid rgba(0,0,0,0.05);
}
.card:hover {
transform: translateY(-5px);
- box-shadow: 0 8px 15px rgba(0,0,0,0.1);
+ box-shadow: 0 12px 20px rgba(0,0,0,0.15);
}
-/* 丰富的配色方案 */
-/* ① 科目面板 - 蓝色系 */
-.card-subject { color: #0066cc; border-left: 6px solid #0066cc; }
-.card-subject:hover { background-color: #f0f7ff; color: #004499; }
+/* 四个模块的丰富配色方案 */
+.card-subject { color: #0066cc; border-left: 8px solid #0066cc; }
+.card-subject:hover { background-color: #f0f7ff; }
-/* ② 题目管理 - 绿色系 */
-.card-question { color: #009944; border-left: 6px solid #009944; }
-.card-question:hover { background-color: #f0fff4; color: #007733; }
+.card-question { color: #009944; border-left: 8px solid #009944; }
+.card-question:hover { background-color: #f0fff4; }
-/* ③ 试卷管理 - 橙色系 */
-.card-paper { color: #e67e22; border-left: 6px solid #e67e22; }
-.card-paper:hover { background-color: #fffaf5; color: #d35400; }
+.card-paper { color: #e67e22; border-left: 8px solid #e67e22; }
+.card-paper:hover { background-color: #fffaf5; }
-/* ④ 系统设定 - 紫色/灰色系 */
-.card-setting { color: #8e44ad; border-left: 6px solid #8e44ad; }
-.card-setting:hover { background-color: #f9f5fb; color: #732d91; }
+.card-setting { color: #8e44ad; border-left: 8px solid #8e44ad; }
+.card-setting:hover { background-color: #f9f5fb; }
+/* 图标/数字样式 */
.icon-num {
margin-right: 12px;
font-size: 22px;
- font-style: italic;
- opacity: 0.8;
+ font-weight: bold;
+ opacity: 0.7;
}
-/* 子页面特定的 Header 颜色 */
-.header-subject { background: linear-gradient(135deg, #0066cc 0%, #004499 100%) !important; }
-.header-question { background: linear-gradient(135deg, #009944 0%, #007733 100%) !important; }
-.header-paper { background: linear-gradient(135deg, #e67e22 0%, #d35400 100%) !important; }
-.header-setting { background: linear-gradient(135deg, #8e44ad 0%, #732d91 100%) !important; }
+/* 返回按钮样式 */
+.back-btn {
+ display: inline-block;
+ margin-top: 30px;
+ padding: 12px 30px;
+ background: #666;
+ color: white;
+ text-decoration: none;
+ border-radius: 25px;
+ font-weight: 500;
+ transition: background 0.3s;
+}
+.back-btn:hover {
+ background: #333;
+}
+
+/* === 移动端适配 (iPhone 等) === */
+@media (max-width: 600px) {
+ .navbar {
+ font-size: 18px;
+ height: 50px;
+ }
+
+ .container {
+ padding: 20px 15px;
+ gap: 15px;
+ }
+ .card {
+ /* 在手机上,让按钮占据几乎全部宽度,防止并排重叠 */
+ min-width: 100%;
+ max-width: 100%;
+ height: 75px;
+ font-size: 17px;
+ border-left-width: 10px; /* 手机上加粗色块更醒目 */
+ }
+
+ .sub-container h2 {
+ font-size: 20px;
+ }
+}