/* ============ 全局 ============ */
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
body { background:#F2F7FA; font-family: -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif; color:#333; }
a { text-decoration:none; color:inherit; }
img { border:0; }

.container { max-width:480px; margin:0 auto; background:#F2F7FA; min-height:100vh; padding:10px; padding-bottom:60px; position:relative; }
.w100 { width:100%; display:block; }
.f100 { width:100%; display:flex; }

/* 顶部 */
.topbar { display:flex; align-items:center; font-size:14px; margin-bottom:10px; }
.topbar .logo { height:35px; vertical-align:-5px; margin-right:8px; border-radius:6px; }
.topbar .countdown { flex:1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; line-height:15px; }
.topbar .countdown b { color:#CC302C; font-size:18px; margin-left:2px; }
.topbar .menu-btn { font-size:20px; color:#333; cursor:pointer; padding:4px 6px; }

/* 卡片 */
.card { background:#fff; border-radius:15px; overflow:hidden; margin-bottom:10px; }
.card-pad { padding:10px; }
.card-title { font-size:16px; position:relative; font-weight:bold; padding:10px 10px 0; }
.card-title .more { color:#999; font-size:14px; font-weight:normal; float:right; cursor:pointer; }

/* 首页 banner */
.banner { width:100%; border-radius:15px; display:block; margin-bottom:10px; }
.visit-line { background:#fff; font-size:14px; padding:10px; }
.visit-line i { color:#CC302C; font-size:20px; margin-right:8px; vertical-align:-2px; font-style:normal; }
.visit-line span { color:#CC302C; font-size:16px; }

/* 双按钮 */
.dual-btn { display:flex; margin-bottom:15px; border-radius:15px; overflow:hidden; background:#fff; }
.dual-btn .btn-box { flex:1; font-size:15px; padding:12px; position:relative; cursor:pointer; }
.dual-btn .btn-box + .btn-box { border-left:1px solid #eee; }
.dual-btn .btn-box b { display:block; font-size:15px; }
.dual-btn .btn-box p { font-size:13px; color:#CC302C; margin-top:10px; margin-bottom:0; }
.dual-btn .btn-box img { width:45px; position:absolute; right:12px; bottom:8px; }
.dual-btn .btn-box.btn-purple { background:linear-gradient(135deg,#9B7EDE,#C9A7F0); }
.dual-btn .btn-box.btn-purple b { color:#fff; }
.dual-btn .btn-box.btn-purple p { color:#F0E6FF; }

/* 列表条目 */
.li1 { border:1px solid #efefef; padding:10px; background:#fff; border-radius:8px; overflow:hidden; margin-bottom:10px; position:relative; }
.li1 p { margin-bottom:5px; color:#777; }
.li1 h4 { margin-bottom:10px; font-weight:normal; font-size:15px; }
.li1 .avatar { width:45px; border-radius:50%; margin-right:8px; float:left; }
.kkk1 { border-radius:4px; margin-left:4px; padding:3px 8px; background:#3380fe; color:#fff; font-size:13px; cursor:pointer; display:inline-block; }

/* 功能宫格 */
.grid { padding:10px; overflow:hidden; }
.grid .cell { width:20%; text-align:center; float:left; margin-bottom:5px; height:70px; overflow:hidden; cursor:pointer; }
.grid .cell img { width:60%; margin-bottom:-8px; }
.grid .cell .name { font-size:13px; color:#333; padding:0 2px; line-height:15px; height:30px; }

/* 校园PK */
.pk-wrap { padding:10px; }
.pk-bg { display:flex; background:linear-gradient(135deg,#ffe6e6,#fff5f5); border-radius:12px; }
.pk-item { flex:1; text-align:center; padding:20px 0; }
.pk-item img { width:25%; }
.pk-item p { font-size:18px; color:#000; margin-top:4px; }
.pk-vs { display:flex; align-items:center; font-weight:bold; font-size:20px; color:#CC302C; }

/* 热门题库 */
.quiz-grid { padding:10px 0; overflow:hidden; }
.quiz-item { background:#F7F8FC; border-radius:8px; margin-bottom:8px; padding:10px; width:calc(50% - 4px); float:left; cursor:pointer; }
.quiz-item:nth-child(odd) { margin-right:4px; }
.quiz-item:nth-child(even) { margin-left:4px; }
.quiz-item .name { font-size:15px; font-weight:bold; }
.quiz-item .name span { font-size:12px; float:right; color:#CC302C; font-weight:lighter; }
.quiz-item .prog { margin-top:15px; }
.quiz-item .prog .bar { background:#fff; color:#CC302C; border-radius:4px; overflow:hidden; font-size:12px; display:inline-block; padding:2px 8px; }

/* 底部 */
.footer { width:100%; text-align:center; margin-top:40px; font-size:14px; color:#666; }

/* 下拉菜单 */
.popover { display:none; position:fixed; top:58px; right:6px; width:190px; background:#fff; border-radius:8px; box-shadow:0 4px 16px rgba(0,0,0,.15); z-index:999; padding:6px 0; }
.popover.show { display:block; }
.popover .arrow { width:0; height:0; border-left:8px solid transparent; border-right:8px solid transparent; border-bottom:10px solid #fff; position:absolute; top:-10px; right:16px; }
.popover li { list-style:none; padding:12px 16px; font-size:14px; cursor:pointer; border-bottom:1px solid #f0f0f0; }
.popover li:last-child { border-bottom:none; }
.popover li:active { background:#f5f5f5; }

/* ============ 查询类页面 ============ */
.page-head { font-size:18px; font-weight:bold; text-align:center; padding:8px 0 10px; position:relative; }
.page-head .back { position:absolute; left:4px; top:8px; font-size:18px; cursor:pointer; color:#333; }
.page-head .count { font-size:12px; color:#999; font-weight:normal; text-align:center; margin-top:2px; }

.tabs { display:flex; margin-bottom:12px; background:#fff; border-radius:10px; padding:4px; }
.tabs .tab { flex:1; text-align:center; padding:8px 0; font-size:15px; color:#555; cursor:pointer; border-radius:8px; }
.tabs .tab.on { background:#3380fe; color:#fff; }

.filter-box { background:#fff; border-radius:12px; padding:12px; margin-bottom:12px; }
.filter-row { display:flex; align-items:center; margin-bottom:10px; flex-wrap:wrap; }
.filter-row:last-child { margin-bottom:0; }
.filter-row .label { width:70px; font-size:14px; color:#333; flex-shrink:0; }
.filter-row select { flex:1; border:1px solid #ddd; border-radius:6px; padding:8px; font-size:14px; background:#fff; color:#333; }
.chips { flex:1; display:flex; flex-wrap:wrap; gap:8px; }
.chip { padding:5px 12px; border:1px solid #ddd; border-radius:16px; font-size:13px; color:#555; cursor:pointer; background:#fff; }
.chip.on { background:#CC302C; color:#fff; border-color:#CC302C; }
.search-btn { width:100%; background:#3380fe; color:#fff; border:none; border-radius:8px; padding:11px; font-size:15px; cursor:pointer; }
.search-btn.red { background:#CC302C; }

.result-box { background:#fff; border-radius:12px; padding:12px; }
.result-table { width:100%; border-collapse:collapse; font-size:13px; }
.result-table th { background:#f7f8fc; padding:9px 6px; text-align:center; font-weight:normal; color:#555; }
.result-table td { padding:9px 6px; text-align:center; border-bottom:1px solid #f0f0f0; }
.result-table tr:last-child td { border-bottom:none; }
.highlight { color:#CC302C; font-weight:bold; }

/* 排序条 */
.sort-bar { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:10px; font-size:13px; color:#666; }
.sort-bar span { cursor:pointer; padding:4px 6px; border-radius:4px; }
.sort-bar span.on { color:#CC302C; }

/* 找专业 */
.major-layout { display:flex; gap:10px; }
.major-side { width:85px; background:#fff; border-radius:10px; padding:8px 0; flex-shrink:0; height:calc(100vh - 140px); overflow-y:auto; }
.major-side .mcat { padding:11px 6px; text-align:center; font-size:14px; color:#555; cursor:pointer; }
.major-side .mcat.on { color:#3380fe; font-weight:bold; background:#eef4ff; border-radius:8px; }
.major-main { flex:1; background:#fff; border-radius:10px; padding:12px; max-height:calc(100vh - 140px); overflow-y:auto; }
.major-main .mg { margin-bottom:14px; }
.major-main .mg h5 { font-size:14px; color:#3380fe; margin-bottom:8px; }
.major-main .mg .mtag { display:inline-block; font-size:13px; color:#333; padding:5px 10px; background:#f7f8fc; border-radius:6px; margin:0 6px 8px 0; cursor:pointer; }

/* 查大学 */
.univ-item { display:flex; padding:12px 0; border-bottom:1px solid #f0f0f0; }
.univ-item:last-child { border-bottom:none; }
.univ-item .uimg { width:44px; height:44px; border-radius:50%; background:#eef4ff; display:flex; align-items:center; justify-content:center; font-size:12px; color:#3380fe; flex-shrink:0; margin-right:10px; overflow:hidden; }
.univ-item .uinfo { flex:1; }
.univ-item .uname { font-size:16px; font-weight:bold; margin-bottom:4px; }
.univ-item .utag { font-size:13px; color:#666; }
.univ-item .utag .tag { display:inline-block; padding:1px 6px; border-radius:4px; font-size:12px; margin-right:4px; }
.univ-item .utag .gong { background:#e6f4ea; color:#1a7f37; }
.univ-item .utag .min { background:#fff4e5; color:#b26a00; }
.univ-item .uweb { font-size:12px; color:#3380fe; margin-top:4px; word-break:break-all; }

/* 分页 */
.pager { text-align:center; font-size:13px; color:#666; padding:14px 0; }
.pager a { display:inline-block; padding:6px 14px; background:#fff; border-radius:6px; margin:0 5px; border:1px solid #eee; color:#3380fe; cursor:pointer; }

/* 校园PK 列表 */
.pk-list-item { display:flex; align-items:center; padding:12px 0; border-bottom:1px solid #f0f0f0; }
.pk-list-item .pkinfo { flex:1; }
.pk-list-item .pkname { font-size:16px; font-weight:bold; }
.pk-list-item .pkname .tag { font-size:12px; padding:1px 6px; border-radius:4px; margin-left:6px; background:#e6f4ea; color:#1a7f37; }
.pk-list-item .pkname .tag.min { background:#fff4e5; color:#b26a00; }
.pk-list-item .pkflags { margin-top:6px; display:flex; flex-wrap:wrap; gap:6px; }
.pk-list-item .pkflag { font-size:12px; background:#f7f8fc; color:#555; padding:2px 8px; border-radius:4px; }
.pk-list-item .pkcity { font-size:13px; color:#999; }
.pk-list-item .pkadd { font-size:22px; color:#3380fe; cursor:pointer; padding:0 8px; }

/* 题库练习 */
.question { background:#fff; border-radius:12px; padding:16px; margin-bottom:12px; }
.question .qtitle { font-size:15px; font-weight:bold; margin-bottom:12px; }
.question .options .opt { border:1px solid #ddd; border-radius:8px; padding:11px; margin-bottom:8px; font-size:14px; cursor:pointer; }
.question .options .opt.right { background:#e6f4ea; border-color:#1a7f37; color:#1a7f37; }
.question .options .opt.wrong { background:#fdecea; border-color:#c62828; color:#c62828; }

/* AI助手 */
.ai-page { background:#fff; min-height:calc(100vh - 20px); border-radius:15px; overflow:hidden; }
.ai-head { background:#CC302C; color:#fff; padding:14px; font-size:16px; font-weight:bold; text-align:center; position:relative; }
.ai-body { padding:16px; min-height:400px; }
.ai-msg { margin-bottom:14px; }
.ai-msg .bubble { display:inline-block; max-width:80%; padding:11px 14px; border-radius:12px; font-size:14px; line-height:1.6; }
.ai-msg.bot .bubble { background:#f2f3f5; color:#333; border-top-left-radius:2px; }
.ai-msg.user { text-align:right; }
.ai-msg.user .bubble { background:#3380fe; color:#fff; border-top-right-radius:2px; text-align:left; }
.ai-input { display:flex; padding:10px; background:#fff; border-top:1px solid #eee; }
.ai-input input { flex:1; border:1px solid #ddd; border-radius:20px; padding:10px 14px; font-size:14px; outline:none; }
.ai-input button { background:#CC302C; color:#fff; border:none; border-radius:20px; padding:10px 20px; margin-left:8px; font-size:14px; cursor:pointer; }

/* 徽章 / 角标 */
.badge { position:absolute; top:-4px; right:-6px; background:#CC302C; color:#fff; border-radius:10px; font-size:11px; padding:1px 5px; }

/* 通用隐藏 */
.hidden { display:none !important; }
.text-center { text-align:center; }
.gray { color:#999; }
.loading { text-align:center; color:#999; padding:20px; font-size:13px; }
