/*
 * SDS共创攻略站样式
 * 设计方向：深海军蓝信息界面承载高饱和火柴人美术，突出竞技感并保证攻略正文易读。
 */
:root {
  --bg: #09111f;
  --bg-soft: #0d1728;
  --panel: #14233a;
  --panel-light: #1b2d48;
  --line: rgba(170, 205, 239, .15);
  --text: #f4f8fc;
  --muted: #9eb0c4;
  --cyan: #21bee0;
  --cyan-dark: #1395b3;
  --yellow: #f6ca16;
  --orange: #ff7045;
  --green: #48c98b;
  --danger: #ff6b70;
  --shadow: 0 22px 65px rgba(0, 0, 0, .28);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 5% 0%, rgba(33, 190, 224, .16), transparent 28rem),
    radial-gradient(circle at 95% 32%, rgba(246, 202, 22, .09), transparent 25rem),
    var(--bg);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 76px;
  padding: 0 5vw;
  background: rgba(9, 17, 31, .88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 12px; width: max-content; }
.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #07121d;
  background: linear-gradient(135deg, var(--yellow), #ff8f3d);
  border-radius: 14px 14px 14px 4px;
  font-size: 22px;
  font-weight: 950;
  box-shadow: 0 8px 25px rgba(246, 202, 22, .25);
}
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-size: 16px; letter-spacing: .03em; }
.brand-copy small { color: var(--muted); font-size: 10px; }
.main-nav { display: flex; gap: 28px; color: var(--muted); font-size: 14px; font-weight: 750; }
.main-nav a:hover { color: var(--cyan); }
.nav-actions { display: flex; justify-content: flex-end; align-items: center; gap: 9px; }
.nav-user { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13px; }
.app-shell { width: min(1180px, 90vw); margin: 0 auto; padding: 34px 0 80px; }

