/* hiw3c.com AI Daily — dark tech theme */
:root {
  --bg: #07090d;
  --bg2: #0d1117;
  --panel: #10151d;
  --panel2: #151c26;
  --line: #1f2937;
  --txt: #e6edf3;
  --dim: #8b98a9;
  --faint: #566173;
  --cyan: #22d3ee;
  --violet: #a78bfa;
  --accent: linear-gradient(90deg, #22d3ee, #a78bfa);
  --radius: 14px;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  --sans: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--txt);
  font-family: var(--sans); line-height: 1.6;
  background-image: radial-gradient(1100px 420px at 15% -10%, #10233a55, transparent 60%),
                    radial-gradient(900px 380px at 95% -5%, #241b4455, transparent 55%);
  background-attachment: fixed;
}
a { color: inherit; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 18px; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: #07090de6; backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 54px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-icon { width: 30px; height: 30px; color: var(--txt); flex: none; }
.brand-word { height: 19px; width: auto; color: var(--txt); flex: none; }
.brand-tag {
  display: grid; line-height: 1.3; margin-left: 1px;
  border-left: 1px solid var(--line); padding-left: 11px;
}
.brand-tag b { font-size: 12.5px; font-weight: 700; letter-spacing: 1.5px; color: var(--txt); }
.brand-tag i {
  font-style: normal; font-family: var(--mono); font-size: 9.5px;
  letter-spacing: 2px; color: var(--faint);
}
.btn-ghost {
  border: 1px solid var(--line); color: var(--dim); font-size: 13px;
  padding: 5px 12px; border-radius: 999px; text-decoration: none; transition: .18s;
}
.btn-ghost:hover { color: var(--cyan); border-color: var(--cyan); }

/* ---------- hero ---------- */
.hero { padding: 46px 0 10px; }
.hero h1 { font-size: 30px; line-height: 1.3; margin: 0 0 12px; letter-spacing: .2px; }
.hero .hi {
  display: block; font-size: 14px; letter-spacing: 1.5px; font-weight: 600;
  background: var(--accent); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; text-transform: uppercase; margin-bottom: 10px;
}
.hero .sub { color: var(--dim); margin: 0; font-size: 15px; }

/* ---------- 布局：左侧栏 + 主内容 ---------- */
.layout {
  display: grid; grid-template-columns: 248px minmax(0, 1fr);
  gap: 26px; margin-top: 26px; align-items: start;
}
.side {
  position: sticky; top: 70px;
  display: grid; gap: 14px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 14px;
}
.side-date { display: flex; align-items: center; gap: 8px; }
.sd-cur { flex: 1; min-width: 0; display: grid; line-height: 1.35; }
.sd-cur strong { font-size: 16.5px; font-family: var(--mono); }
.sd-cur span { color: var(--dim); font-size: 11.5px; }
.arrow {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  text-decoration: none; border: 1px solid var(--line); color: var(--txt); font-size: 17px;
  flex: none; transition: .15s;
}
.arrow:hover { border-color: var(--cyan); color: var(--cyan); }
.arrow.is-off { opacity: .28; pointer-events: none; }
.date-pick {
  background: var(--bg2); color: var(--txt); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 8px; font-size: 12.5px; font-family: var(--mono);
  color-scheme: dark; width: 100%;
}

/* ---------- 日历 ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-title { font-size: 13px; font-weight: 700; letter-spacing: .5px; }
.cal-nav {
  width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--dim); text-decoration: none; font-size: 14px; transition: .15s;
}
.cal-nav:hover { border-color: var(--cyan); color: var(--cyan); }
.cal-nav.is-off { opacity: .25; pointer-events: none; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.cal-dow { font-size: 10.5px; color: var(--faint); padding-bottom: 2px; }
.cal-day {
  font-size: 11.5px; font-family: var(--mono); line-height: 1;
  padding: 6px 0; border-radius: 7px; color: #3d4a5d;
}
.cal-day.blank { visibility: hidden; }
.cal-day.has {
  color: var(--txt); background: var(--bg2); border: 1px solid var(--line);
  text-decoration: none; transition: .15s;
}
.cal-day.has:hover { border-color: var(--cyan); color: var(--cyan); }
.cal-day.has.on {
  background: var(--accent); color: #05070a; font-weight: 700; border-color: transparent;
}

/* ---------- 近期归档 chips（侧栏内） ---------- */
.side-hist { display: flex; flex-wrap: wrap; gap: 6px; }
.side-label { width: 100%; color: var(--faint); font-size: 11.5px; letter-spacing: 1px; }
.hchip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px; font-size: 12px;
  font-family: var(--mono); color: var(--dim); background: var(--bg2);
  border: 1px solid var(--line); text-decoration: none; transition: .15s;
}
.hchip i { font-style: normal; color: var(--faint); font-size: 10.5px; }
.hchip:hover { border-color: var(--cyan); color: var(--cyan); }
.hchip.on { background: var(--accent); color: #05070a; border-color: transparent; font-weight: 700; }
.hchip.on i { color: #05070a99; }

/* ---------- filters ---------- */
/* sticky 吸顶: 顶栏 54px+1px 边线, 故 top=55px; 半透明底+模糊避免滚动时文字透底 */
.filters {
  position: sticky; top: 55px; z-index: 40;
  display: grid; gap: 8px; margin: 14px 0 6px;
  padding: 10px 12px 8px;
  background: #0a0e13f2;
  backdrop-filter: blur(8px);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 10px 24px -12px #000000cc;
}
.frow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.flabel { color: var(--faint); font-size: 12px; width: 34px; flex: none; }
.chip {
  padding: 4px 12px; border-radius: 999px; font-size: 13px; text-decoration: none;
  color: var(--dim); background: var(--panel); border: 1px solid var(--line); transition: .15s;
}
.chip:hover { color: var(--cyan); border-color: var(--cyan); }
.chip.on { color: #05070a; background: var(--accent); border-color: transparent; font-weight: 600; }
.fcount { margin-left: auto; color: var(--faint); font-size: 12px; }

/* ---------- timeline ---------- */
.tl { list-style: none; margin: 18px 0 0; padding: 0; }
.tl-item { display: flex; gap: 0; }
.rail { display: flex; flex-direction: column; align-items: center; width: 18px; flex: none; }
.rail .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 22px; box-shadow: 0 0 8px 0 rgba(130, 180, 255, .45); }
.rail .line { flex: 1; width: 2px; margin: 6px 0 2px; }
.card {
  flex: 1; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 13px 16px 12px; margin: 0 0 14px 6px;
  transition: border-color .18s, transform .18s;
}
.card:hover { border-color: #2d3d54; transform: translateY(-1px); }
.card-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-meta time { color: var(--faint); font-family: var(--mono); font-size: 12px; }
.src { font-size: 12.5px; font-weight: 600; }
.grp {
  color: var(--faint); font-size: 11.5px; border: 1px solid var(--line);
  padding: 0 7px; border-radius: 999px;
}
.lang-zh {
  color: #05070a; background: #34d399; border-radius: 5px; font-size: 10.5px;
  padding: 0 5px; line-height: 1.5; font-weight: 700;
}
.card-title { font-size: 16px; margin: 7px 0 0; font-weight: 600; line-height: 1.5; }
.card-title a { text-decoration: none; color: var(--txt); }
.card-title a:hover { color: var(--cyan); }
.card-summary {
  color: var(--dim); font-size: 13px; margin: 5px 0 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.has-full {
  color: var(--cyan); font-size: 10.5px; border: 1px solid #22d3ee55;
  padding: 0 6px; border-radius: 999px; line-height: 1.5;
}
.card-links { display: flex; gap: 10px; margin-top: 8px; }
.cl-read, .cl-src { font-size: 12px; text-decoration: none; padding: 2px 10px; border-radius: 999px; }
.cl-read { color: var(--cyan); background: #22d3ee14; border: 1px solid #22d3ee44; }
.cl-read:hover { background: #22d3ee26; }
.cl-src { color: var(--faint); border: 1px solid transparent; }
.cl-src:hover { color: var(--dim); border-color: var(--line); }

/* ---------- article 内容页 ---------- */
.art-wrap { max-width: 860px; }
/* 内容页带左侧栏：文章列限宽保证阅读体验 */
.art-layout .art { max-width: 880px; }
.art {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px 34px 34px;
}
.crumb { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--faint); margin-bottom: 14px; }
.crumb a { color: var(--dim); text-decoration: none; font-family: var(--mono); }
.crumb a:hover { color: var(--cyan); }
.art-title { font-size: 25px; line-height: 1.4; margin: 0 0 12px; font-weight: 700; letter-spacing: .2px; }
.art-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12.5px; }
.art-meta time { color: var(--faint); font-family: var(--mono); }
.art-host { color: var(--faint); font-family: var(--mono); font-size: 11.5px; }
.art-flag {
  color: var(--cyan); font-size: 10.5px; border: 1px solid #22d3ee55;
  padding: 0 7px; border-radius: 999px; line-height: 1.5;
}
.art-foot {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin: 16px 0 0; padding-bottom: 18px; border-bottom: 1px solid var(--line);
}
.art-actions { margin: 0; }
.btn-src {
  display: inline-flex; align-items: center; gap: 6px;
  color: #05070a; background: var(--accent); font-size: 13.5px; font-weight: 700;
  padding: 8px 18px; border-radius: 999px; text-decoration: none; transition: .18s;
}
.btn-src:hover { filter: brightness(1.12); transform: translateY(-1px); }
.art-content { margin-top: 20px; font-size: 15.5px; line-height: 1.85; color: #cdd7e1; word-break: break-word; }
.art-content p { margin: 0 0 1.1em; }
.art-content h1, .art-content h2, .art-content h3,
.art-content h4, .art-content h5, .art-content h6 {
  color: var(--txt); font-size: 18px; margin: 1.6em 0 .6em; line-height: 1.45;
}
.art-content a { color: var(--cyan); }
.art-content img { max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); }
.art-content blockquote {
  margin: 1.2em 0; padding: 10px 16px; border-left: 3px solid var(--cyan);
  background: var(--bg2); border-radius: 0 10px 10px 0; color: var(--dim);
}
.art-content pre {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; overflow-x: auto; font-family: var(--mono); font-size: 13px; line-height: 1.6;
}
.art-content code { font-family: var(--mono); font-size: .9em; color: var(--cyan); }
.art-content pre code { color: inherit; }
.art-content ul, .art-content ol { margin: 0 0 1.1em; padding-left: 1.6em; }
.art-content li { margin-bottom: .35em; }
.art-content table { border-collapse: collapse; margin: 1.2em 0; width: 100%; font-size: 14px; }
.art-content th, .art-content td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.art-content th { background: var(--bg2); }
.art-content hr { border: none; border-top: 1px solid var(--line); margin: 2em 0; }
.art-note {
  margin-top: 26px; padding: 12px 16px; border: 1px dashed var(--line);
  border-radius: 10px; color: var(--faint); font-size: 12.5px;
}
.art-note a { color: var(--dim); }
.art-note a:hover { color: var(--cyan); }
.art-fallback .dim-line { color: var(--faint); font-size: 13.5px; }

/* ---------- 双语正文 / 翻译 ---------- */
.art-title-orig {
  color: var(--faint); font-size: 12.5px; margin: -6px 0 12px; font-family: var(--mono);
  word-break: break-word;
}
.art-tools {
  display: flex; flex-direction: column; align-items: flex-start; gap: 7px;
}
.lt-row { display: flex; gap: 8px; flex-wrap: wrap; }
.lt-btn {
  appearance: none; cursor: pointer; border: 1px solid var(--line); background: var(--bg2);
  color: var(--dim); font-size: 12.5px; padding: 5px 14px; border-radius: 999px; transition: .18s;
}
.lt-btn:hover { border-color: var(--accent); color: var(--accent); }
.lt-btn.is-on { background: var(--accent); border-color: var(--accent); color: #05070a; font-weight: 700; }
.lt-btn.act { background: #22d3ee1a; border-color: #22d3ee88; color: var(--cyan); font-weight: 700; }
.lt-btn.act:hover { background: #22d3ee33; }
.lt-btn:disabled { opacity: .6; cursor: wait; }
.mt-tip { color: var(--faint); font-size: 12px; }
.art-zh p { margin: 0 0 1.1em; }
.mt-note {
  font-size: 12px; color: var(--faint); border-left: 3px solid var(--line);
  padding: 2px 0 2px 12px; margin-bottom: 1.4em;
}
.art-missing { text-align: center; padding: 60px 0 30px; color: var(--dim); }
.art-missing h1 { font-size: 22px; color: var(--txt); }
.art-missing .btn-src { margin-top: 16px; }

/* ---------- empty / footer ---------- */
.empty {
  background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 34px 20px; text-align: center; color: var(--dim); margin-top: 26px;
}
.empty code { color: var(--cyan); font-family: var(--mono); font-size: 12.5px; }
.foot {
  margin-top: 46px; border-top: 1px solid var(--line); padding: 22px 0 34px;
  color: var(--faint); font-size: 12.5px; text-align: center;
}
.foot p { margin: 3px 0; }
.foot .dim { font-size: 12px; }
.foot a { color: var(--dim); text-decoration: none; }
.foot a:hover { color: var(--cyan); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 18px; }
  .side { position: static; }
  .cal-grid { gap: 2px; }
}
@media (max-width: 640px) {
  .hero { padding-top: 30px; }
  .hero h1 { font-size: 23px; }
  .card-title { font-size: 15px; }
  .top-actions .btn-ghost { display: none; }
  .top-actions { margin-left: 14px; gap: 10px; }
  .topbar-in > .top-nav { margin-left: 14px; }
  .brand-tag { display: none; }
  .art { padding: 22px 18px 24px; }
  .art-title { font-size: 20px; }
  .art-content { font-size: 15px; }
}

/* ---------- topbar 站内导航 ---------- */
/* top-actions 占满品牌右侧剩余空间：导航靠左、btn-ghost 贴右边缘，两端对齐 */
.top-actions {
  flex: 1; display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-left: 28px; min-width: 0;
}
.top-nav { display: flex; align-items: center; gap: 4px; }
/* models.php 等页面导航直接作为 topbar-in 子元素时，同样靠左对齐 */
.topbar-in > .top-nav { margin-left: 28px; margin-right: auto; }
.top-nav-link {
  color: var(--dim); font-size: 13.5px; font-weight: 600;
  padding: 6px 13px; border-radius: 999px; border: 1px solid transparent;
  text-decoration: none; transition: .18s; white-space: nowrap;
}
.top-nav-link:hover { color: var(--cyan); }
.top-nav-link.is-cur {
  color: var(--txt); border-color: var(--line); background: var(--panel);
}

/* ---------- 大模型排行页 ---------- */
.lb-meta { font-size: 12.5px; color: var(--faint); margin: 14px 0 0; }
.lb-meta a { color: var(--dim); }
.lb-meta a:hover { color: var(--cyan); }

/* ---------- 分类 chips（models.php，参考 OpenRouter 分类条） ---------- */
.m-cats {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  margin-top: 18px; border-bottom: 1px solid var(--line); overflow-x: auto;
}
.m-cat {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 12px; font-size: 13px; color: var(--dim); text-decoration: none;
  border-bottom: 2px solid transparent; white-space: nowrap; flex: none;
}
.m-cat span { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.m-cat:hover { color: var(--txt); }
.m-cat.is-cur {
  color: var(--cyan); font-weight: 600; border-bottom-color: var(--cyan);
}
.m-cat.is-cur span { color: var(--cyan); opacity: .75; }

.lb-card {
  margin-top: 22px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel);
}
/* separate 而非 collapse：保证 sticky 表头的 border-bottom 滚动时仍然绘制 */
.lb-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 720px; }
.lb-table thead th {
  position: sticky; top: 54px; z-index: 5; background: var(--panel2);
  font-size: 12px; letter-spacing: .8px; color: var(--dim); font-weight: 600;
  text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.lb-table thead th .col-sub { display: block; font-size: 10.5px; color: var(--faint); font-weight: 400; }
.lb-table tbody td { padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; vertical-align: middle; }
.lb-table tbody tr:last-child td { border-bottom: none; }
.lb-table tbody tr:hover td { background: #ffffff06; }
.lb-table .col-rank { width: 52px; color: var(--faint); font-family: var(--mono); font-size: 12.5px; }
.lb-table .col-model { min-width: 260px; }
.m-name { display: block; font-weight: 600; color: var(--txt); }
.m-key { display: block; font-family: var(--mono); font-size: 11px; color: var(--faint); }
.col-vendor { color: var(--dim); white-space: nowrap; }
.col-date { color: var(--dim); font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
.col-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lb-table thead th.col-num { text-align: right; }
.p-free { color: #34d399; font-weight: 600; }
.p-pending { color: var(--faint); font-size: 12.5px; }

.pager {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 20px 0 0; flex-wrap: wrap;
}
.pg {
  min-width: 34px; text-align: center; padding: 6px 9px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--dim); font-size: 13px;
  text-decoration: none; font-variant-numeric: tabular-nums; transition: .18s;
}
a.pg:hover { color: var(--cyan); border-color: var(--cyan); }
.pg.is-cur { color: var(--bg); background: var(--cyan); border-color: var(--cyan); font-weight: 700; }
.pager-dots { color: var(--faint); padding: 0 2px; }
.lb-note { font-size: 12px; color: var(--faint); margin: 18px 0 40px; }

@media (max-width: 640px) {
  .top-nav-link { padding: 5px 10px; font-size: 12.5px; }
  /* 小屏表格横向滚动放回容器，表头不做粘性 */
  .lb-card { overflow-x: auto; }
  .lb-table thead th { position: static; }
}

/* ---------- 厂商 LOGO（models.php 厂商列） ---------- */
.col-vendor { white-space: nowrap; }
.v-ava {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; margin-right: 7px; vertical-align: -5px;
  border-radius: 5px; background: #ffffff0a; overflow: hidden; flex: none;
}
.v-ava img {
  position: absolute; inset: 0; margin: auto; width: 100%; height: 100%;
  object-fit: contain; object-position: center center; z-index: 1;
}
.v-ava img.is-gone { display: none; }
.v-ava i {
  display: block; width: 100%; text-align: center;
  font-style: normal; font-size: 11px; font-weight: 700; color: var(--faint);
  font-family: var(--mono); line-height: 1;
}
.v-name { color: var(--dim); vertical-align: bottom; }
