/* ============================================
   广东省高考录取结果查询 · 广东小师姐升学日记
   品牌配色方案（基于公众号 LOGO 珊瑚红）
   Primary:   #d9553b  (主珊瑚红)
   Primary Dark: #c4482e
   Primary Light: #e8705a  (浅珊瑚)
   Header BG: linear-gradient(135deg, #c94a32, #e86b55) (珊瑚渐变)
   Success:   #059669  (绿)
   Warn:      #d97706  (橙)
   ============================================ */

:root {
  --primary: #d9553b;
  --primary-dark: #c4482e;
  --primary-light: #e8705a;
  --header-bg: linear-gradient(135deg, #c94a32 0%, #e86b55 100%);
  --accent: #e8705a;
  --accent-soft: #fdecea;
  --success: #059669;
  --success-soft: #ecfdf5;
  --warn: #d97706;
  --warn-soft: #fff7ed;
  --danger: #dc2626;

  --surface: #faf8f7;
  --surface-alt: #f3f0ee;
  --line: #e8e2de;
  --line-light: #f3f0ee;

  --ink: #2d2420;
  --ink-soft: #6b5c52;
  --ink-faint: #9e8f84;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow: 0 2px 12px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 30px rgba(217,85,59,.18);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--surface);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  padding-bottom: 60px;
}

/* ===== 视图切换 ===== */
.view { display: none; }
.view.active { display: block; }

/* ===== 品牌头部（首页） ===== */
.brand-header {
  background: var(--header-bg);
  padding: 28px 24px 32px;
  color: #fff;
}
.brand-header-inner {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.brand-logo-img {
  width: 120px;
  height: 120px;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
}
.brand-title {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: .5px;
  line-height: 1.3;
  text-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.brand-sub {
  font-size: 13.5px;
  opacity: .85;
  margin-top: 2px;
  font-weight: 400;
}

/* ===== 首页主体 ===== */
.home-main { max-width: 640px; margin: 0 auto; padding: 22px 16px 10px; }

/* 入口卡片 */
.entry-cards { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }

.entry-card {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 18px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  transition: all .2s ease;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.entry-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.entry-card:active { transform: translateY(0); }

/* 主推卡片 - 珊瑚红 */
.entry-card--primary {
  background: linear-gradient(135deg, #d9553b 0%, #e8705a 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 16px rgba(217,85,59,.3);
}
.entry-card--primary:hover {
  box-shadow: 0 6px 24px rgba(217,85,59,.42);
  transform: translateY(-2px);
}

/* 考试院卡片 - 深色权威风 */
.entry-card--exam {
  background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 16px rgba(45,55,72,.25);
}
.entry-card--exam:hover {
  box-shadow: 0 6px 24px rgba(45,55,72,.38);
  transform: translateY(-2px);
}

/* 实时更新卡片 - 绿色系（呼应"实时"语义） */
.entry-card--live {
  background: linear-gradient(135deg, #0f9d76 0%, #16b88a 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 16px rgba(15,157,118,.25);
}
.entry-card--live:hover {
  box-shadow: 0 6px 24px rgba(15,157,118,.4);
  transform: translateY(-2px);
}
.card-icon--live svg { stroke: #fff !important; }
.card-icon--live svg [fill] { fill: #fff !important; }
.entry-card--live .card-body p { color: rgba(255,255,255,.82); }
.live-badge {
  display: inline-block;
  font-size: 11px; font-weight: 700; line-height: 1;
  padding: 3px 7px; margin-left: 4px;
  border-radius: 999px;
  background: #fff; color: #0f9d76;
  vertical-align: middle;
  position: relative; top: -1px;
}
.live-badge::before {
  content: ""; display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: #0f9d76; margin-right: 4px;
  vertical-align: middle;
  animation: livePulse 1.4s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .35; transform: scale(.7); }
}

.card-icon { flex-shrink: 0; }
.card-icon svg { display: block; }
.card-icon--light svg { stroke: #fff !important; }
.card-icon--light svg [fill] { fill: #fff !important; }
.card-icon--exam svg { stroke: #e2e8f0 !important; opacity: .95; }
.card-icon--exam svg [fill] { fill: #e2e8f0 !important; }

.card-body { flex: 1; min-width: 0; }
.card-body h2 {
  font-size: 17px; font-weight: 700; margin-bottom: 4px;
  line-height: 1.35;
}
.entry-card--primary .card-body h2,
.entry-card--exam .card-body h2,
.entry-card--live .card-body h2 { font-size: 17.5px; }
.card-body p {
  font-size: 13px; color: var(--ink-soft); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.entry-card--primary .card-body p,
.entry-card--exam .card-body p { color: rgba(255,255,255,.78); }

.card-arrow {
  flex-shrink: 0;
  font-size: 22px; font-weight: 300;
  color: var(--primary); opacity: .4;
  transition: all .2s;
}
.entry-card:hover .card-arrow { opacity: 1; transform: translateX(3px); }
.card-arrow--light { color: rgba(255,255,255,.7); }

/* ===== 公众号 & 补录群 入口 ===== */
.action-links { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }

.action-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none; color: var(--ink);
  transition: all .18s;
}
.action-btn:hover {
  border-color: var(--primary-light);
  box-shadow: 0 2px 12px rgba(217,85,59,.1);
}
.action-icon { font-size: 26px; flex-shrink: 0; }
.action-text { flex: 1; min-width: 0; }
.action-text strong { font-size: 14.5px; display: block; margin-bottom: 2px; }
.action-text small { font-size: 12.5px; color: var(--ink-soft); }
.action-go {
  flex-shrink: 0;
  font-size: 13px; font-weight: 700; color: var(--primary);
  padding: 6px 14px; border-radius: 20px;
  background: var(--accent-soft); white-space: nowrap;
  transition: all .18s;
}
.action-btn:hover .action-go { background: var(--primary); color: #fff; }

.action-btn--wechat { border-color: #fad4c8; }
.action-btn--wechat:hover { border-color: var(--primary); }
.action-btn--group { border-color: #bbf7d0; }
.action-btn--group:hover { border-color: var(--success); }
.action-btn--group .action-go { background: #d1fae5; color: var(--success); }
.action-btn--group:hover .action-go { background: var(--success); color: #fff; }

/* ===== 首页底部提示 ===== */
.home-note { text-align: center; padding: 16px 0 8px; }
.home-note p { font-size: 12px; color: var(--ink-faint); margin-bottom: 6px; }
.ip-mark { display: inline-flex; align-items: center; gap: 8px; }
.ip-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; font-size: 11px; font-weight: 600;
  padding: 2px 10px; border-radius: 20px;
  letter-spacing: .5px;
}

/* ===== 子页面头部（返回按钮） ===== */
.panel-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
}
.panel-header h2 { font-size: 17px; font-weight: 700; }
.back-btn {
  appearance: none; border: none; background: var(--surface-alt);
  color: var(--ink); font-size: 14px; font-weight: 600;
  padding: 7px 14px; border-radius: 20px;
  cursor: pointer; transition: all .15s;
  text-decoration: none;
}
.back-btn:hover { background: var(--primary); color: #fff; }
.back-btn--light { background: rgba(255,255,255,.2); color: #fff; }
.back-btn--light:hover { background: rgba(255,255,255,.35); }

.panel-header--primary {
  background: linear-gradient(135deg, #d9553b 0%, #e8705a 100%);
  color: #fff;
  border-bottom: none;
}
.panel-header--primary h2 { color: #fff; }

/* 数据来源横幅（醒目提示旧数据） */
.data-banner {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 12px 20px 0;
  padding: 11px 14px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-left: 4px solid #f59e0b;
  border-radius: var(--radius-sm);
  font-size: 12.5px; line-height: 1.6; color: #9a3412;
}
.banner-icon { flex: 0 0 auto; font-size: 14px; line-height: 1.5; }
.banner-text { flex: 1; }
.banner-text strong { color: #c2410c; }

/* ===== 容器（子页面） ===== */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ===== 筛选区 ===== */
.filters {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,.03);
}
.filter-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.filter-row + .filter-row { margin-top: 12px; }
.field label {
  display: block;
  font-size: 12.5px; font-weight: 600; color: var(--ink-soft);
  margin-bottom: 5px;
}
.field input[type="text"],
.field input[type="number"],
.field select {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-xs);
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color .15s;
  font-family: inherit;
}
.field input:focus,
.field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(217,85,59,.1); }
.range-inputs { display: flex; align-items: center; gap: 8px; }
.range-inputs input { width: 90px; }
.range-sep { color: var(--ink-faint); font-size: 13px; }
.field-actions { display: flex; align-items: flex-end; }

.btn {
  border: none; border-radius: var(--radius-xs);
  font-size: 13.5px; font-weight: 600;
  cursor: pointer; padding: 9px 18px;
  font-family: inherit; transition: all .15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: var(--surface-alt); color: var(--ink-soft); }
.btn-ghost:hover { background: var(--line); color: var(--ink); }

/* ===== 统计条 ===== */
.stats {
  display: flex; gap: 10px; flex-wrap: wrap;
  padding: 12px 18px;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.stat-pill {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--primary);
  font-size: 12.5px; font-weight: 700;
  padding: 5px 14px; border-radius: 20px;
}

/* ===== 表格区 ===== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; min-width: 800px; }
th {
  background: var(--surface-alt);
  padding: 11px 14px;
  text-align: left;
  font-size: 12.5px; font-weight: 700;
  color: var(--ink-soft);
  border-bottom: 1.5px solid var(--line);
  white-space: nowrap; user-select: none;
}
th.sortable { cursor: pointer; transition: color .15s; }
th.sortable:hover { color: var(--primary); }
th.num { text-align: right; }
td { padding: 10px 14px; font-size: 13.5px; border-bottom: 1px solid var(--line-light); vertical-align: middle; }
td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
tbody tr { transition: background .12s; cursor: default; }
tbody tr:hover { background: #fef9f7; }

/* 分数颜色：涨红跌绿（A股惯例） */
.score-up { color: #dc2626; }
.score-down { color: #059669; }

/* 办学性质标签 */
.tag {
  display: inline-block; font-size: 11.5px; font-weight: 600;
  padding: 2px 9px; border-radius: 20px; white-space: nowrap;
}
.tag-公办 { background: #ecfdf5; color: #059669; }
.tag-民办 { background: #fef3e6; color: #d97706; }
.tag-独立学院 { background: #f3e8ff; color: #7c3aed; }
.tag-中外合作 { background: #eff6ff; color: #2563eb; }

/* 详情展开行 */
.detail-row { background: #faf8f7 !important; }
.detail-row td { padding: 0; }
.detail-inner {
  padding: 14px 18px 14px 54px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px 20px;
}
.detail-item { display: flex; gap: 6px; align-items: baseline; }
.detail-item .k { font-size: 12px; color: var(--ink-faint); flex-shrink: 0; }
.detail-item .v { font-size: 13.5px; font-weight: 600; }

.empty-state { padding: 48px 20px; text-align: center; color: var(--ink-soft); }

/* 数据说明 */
.note { padding: 6px 18px; }
.note summary { cursor: pointer; padding: 12px 0; font-weight: 600; color: var(--ink); }
.note p, .note ol { color: var(--ink-soft); font-size: 13px; }
.note code {
  background: #fef3e6; padding: 1px 6px; border-radius: 5px;
  font-size: 12.5px; color: var(--primary);
}

/* ===== 官方录取查询入口面板 ===== */
.official-intro { padding: 16px 18px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.7; }
.official-intro p { margin: 0 0 6px; }
.official-intro .src { font-size: 12.5px; margin-bottom: 0; }
.official-intro a { color: var(--primary); text-decoration: none; }
.official-intro a:hover { text-decoration: underline; }

/* 统计栏（官方面板） */
#official-stats .stat-row { display: flex; gap: 10px; padding: 10px 18px; flex-wrap: wrap; }
#official-stats .stat-badge {
  display: inline-block; background: #fef3e6; color: var(--ink);
  font-size: 13px; font-weight: 600; padding: 5px 14px; border-radius: 20px;
}
#official-stats .stat-badge.has-link { background: #ecfdf5; color: var(--success); }
#official-stats .stat-badge.no-link { background: #fff7ed; color: var(--warn); }

/* 列表视图 */
.official-grid {
  display: flex; flex-direction: column; gap: 0;
  padding: 0;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  overflow: hidden;
}
.official-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px; background: #fff;
  border-bottom: 1px solid #f3f0ee; transition: background .12s;
}
.official-card:last-child { border-bottom: none; }
.official-card:hover { background: #faf8f7; }
.official-card.no-entry { opacity: .6; }
.official-card .card-left { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; }
.official-card .num { font-size: 12px; color: var(--ink-faint); font-variant-numeric: tabular-nums; flex-shrink: 0; width: 36px; text-align: right; }
.official-card .name { font-size: 14.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.official-card .go {
  flex-shrink: 0; text-decoration: none;
  background: var(--primary); color: #fff;
  font-size: 13px; font-weight: 600;
  padding: 6px 16px; border-radius: 8px;
  transition: filter .15s; white-space: nowrap;
}
.official-card .go:hover { filter: brightness(1.1); }
.official-card .go::after { content: " ↗"; opacity: .7; margin-left: 3px; }
.official-card .go.disabled { background: #cbd5e1; cursor: default; pointer-events: none; }
.official-card .go.disabled::after { content: ""; }

/* 分页 */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; padding: 16px 0 4px;
}
.page-btn {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-size: 13.5px; font-weight: 600;
  padding: 7px 18px; border-radius: 8px;
  cursor: pointer; transition: all .15s;
}
.page-btn:hover:not(:disabled) { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: .35; cursor: default; }
.page-num { font-size: 13px; color: var(--ink-soft); }

/* ===== 底部固定栏 ===== */
.sticky-footer {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 100;
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -2px 10px rgba(0,0,0,.05);
}
.footer-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px;
}
.footer-brand { font-size: 13px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.footer-logo-mini {
  width: 22px; height: 22px; border-radius: 5px; object-fit: cover;
}
.footer-links { display: flex; gap: 10px; }
.footer-link {
  text-decoration: none; font-size: 12.5px; font-weight: 600;
  padding: 5px 14px; border-radius: 20px;
  color: var(--ink-soft); transition: all .15s;
}
.footer-link:hover { color: var(--primary); background: var(--accent-soft); }
.footer-link--highlight {
  background: linear-gradient(135deg, #d9553b, #e8705a);
  color: #fff !important;
  animation: pulse-glow 2s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217,85,59,.3); }
  50% { box-shadow: 0 0 0 6px rgba(217,85,59,0); }
}

/* ===== 页脚 ===== */
.footer-page {
  max-width: 1180px; margin: 10px auto 40px;
  padding: 0 24px;
  text-align: center; color: var(--ink-faint); font-size: 12px;
}

/* ===== 响应式 ===== */
@media (max-width: 760px) {
  .filter-row { grid-template-columns: 1fr; }
  .brand-header { padding: 22px 16px 26px; }
  .brand-logo-img { width: 96px; height: 96px; border-radius: 16px; }
  .brand-title { font-size: 19px; }
  .entry-card { padding: 16px 14px; flex-wrap: wrap; }
  .card-body h2 { font-size: 15.5px; }
  .entry-card--primary .card-body h2,
  .entry-card--exam .card-body h2,
  .entry-card--live .card-body h2 { font-size: 16px; }
  .card-body p { -webkit-line-clamp: 1; }
  .card-arrow { display: none; }
  .action-btn { flex-wrap: wrap; gap: 8px; }
  .action-go { width: 100%; text-align: center; }
  .official-card { padding: 10px 12px; }
  .official-card .name { font-size: 13.5px; }
  .official-card .go { padding: 5px 10px; font-size: 12px; }
  .official-card .num { width: 28px; font-size: 11px; }
  .pagination { gap: 8px; flex-wrap: wrap; }
  .page-btn { padding: 6px 12px; font-size: 12.5px; }
  .footer-inner { flex-direction: column; gap: 8px; padding: 8px 16px; }
  .panel-header { padding: 10px 14px; }
  .container { padding: 0 10px 8px; }
  .data-banner { margin: 10px 14px 0; font-size: 12px; }
  .stat-pill { font-size: 12px; padding: 5px 10px; }
}

/* 手机端：9 列表格转为卡片，便于单手查看 */
@media (max-width: 680px) {
  .table-scroll { overflow-x: visible; border: none; background: transparent; }
  table { min-width: 0; }
  thead { display: none; }
  tbody, tr, td { display: block; width: 100%; }
  .data-row {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    margin-bottom: 11px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
  }
  tbody tr.data-row td {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 8px 14px;
    border-bottom: 1px solid var(--line-light);
    text-align: right; white-space: normal;
  }
  tbody tr.data-row td:last-child { border-bottom: none; }
  tbody tr.data-row td::before {
    content: attr(data-label);
    flex: 0 0 auto; text-align: left;
    font-size: 12px; font-weight: 600; color: var(--ink-soft);
    margin-right: 10px;
  }
  tbody tr.data-row td.school-cell {
    background: #fef9f7; font-weight: 700; font-size: 14.5px; color: var(--primary);
  }
  tbody tr.data-row td.school-cell::before { font-weight: 700; color: var(--ink-soft); }
  tbody tr.data-row td.code-cell::before { content: "代码 "attr(data-label); }
  .detail-row { margin: -11px 0 11px; border: 1px dashed var(--line); border-top: none; border-radius: 0 0 var(--radius-sm) var(--radius-sm); background: #faf8f7; }
  .detail-row td { padding: 0; }
  .detail-inner { padding: 12px 14px; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
  .detail-item { flex-direction: column; align-items: flex-start; gap: 2px; }
  .detail-item .k { font-size: 11px; }
  .detail-item .v { font-size: 13px; }
}