.button {
  min-height: 43px;
  padding: 0 18px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-weight: 800;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.button:hover { transform: translateY(-2px); }
.button:disabled { cursor: wait; opacity: .55; transform: none; }
.button.primary { color: #07131d; background: var(--cyan); border-color: var(--cyan); box-shadow: 0 10px 26px rgba(33, 190, 224, .2); }
.button.primary:hover { background: #4bd3ed; }
.button.yellow { color: #151504; background: var(--yellow); border-color: var(--yellow); }
.button.ghost { background: rgba(255,255,255,.035); }
.button.small { min-height: 34px; padding: 0 12px; border-radius: 10px; font-size: 12px; }
.button.danger { color: var(--danger); }

.hero {
  position: relative;
  min-height: 470px;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: clamp(34px, 6vw, 74px);
  background-image:
    linear-gradient(90deg, rgba(4, 12, 24, .93) 0%, rgba(4, 12, 24, .68) 45%, rgba(4, 12, 24, .18) 76%),
    linear-gradient(0deg, rgba(7, 15, 27, .6), transparent 45%),
    url("assets/hero-duel.png");
  background-size: cover;
  background-position: center 48%;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.hero-content { position: relative; z-index: 2; width: min(590px, 100%); }
.eyebrow { margin: 0 0 10px; color: var(--cyan); font-size: 11px; font-weight: 950; letter-spacing: .18em; text-transform: uppercase; }
.hero h1 { margin: 0; font-size: clamp(42px, 6vw, 72px); line-height: 1.02; letter-spacing: -.045em; }
.hero h1 em { color: var(--yellow); font-style: normal; }
.hero-copy { margin: 20px 0 26px; color: #d2deea; font-size: 17px; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; }
.hero-stat-row { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 34px; color: var(--muted); font-size: 12px; }
.hero-stat-row strong { display: block; margin-bottom: 4px; color: var(--text); font-size: 22px; }

.category-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 22px 0 48px; }
.category-card {
  position: relative;
  min-height: 125px;
  overflow: hidden;
  padding: 18px;
  display: flex;
  align-items: flex-end;
  background-color: var(--panel);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line);
  border-radius: 17px;
  isolation: isolate;
  transition: transform .2s ease, border-color .2s ease;
}
.category-card::before { position: absolute; inset: 0; z-index: -1; content: ""; background: linear-gradient(0deg, rgba(4,10,20,.94), rgba(4,10,20,.25)); }
.category-card:hover, .category-card.active { transform: translateY(-4px); border-color: var(--cyan); }
.category-card strong { font-size: 16px; }
.category-card small { display: block; margin-top: 4px; color: #c0d0df; }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 22px; }
.section-head h2, .page-title { margin: 0; font-size: clamp(28px, 4vw, 43px); letter-spacing: -.03em; }
.section-copy { margin: 8px 0 0; color: var(--muted); line-height: 1.6; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search-box { min-width: min(330px, 75vw); }
.text-input, .text-area {
  width: 100%;
  padding: 13px 15px;
  color: var(--text);
  background: #0e1a2d;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
}
.text-input:focus, .text-area:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(33,190,224,.1); }
.text-input::placeholder, .text-area::placeholder { color: #74869b; }
select.text-input { appearance: auto; }

.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.post-card { overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 30px rgba(0,0,0,.13); transition: transform .2s ease, border-color .2s ease; }
.post-card:hover { transform: translateY(-5px); border-color: rgba(33,190,224,.55); }
.post-cover { position: relative; aspect-ratio: 16/9; overflow: hidden; background: #0c1829; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.post-card:hover .post-cover img { transform: scale(1.045); }
.cover-badges { position: absolute; left: 13px; top: 13px; display: flex; gap: 7px; }
.badge { padding: 5px 9px; color: #07121d; background: var(--cyan); border-radius: 999px; font-size: 10px; font-weight: 900; }
.badge.difficulty { background: var(--yellow); }
.post-body { padding: 20px; }
.post-body h3 { margin: 11px 0 10px; font-size: 21px; line-height: 1.35; }
.post-body p { display: -webkit-box; overflow: hidden; margin: 0; min-height: 50px; color: var(--muted); line-height: 1.65; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.post-meta, .post-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; }
.post-foot { margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.tag-chip { padding: 5px 9px; color: #cceaf2; background: rgba(33,190,224,.1); border: 1px solid rgba(33,190,224,.2); border-radius: 999px; font-size: 10px; }
.version-chip { color: #332a00; background: rgba(246,202,22,.88); border-color: rgba(246,202,22,.95); }
.draft-notice { margin: 10px 0 0; color: var(--green); font-size: 11px; }
.author { color: var(--text); font-weight: 800; }
.metrics { display: flex; gap: 12px; }
.arrow-link { color: var(--cyan); font-weight: 850; }

.empty-state { padding: 60px 24px; text-align: center; background: var(--panel); border: 1px dashed rgba(158,176,196,.3); border-radius: var(--radius); }
.empty-state h3 { margin: 0 0 8px; font-size: 25px; }
.empty-state p { color: var(--muted); line-height: 1.7; }

.detail-shell { max-width: 900px; margin: 10px auto; }
.back-link { display: inline-block; margin-bottom: 20px; color: var(--cyan); font-weight: 800; }
.article-hero { position: relative; min-height: 360px; overflow: hidden; display: flex; align-items: flex-end; padding: clamp(28px, 6vw, 58px); background-size: cover; background-position: center; border-radius: 26px 26px 0 0; }
.article-hero::before { position: absolute; inset: 0; content: ""; background: linear-gradient(0deg, rgba(5,12,23,.98), rgba(5,12,23,.15)); }
.article-heading { position: relative; z-index: 1; padding-top: 42px; }
/* 标签固定在标题上方，预留独立空间，避免覆盖大字号标题。 */
.article-heading .cover-badges { top: 0; left: 0; }
.article-heading h1 { max-width: 740px; margin: 0 0 16px; font-size: clamp(34px, 6vw, 57px); line-height: 1.1; letter-spacing: -.035em; }
.article-card { padding: clamp(28px, 6vw, 58px); background: #f6f8fb; color: #1a2837; border-radius: 0 0 26px 26px; box-shadow: var(--shadow); }
.article-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 34px; }
.article-card .button.ghost { color: #172638; border-color: rgba(23,38,56,.18); }
.article-card .button.danger { color: #b83f4a; }
.article-content { font-family: Georgia, "Songti SC", serif; font-size: 18px; line-height: 2; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-section { margin-top: 34px; padding-top: 28px; border-top: 1px solid rgba(23,38,56,.14); }
.comment-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.comment-list { display: grid; gap: 12px; margin-top: 18px; }
.comment-item { padding: 17px; background: #eaf0f6; border-radius: 13px; }
.comment-item p { margin: 8px 0 0; line-height: 1.7; white-space: pre-wrap; }
.comment-meta { display: flex; justify-content: space-between; color: #637386; font-size: 11px; }

.dashboard-head { display: flex; align-items: center; justify-content: space-between; gap: 25px; margin-bottom: 30px; }
.profile-panel { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; margin-bottom: 25px; padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; }
.avatar { display: grid; width: 58px; height: 58px; place-items: center; color: #101505; background: var(--yellow); border-radius: 18px; font-size: 25px; font-weight: 950; }
.manage-list { display: grid; gap: 13px; }
.manage-item { display: grid; grid-template-columns: 150px 1fr auto; gap: 18px; align-items: center; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 17px; }
.manage-thumb { width: 150px; aspect-ratio: 16/9; object-fit: cover; border-radius: 11px; }
.manage-item h3 { margin: 0 0 8px; font-size: 19px; }
.manage-item p { margin: 0; color: var(--muted); font-size: 12px; }
.manage-actions { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.rank-list { display: grid; gap: 14px; }
.rank-item { display: grid; grid-template-columns: 54px 130px 1fr auto; gap: 16px; align-items: center; padding: 13px; background: var(--panel); border: 1px solid var(--line); border-radius: 17px; }
.rank-number { color: var(--yellow); font-size: 27px; font-weight: 950; text-align: center; }
.rank-thumb { width: 130px; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; }

.dialog-card { width: min(700px, calc(100vw - 24px)); max-height: 92vh; padding: 0; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 32px 100px rgba(0,0,0,.48); }
.dialog-card::backdrop { background: rgba(2,8,17,.78); backdrop-filter: blur(5px); }
.dialog-card form { padding: 27px; }
.dialog-head { display: flex; align-items: start; justify-content: space-between; margin-bottom: 20px; }
.dialog-head h2 { margin: 0; font-size: 29px; }
.icon-button { width: 38px; height: 38px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 50%; font-size: 23px; }
.field-label { display: block; margin: 15px 0 7px; font-size: 12px; font-weight: 850; }
.text-area { min-height: 230px; resize: vertical; line-height: 1.7; }
.text-area.compact { min-height: 130px; }
.form-grid.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.editor-meta { display: flex; justify-content: space-between; margin-top: 7px; color: var(--muted); font-size: 11px; }
.cover-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.cover-choice { position: relative; aspect-ratio: 16/9; overflow: hidden; padding: 0; background: #0c1829; border: 2px solid transparent; border-radius: 10px; }
.cover-choice img { width: 100%; height: 100%; object-fit: cover; }
.cover-choice.selected { border-color: var(--yellow); box-shadow: 0 0 0 2px rgba(246,202,22,.2); }
/* 封面名称只保留给读屏工具，视觉上仅显示干净的缩略图。 */
.cover-choice span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 23px; }
.form-hint { color: var(--muted); font-size: 12px; }
.text-button { padding: 0; color: var(--cyan); background: transparent; border: 0; font-weight: 850; }
.auth-dialog, .comment-dialog { width: min(450px, calc(100vw - 24px)); }
.auth-status { padding: 11px; color: #dbeaf5; background: rgba(33,190,224,.12); border: 1px solid rgba(33,190,224,.3); border-radius: 10px; font-size: 12px; line-height: 1.6; }

.toast { position: fixed; right: 22px; bottom: 22px; z-index: 40; max-width: min(390px, calc(100vw - 36px)); padding: 13px 17px; color: #07121d; background: var(--yellow); border-radius: 11px; box-shadow: var(--shadow); font-weight: 800; opacity: 0; transform: translateY(18px); pointer-events: none; transition: .25s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 940px) {
  .site-header { grid-template-columns: 1fr auto; }
  .main-nav { display: none; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 680px) {
  .site-header { padding: 0 4vw; }
  .brand-copy small, .nav-user { display: none; }
  .brand-copy strong { font-size: 13px; }
  .nav-actions .button.ghost:not(:last-child) { display: none; }
  .app-shell { width: 92vw; padding-top: 22px; }
  .hero { min-height: 500px; align-items: flex-end; padding: 28px; background-position: 38% center; }
  .hero h1 { font-size: 42px; }
  .hero-stat-row { gap: 16px; }
  .category-strip { display: flex; overflow-x: auto; padding-bottom: 7px; }
  .category-card { min-width: 165px; }
  .section-head, .dashboard-head { align-items: flex-start; flex-direction: column; }
  .post-grid { grid-template-columns: 1fr; }
  .toolbar, .search-box { width: 100%; }
  .manage-item { grid-template-columns: 95px 1fr; }
  .manage-thumb { width: 95px; }
  .manage-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .rank-item { grid-template-columns: 40px 90px 1fr; }
  .rank-thumb { width: 90px; }
  .rank-item > :last-child { grid-column: 2 / -1; }
  .profile-panel { grid-template-columns: auto 1fr; }
  .profile-panel > :last-child { grid-column: 1 / -1; }
  .form-grid.two-columns { grid-template-columns: 1fr; }
  .cover-picker { grid-template-columns: repeat(2, 1fr); }
  .article-hero { min-height: 320px; }
}

/* 第三阶段：公告、结构化攻略、等级与管理后台。 */
.announcement{margin-bottom:22px;padding:18px 22px;background:linear-gradient(135deg,rgba(246,202,22,.16),rgba(33,190,224,.1));border:1px solid rgba(246,202,22,.35);border-radius:16px}.announcement h3{margin:0 0 7px}.structured-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:28px 0}.structured-block{padding:20px;background:#eaf0f6;border-radius:14px}.structured-block h3{margin:0 0 9px;color:#137c98}.admin-grid{display:grid;gap:14px}.admin-card{padding:18px;background:var(--panel);border:1px solid var(--line);border-radius:16px}.admin-card textarea{min-height:90px}.featured-mark{color:var(--yellow);font-weight:900}.level-chip{padding:6px 10px;background:rgba(72,201,139,.15);border-radius:999px;color:var(--green)}@media(max-width:680px){.structured-grid{grid-template-columns:1fr}}
