/* ==========================================================================
   AI编程学堂 · 站点样式
   视觉参考：layui 2.x + 原站主题色 #059af0
   ========================================================================== */

:root {
  --main: #059af0;
  --main-dark: #0288d1;
  --main-light: #e6f6ff;
  --text: #333;
  --text-2: #666;
  --muted: #999;
  --line: #e6e6e6;
  --line-2: #f2f2f2;
  --bg: #f2f3f5;
  --white: #fff;
  --radius: 4px;
  --danger: #ff5722;
  --success: #16b777;
  --warn: #ffb800;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 2px 8px rgba(0, 0, 0, .06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
a { color: var(--text); text-decoration: none; transition: color .15s; }
a:hover { color: var(--main); }
img { border: 0; vertical-align: middle; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; }
::selection { background: var(--main); color: #fff; }

/* ------------------------------- 布局 ------------------------------- */
.layui-main { width: 1200px; max-width: calc(100% - 30px); margin: 0 auto; }
.page-main { min-height: 60vh; padding-bottom: 40px; }
.fr { float: right; }
.fl { float: left; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.clearfix::after { content: ""; display: block; clear: both; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.section { margin-top: 34px; }

/* 图标（SVG sprite） */
.ic { width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic-fill { fill: currentColor; stroke: none; }
.svg-sprite { display: none; }

/* ------------------------------- 顶部导航 ------------------------------- */
.top-header {
  background: var(--main);
  color: #fff;
  height: 60px;
  position: relative;
  z-index: 60;
}
.top-header .layui-main { display: flex; align-items: center; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; margin-right: 18px; flex: none; }
.logo:hover { color: #fff; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: rgba(255, 255, 255, .18);
  display: grid; place-items: center;
  font-weight: 800; font-size: 16px; letter-spacing: -.5px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
}
.logo-text { font-size: 18px; font-weight: 700; letter-spacing: .5px; white-space: nowrap; }
.logo-sub { font-size: 11px; opacity: .75; margin-left: 2px; letter-spacing: 1px; display: none; }
.nav-links { display: flex; align-items: center; height: 60px; flex: 1 1 auto; min-width: 0; }
.nav-item {
  position: relative; display: inline-flex; align-items: center; gap: 4px;
  height: 60px; padding: 0 15px; color: rgba(255, 255, 255, .94);
  font-size: 15px; white-space: nowrap; cursor: pointer;
}
.nav-item:hover, .nav-item.active { color: #fff; background: rgba(255, 255, 255, .12); }
.nav-item .ic { width: 13px; height: 13px; opacity: .8; }
.nav-drop { position: absolute; left: 0; top: 60px; min-width: 148px; background: #fff; border-radius: 0 0 4px 4px; box-shadow: 0 6px 18px rgba(0, 0, 0, .12); padding: 6px 0; display: none; }
.nav-item:hover .nav-drop, .nav-item.open .nav-drop { display: block; }
.nav-drop a { display: block; padding: 9px 18px; font-size: 14px; color: var(--text-2); }
.nav-drop a:hover { background: var(--main-light); color: var(--main); }
.login-menu { display: flex; align-items: center; gap: 8px; flex: none; }
.login-menu .layui-border {
  border: 1px solid rgba(255, 255, 255, .75); border-radius: 3px;
  padding: 6px 14px; color: #fff; font-size: 14px; display: inline-flex; gap: 3px;
}
.login-menu .layui-border:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.user-entry { display: flex; align-items: center; gap: 8px; color: #fff; cursor: pointer; position: relative; padding: 8px 4px; }
.user-entry img { width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .25); }
.user-entry .uname { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.user-menu { position: absolute; right: 0; top: 52px; width: 168px; background: #fff; border-radius: 6px; box-shadow: 0 8px 26px rgba(0, 0, 0, .16); padding: 6px 0; display: none; }
.user-entry:hover .user-menu, .user-entry.open .user-menu { display: block; }
.user-menu a { display: flex; align-items: center; gap: 9px; padding: 9px 16px; font-size: 14px; color: var(--text-2); }
.user-menu a:hover { background: #f7f8fa; color: var(--main); }
.user-menu .ic { width: 15px; height: 15px; }
.user-menu .divider { height: 1px; background: var(--line-2); margin: 5px 0; }
.mobile-toggle { display: none; color: #fff; background: none; border: 0; font-size: 22px; }

/* ------------------------------- 按钮 ------------------------------- */
.layui-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; line-height: 1; padding: 0 18px;
  background: #1e9fff; color: #fff; border: 0; border-radius: 3px;
  font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: background .15s, box-shadow .15s, transform .05s;
}
.layui-btn:hover { color: #fff; filter: brightness(1.06); }
.layui-btn:active { transform: translateY(1px); }
.layui-btn .ic { width: 15px; height: 15px; }
.layui-btn-normal { background: var(--main); }
.layui-btn-primary { background: #fff; border: 1px solid var(--line); color: var(--text-2); }
.layui-btn-primary:hover { color: var(--main); border-color: var(--main); }
.layui-btn-danger { background: var(--danger); }
.layui-btn-success { background: var(--success); }
.layui-btn-warm { background: var(--warn); color: #333; }
.layui-btn-radius { border-radius: 100px; }
.layui-btn-sm { height: 30px; padding: 0 12px; font-size: 13px; }
.layui-btn-xs { height: 24px; padding: 0 9px; font-size: 12px; border-radius: 2px; }
.layui-btn-lg { height: 44px; padding: 0 26px; font-size: 15px; }
.layui-btn-fluid { width: 100%; }
.layui-btn[disabled], .layui-btn.disabled { opacity: .55; pointer-events: none; }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--text-2); }

/* ------------------------------- 表单 ------------------------------- */
.layui-form-item { margin-bottom: 16px; }
.layui-form-label { display: block; font-size: 14px; color: var(--text-2); margin-bottom: 7px; }
.layui-input, .layui-textarea, .layui-select {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line);
  border-radius: 3px; font-size: 14px; color: var(--text); background: #fff;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.layui-textarea { height: auto; min-height: 110px; padding: 10px 12px; line-height: 1.7; resize: vertical; }
.layui-input:focus, .layui-textarea:focus, .layui-select:focus { border-color: var(--main); box-shadow: 0 0 0 3px rgba(5, 154, 240, .12); }
.layui-input::placeholder, .layui-textarea::placeholder { color: #bbb; }
.layui-input-inline { display: inline-block; }
.layui-form-hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.layui-btn + .layui-btn { margin-left: 6px; }
.search-bar { display: flex; gap: 0; align-items: stretch; }
.search-bar .layui-input { height: 40px; border-width: 2px; border-right: none; border-radius: 4px 0 0 4px; }
.search-bar .layui-btn { height: 40px; border-radius: 0 4px 4px 0; padding: 0 20px; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; padding: 4px 0; }
.checkbox {
  display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--text-2);
  cursor: pointer; user-select: none;
}
.checkbox input { appearance: none; width: 16px; height: 16px; border: 1px solid #c9c9c9; border-radius: 2px; cursor: pointer; position: relative; margin: 0; transition: .15s; }
.checkbox input:checked { background: var(--main); border-color: var(--main); }
.checkbox input:checked::after { content: ""; position: absolute; left: 5px; top: 1.5px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-size: 13px; color: var(--text-2); }
.switch input { display: none; }
.switch .track { width: 38px; height: 22px; background: #d5d5d5; border-radius: 999px; position: relative; transition: .18s; flex: none; }
.switch .track::after { content: ""; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px; border-radius: 50%; background: #fff; transition: .18s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.switch input:checked + .track { background: var(--main); }
.switch input:checked + .track::after { left: 18px; }

/* ------------------------------- 表格 ------------------------------- */
.layui-table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.layui-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.layui-table th, .layui-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.layui-table th { background: #fafafa; color: var(--text-2); font-weight: 600; font-size: 13px; white-space: nowrap; }
.layui-table tbody tr:hover { background: #fafcff; }
.layui-table tbody tr:last-child td { border-bottom: 0; }
.layui-table .num { color: var(--muted); font-variant-numeric: tabular-nums; }

/* 徽章 / 标签 */
.layui-badge { display: inline-block; padding: 1px 9px; border-radius: 10px; font-size: 12px; line-height: 20px; background: #f2f2f2; color: var(--text-2); }
.layui-bg-orange { background: #fff1e6; color: #f56c1d; }
.layui-bg-blue { background: #e8f4ff; color: #1e9fff; }
.layui-bg-green { background: #e8fbf1; color: #16b777; }
.layui-bg-red { background: #ffece8; color: #ff5722; }
.layui-bg-purple { background: #f1ecff; color: #7b3ff2; }
.layui-bg-gray { background: #f2f2f2; color: #888; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 3px; background: #f5f7fa; color: #7a869a; font-size: 12px; }
.tag:hover { background: var(--main-light); color: var(--main); }

/* ------------------------------- 首页 ------------------------------- */
.banner { position: relative; overflow: hidden; background: #e9f6ff; }
.banner-track { display: flex; transition: transform .5s cubic-bezier(.4, 0, .2, 1); }
.banner-slide { flex: 0 0 100%; display: block; }
.banner-slide img { width: 100%; display: block; aspect-ratio: 3 / 1; object-fit: cover; }
.banner-dots { position: absolute; left: 0; right: 0; bottom: 16px; display: flex; gap: 9px; justify-content: center; }
.banner-dots span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .55); cursor: pointer; transition: .2s; }
.banner-dots span.active { width: 22px; border-radius: 6px; background: #fff; }

.quick-entry { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; }
.quick-card {
  display: flex; gap: 12px; align-items: center; padding: 18px 20px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; transition: .18s; position: relative; overflow: hidden;
}
.quick-card:hover { border-color: var(--main); box-shadow: var(--shadow); transform: translateY(-2px); }
.quick-card .qi { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--main-light); color: var(--main); flex: none; }
.quick-card .qi .ic { width: 22px; height: 22px; }
.quick-card > span:last-child { min-width: 0; }
.quick-card .qt { display: block; font-size: 15px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick-card .qd { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick-card.ai { border-color: #cfe9ff; background: linear-gradient(120deg, #f2faff, #fff); }
.quick-card.ai .qi { background: linear-gradient(135deg, #059af0, #6a5cff); color: #fff; }

.b-header { display: flex; align-items: center; justify-content: space-between; margin: 36px 0 18px; }
.b-header-title { font-size: 20px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 9px; }
.b-header-title .ic { color: var(--main); width: 22px; height: 22px; }
.more-link { font-size: 14px; color: var(--muted); display: inline-flex; align-items: center; gap: 2px; }
.more-link:hover { color: var(--main); }

.work-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.work-card { background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; transition: .18s; display: flex; flex-direction: column; }
.work-card:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, .1); transform: translateY(-3px); border-color: #d8ecff; }
.work-cover { position: relative; aspect-ratio: 8 / 5; overflow: hidden; background: #f2f2f2; }
.work-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.work-card:hover .work-cover img { transform: scale(1.04); }
.work-cover .play-badge { position: absolute; right: 8px; top: 8px; background: rgba(0, 0, 0, .5); color: #fff; border-radius: 30px; padding: 2px 9px; font-size: 11px; display: flex; align-items: center; gap: 3px; backdrop-filter: blur(4px); }
.work-body { padding: 10px 12px 12px; }
.work-title { font-size: 14px; font-weight: 600; color: var(--text); line-height: 22px; height: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-meta { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--muted); font-size: 12px; }
.work-meta img { width: 18px; height: 18px; border-radius: 50%; background: #eee; }
.work-meta .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-meta .stat { display: inline-flex; align-items: center; gap: 3px; }
.work-meta .ic { width: 13px; height: 13px; }
.empty-box { padding: 70px 0; text-align: center; color: #bbb; }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.news-grid > a { min-width: 0; }
@media (max-width: 900px) { .news-grid { grid-template-columns: 1fr; } }
.empty-box .ic { width: 46px; height: 46px; stroke-width: 1.4; display: block; margin: 0 auto 12px; color: #d5dbe3; }

/* ------------------------------- 题库 ------------------------------- */
.filter-card { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 18px 20px 14px; margin: 24px 0 16px; }
.filter-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.filter-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.filter-label { font-size: 13px; color: var(--muted); flex: none; }
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 4px 14px; border-radius: 14px; background: #f5f6f8; color: var(--text-2); font-size: 13px; cursor: pointer; border: 1px solid transparent; }
.chip:hover { color: var(--main); }
.chip.active { background: var(--main); color: #fff; }
.chip .count { opacity: .6; font-size: 11px; }
.q-table { width: 100%; border-collapse: collapse; background: #fff; }
.q-table th { background: #fafafa; color: var(--text-2); font-size: 13px; font-weight: 600; padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.q-table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.q-table tr:hover td { background: #fafcff; }
.q-info { display: flex; gap: 14px; align-items: center; }
.q-info img { width: 86px; height: 60px; border-radius: 4px; object-fit: cover; background: #f5f5f5; flex: none; }
.q-title { font-size: 16px; font-weight: 600; color: var(--text); line-height: 1.4; }
.q-title:hover { color: var(--main); }
.q-sub { font-size: 12px; color: var(--muted); margin-top: 3px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sortable { cursor: pointer; user-select: none; }
.sortable .ic { width: 12px; height: 12px; opacity: .45; }
.sortable.active { color: var(--main); }
.sortable.active .ic { opacity: 1; }
.level { display: inline-flex; align-items: center; gap: 4px; }
.level i { width: 6px; height: 6px; border-radius: 50%; background: #ddd; display: inline-block; }
.level i.on { background: #ffb800; }
.level i:nth-child(n+4).on { background: #ff7043; }

/* 题目详情 */
.q-detail { display: grid; grid-template-columns: 1fr 340px; gap: 24px; margin-top: 24px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.panel-head { padding: 16px 22px; border-bottom: 1px solid var(--line-2); font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.panel-body { padding: 22px; }
.q-statement { font-size: 15px; color: #444; line-height: 2; white-space: pre-wrap; }
.q-cover { width: 100%; border-radius: 6px; margin-bottom: 18px; display: block; }
.meta-list { display: grid; gap: 12px; font-size: 14px; }
.meta-list .mrow { display: flex; justify-content: space-between; gap: 12px; color: var(--text-2); }
.meta-list .mrow b { color: var(--text); font-weight: 600; }
.code-block { background: #0f172a; color: #d7e3f4; border-radius: 6px; padding: 16px 18px; font-family: var(--mono); font-size: 13px; line-height: 1.75; overflow: auto; white-space: pre; }
.code-block.light { background: #f7f9fc; color: #2c3e50; border: 1px solid var(--line); }
.tip-box { background: #f0f9ff; border: 1px solid #cfeaff; border-radius: 6px; padding: 14px 16px; color: #22688f; font-size: 13px; line-height: 1.8; }

/* ------------------------------- 作品列表 / 详情 ------------------------------- */
.filter-groups .f-row { display: flex; gap: 10px; align-items: center; }
.f-head { font-size: 13px; color: var(--muted); width: 66px; flex: none; }
.f-body { display: flex; flex-wrap: wrap; gap: 14px; }
.f-item { font-size: 13px; color: var(--text-2); padding: 3px 10px; border-radius: 12px; cursor: pointer; }
.f-item.active, .f-item:hover { background: var(--main); color: #fff; }
.order-field { color: var(--muted); font-size: 14px; margin-left: 14px; }
.order-field.active { color: var(--main); font-weight: 600; }

.sc-header { padding: 22px 24px; border-bottom: 1px solid var(--line-2); display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sc-title { font-size: 24px; font-weight: 700; }
.sc-meta { display: flex; align-items: center; gap: 16px; margin-top: 10px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.sc-meta img { width: 26px; height: 26px; border-radius: 50%; }
.sc-body { display: grid; grid-template-columns: 1fr 380px; gap: 0; }
.player-box { background: #0b1220; min-height: 680px; display: flex; align-items: center; justify-content: center; border-radius: 0 0 0 6px; overflow: hidden; }
.player-box iframe { width: 100%; height: 680px; border: 0; background: #0b1220; }
.player-box .ph { color: #6b7c96; text-align: center; padding: 40px; }
.sc-side { padding: 22px 24px; border-left: 1px solid var(--line-2); }
.sc-side h3 { font-size: 15px; margin: 18px 0 8px; }
.sc-side h3:first-child { margin-top: 0; }
.sc-side p { color: var(--text-2); font-size: 14px; line-height: 1.9; margin: 0; white-space: pre-wrap; }
.sc-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 16px 24px; border-top: 1px solid var(--line-2); background: #fcfdff; }
.like-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; height: 36px; padding: 0 16px; border-radius: 999px; cursor: pointer; color: var(--text-2); font-size: 14px; }
.like-btn.on { border-color: #ffd6e2; background: #fff5f8; color: #e8557f; }
.like-btn.on .ic { fill: currentColor; }
.star-input { display: inline-flex; gap: 2px; color: #ffb800; cursor: pointer; font-size: 18px; }
.star-input .ic { width: 18px; height: 18px; fill: none; }
.star-input .on .ic { fill: currentColor; }
.comment-item { display: flex; gap: 12px; padding: 16px 0; border-bottom: 1px dashed var(--line-2); }
.comment-item img { width: 38px; height: 38px; border-radius: 50%; background: #eee; flex: none; }
.comment-item .cname { font-size: 14px; color: var(--text-2); font-weight: 600; }
.comment-item .ctime { font-size: 12px; color: var(--muted); margin-left: 8px; font-weight: 400; }
.comment-item .ctext { font-size: 14px; color: #444; margin-top: 2px; line-height: 1.8; white-space: pre-wrap; }
.comment-count { color: var(--muted); font-weight: 400; font-size: 14px; }

/* ------------------------------- 论坛 ------------------------------- */
.bbs-nav { display: flex; gap: 10px; margin: 24px 0 16px; overflow-x: auto; }
.bbs-nav-item { padding: 8px 18px; border-radius: 999px; background: #f5f6f8; color: var(--text-2); cursor: pointer; white-space: nowrap; font-size: 14px; }
.bbs-nav-item.selected, .bbs-nav-item:hover { background: var(--main); color: #fff; }
.bbs-layout { display: grid; grid-template-columns: 1fr 280px; gap: 20px; align-items: start; }
.bbs-left { background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.bbs-toolbar { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.bbs-toolbar .search-bar { flex: 1; min-width: 220px; }
.sort-group { display: flex; gap: 14px; font-size: 14px; color: var(--muted); }
.sort-group a.active { color: var(--main); font-weight: 600; }
.bbs-item { display: block; padding: 18px 22px; border-bottom: 1px solid var(--line-2); transition: background .15s; }
.bbs-item:hover { background: #fafcff; }
.bbs-item:last-child { border-bottom: 0; }
.bbs-item-head { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.bbs-item-head img { width: 22px; height: 22px; border-radius: 50%; background: #eee; }
.bbs-item-title { font-size: 17px; font-weight: 600; color: var(--text); margin: 7px 0 4px; }
.bbs-item:hover .bbs-item-title { color: var(--main); }
.bbs-item-abstract { font-size: 13px; color: var(--muted); line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bbs-item-foot { display: flex; gap: 18px; margin-top: 10px; font-size: 12px; color: #b0b0b0; }
.bbs-item-foot span { display: inline-flex; align-items: center; gap: 4px; }
.bbs-side { position: sticky; top: 20px; display: grid; gap: 14px; }
.side-card { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 18px; }
.side-card h3 { font-size: 15px; margin-bottom: 12px; }
.side-card .layui-btn { width: 100%; }
.side-card .layui-btn + .layui-btn { margin: 10px 0 0; }
.bbs-post { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 30px 40px; margin-top: 24px; }
.bbs-post h1 { font-size: 23px; line-height: 1.5; margin-bottom: 10px; }
.bbs-post .p-meta { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; padding-bottom: 16px; border-bottom: 1px solid var(--line-2); }
.bbs-post .p-meta img { width: 26px; height: 26px; border-radius: 50%; }
.bbs-post .p-body { padding: 24px 0; font-size: 15px; line-height: 2; color: #3d3d3d; white-space: pre-wrap; word-break: break-word; }
.bbs-reply { margin-top: 20px; }
.reply-item { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px dashed var(--line-2); }
.reply-item img { width: 40px; height: 40px; border-radius: 50%; background: #eee; flex: none; }
.reply-head { font-size: 14px; color: var(--text-2); font-weight: 600; }
.reply-head .time { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 8px; }
.reply-text { font-size: 14px; color: #444; margin-top: 3px; line-height: 1.9; white-space: pre-wrap; }
.reply-children { margin-top: 10px; background: #fafbfc; border-radius: 6px; padding: 6px 16px; }
.reply-children .reply-item { border-bottom: 0; padding: 10px 0; }
.reply-children img { width: 30px; height: 30px; }

/* ------------------------------- 赛事 ------------------------------- */
.match-list { display: grid; gap: 16px; margin-top: 24px; }
.match-card { display: flex; gap: 22px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 20px; transition: .18s; }
.match-card:hover { box-shadow: var(--shadow); border-color: #d8ecff; }
.match-cover { width: 240px; height: 150px; border-radius: 6px; object-fit: cover; flex: none; background: linear-gradient(135deg, #059af0, #6a5cff); }
.match-body { flex: 1; min-width: 0; }
.match-title { font-size: 18px; font-weight: 700; }
.match-desc { color: var(--text-2); font-size: 13px; line-height: 1.9; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; }
.match-time { margin-top: 12px; font-size: 12px; color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; }

/* ------------------------------- 登录 ------------------------------- */
.auth-wrap { min-height: calc(100vh - 60px); display: grid; place-items: center; background: linear-gradient(160deg, #eef8ff, #f7fbff 55%, #eef3ff); padding: 50px 16px; }
.auth-box { width: 420px; max-width: 100%; background: #fff; border-radius: 10px; box-shadow: 0 18px 50px rgba(8, 60, 100, .12); overflow: hidden; }
.auth-head { padding: 28px 34px 0; }
.auth-head h1 { font-size: 22px; }
.auth-head p { color: var(--muted); font-size: 13px; margin: 8px 0 0; line-height: 1.8; }
.auth-tabs { display: flex; gap: 26px; padding: 20px 34px 0; border-bottom: 1px solid var(--line-2); }
.auth-tab { padding-bottom: 11px; font-size: 15px; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.auth-tab.selected { color: var(--main); border-color: var(--main); font-weight: 600; }
.auth-body { padding: 24px 34px 30px; }
.auth-body .layui-form-item { margin-bottom: 18px; }
.auth-body .layui-input { height: 44px; }
.auth-body .layui-btn-lg { height: 44px; }
.auth-foot { padding: 0 34px 26px; font-size: 13px; color: var(--muted); line-height: 1.9; }
.auth-foot b { color: var(--main); }
.form-error { background: #fff4f2; border: 1px solid #ffd9d1; color: #d84315; border-radius: 4px; padding: 10px 12px; font-size: 13px; margin-bottom: 16px; }
.form-ok { background: #f0fbf6; border: 1px solid #cdeede; color: #12805c; border-radius: 4px; padding: 10px 12px; font-size: 13px; margin-bottom: 16px; }

/* ------------------------------- 个人中心 ------------------------------- */
.user-layout { display: grid; grid-template-columns: 220px 1fr; gap: 22px; margin-top: 24px; align-items: start; }
.user-side { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; position: sticky; top: 20px; }
.user-profile { padding: 24px 20px; text-align: center; border-bottom: 1px solid var(--line-2); }
.user-profile img { width: 64px; height: 64px; border-radius: 50%; background: #eef3f8; }
.user-profile .un { font-size: 16px; font-weight: 600; margin-top: 10px; }
.user-profile .up { font-size: 12px; color: var(--muted); margin-top: 2px; }
.user-nav a { display: flex; align-items: center; gap: 10px; padding: 13px 20px; font-size: 14px; color: var(--text-2); border-left: 3px solid transparent; }
.user-nav a:hover { background: #f7fbff; color: var(--main); }
.user-nav a.active { background: var(--main-light); color: var(--main); border-left-color: var(--main); font-weight: 600; }
.user-nav .ic { width: 16px; height: 16px; }
.user-main { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.user-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.user-cols > * { min-width: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; }
.stat-card .sv { font-size: 26px; font-weight: 700; color: var(--main); line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-card .sl { font-size: 13px; color: var(--muted); margin-top: 4px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.card-head h2 { font-size: 16px; }
.card-body { padding: 20px; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line-2); font-size: 14px; }
.list-row:last-child { border-bottom: 0; }
.list-row .lr-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .lr-time { color: var(--muted); font-size: 12px; }

/* ------------------------------- 分页 ------------------------------- */
.pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 26px 0 10px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 34px; height: 34px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 3px; color: var(--text-2); font-size: 13px; background: #fff; }
.pager a:hover { border-color: var(--main); color: var(--main); }
.pager .active { background: var(--main); border-color: var(--main); color: #fff; }
.pager .dots { border: 0; background: transparent; }
.pager .total { border: 0; background: transparent; color: var(--muted); }

/* ------------------------------- 页脚 ------------------------------- */
#footer { margin-top: 60px; background: #212136; color: #fff; padding-top: 40px; }
.footer-main { display: flex; gap: 40px; padding-bottom: 28px; }
.footer-item { flex: 1; min-width: 0; }
.footer-item-header { font-size: 17px; font-weight: 600; margin-bottom: 18px; color: #fff; }
.footer-item-header a { color: #fff; }
.footer-item-body { color: #c9c9d4; font-size: 13px; line-height: 2; }
.footer-item-body a { color: #c9c9d4; display: block; margin-bottom: 4px; }
.footer-item-body a:hover { color: #fff; }
.footer-brand { font-size: 26px; letter-spacing: 4px; font-weight: 700; margin-top: 22px; color: #fff; opacity: .92; }
.footer-qr { display: flex; gap: 16px; align-items: flex-start; }
.footer-qr img { width: 110px; height: 110px; border-radius: 4px; background: #2b2b45; padding: 4px; }
.footer-qr .qr-tip { font-size: 12px; color: #9a9ab0; line-height: 1.9; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 16px 0 22px; font-size: 12px; color: #8b8ba3; }
.footer-bottom a { color: #8b8ba3; }
.footer-bottom a:hover { color: #fff; }

/* ------------------------------- 提示 / 弹层 ------------------------------- */
.alert { padding: 12px 16px; border-radius: 6px; font-size: 13px; line-height: 1.8; margin-bottom: 16px; }
.alert-info { background: #eef8ff; border: 1px solid #d3ecff; color: #1b6a94; }
.alert-warn { background: #fff8e6; border: 1px solid #ffe9b0; color: #9a6b00; }
.alert-danger { background: #fff2ef; border: 1px solid #ffd6cc; color: #c0392b; }
.alert-success { background: #effbf5; border: 1px solid #c9efdc; color: #0f7b52; }
.toast-wrap { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 9999; display: grid; gap: 8px; pointer-events: none; }
.toast { background: rgba(32, 32, 48, .92); color: #fff; padding: 10px 18px; border-radius: 6px; font-size: 13px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); animation: toastIn .2s ease-out; }
.toast.ok { background: #10a06a; }
.toast.err { background: #e0492f; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: none; align-items: center; justify-content: center; z-index: 200; padding: 20px; }
.modal.show { display: flex; }
.modal-box { background: #fff; border-radius: 8px; width: 560px; max-width: 100%; max-height: 90vh; overflow: auto; box-shadow: 0 24px 70px rgba(0, 0, 0, .25); }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; font-weight: 600; }
.modal-body { padding: 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 10px; }
.icon-btn { background: none; border: 0; cursor: pointer; color: var(--muted); padding: 4px; display: inline-grid; place-items: center; }
.icon-btn:hover { color: var(--text); }

/* ------------------------------- 响应式 ------------------------------- */
@media (max-width: 1100px) {
  .work-grid { grid-template-columns: repeat(3, 1fr); }
  .quick-entry { grid-template-columns: repeat(2, 1fr); }
  .q-detail { grid-template-columns: 1fr; }
  .sc-body { grid-template-columns: 1fr; }
  .sc-side { border-left: 0; border-top: 1px solid var(--line-2); }
  .bbs-layout { grid-template-columns: 1fr; }
  .bbs-side { position: static; }
  .user-layout { grid-template-columns: 1fr; }
  .user-side { position: static; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-main { flex-wrap: wrap; gap: 26px; }
  .footer-item { flex: 1 1 240px; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .mobile-toggle { display: block; }
  .top-header.menu-open .nav-links {
    display: flex; position: absolute; left: 0; right: 0; top: 60px; background: var(--main);
    flex-direction: column; align-items: stretch; height: auto; padding: 8px 0; z-index: 70; box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
  }
  .top-header.menu-open .nav-item { height: 44px; justify-content: space-between; }
  .top-header.menu-open .nav-drop { position: static; display: block; box-shadow: none; border-radius: 0; background: rgba(0, 0, 0, .12); }
  .top-header.menu-open .nav-drop a { color: #fff; }
  .work-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .quick-entry { grid-template-columns: 1fr; }
  .b-header-title { font-size: 17px; }
  .sc-header { padding: 16px; }
  .sc-title { font-size: 19px; }
  .player-box, .player-box iframe { height: 380px; min-height: 380px; }
  .match-card { flex-direction: column; }
  .match-cover { width: 100%; height: 160px; }
  .bbs-post { padding: 20px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-cols { grid-template-columns: 1fr; }
  .auth-body, .auth-head, .auth-foot, .auth-tabs { padding-left: 22px; padding-right: 22px; }
  .q-info img { display: none; }
  .q-table .col-video, .q-table .col-submit { display: none; }
  .pager a, .pager span { min-width: 30px; height: 30px; font-size: 12px; }
  .footer-main { flex-direction: column; }
}
