:root {
  color-scheme: dark;
  --bg: #0b0f17;
  --surface: #121826;
  --surface-soft: #1a2434;
  --text: #e6edf5;
  --muted: #8b9aa8;
  --line: #243146;
  --primary: #22c55e;
  --primary-dark: #15803d;
  --primary-light: #86efac;
  --primary-soft: rgba(34, 197, 94, 0.14);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.16);
  --blue: #60a5fa;
  --blue-soft: rgba(96, 165, 250, 0.16);
  --red: #f87171;
  --red-soft: rgba(248, 113, 113, 0.16);
  --radius: 8px;
  --shadow: 0 20px 52px rgba(0, 0, 0, 0.26);
  --header-height: 66px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 15, 23, 0.90);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: var(--header-height);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-weight: 750;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(34, 197, 94, 0.32);
  border-radius: 11px;
  background: var(--primary-soft);
  color: var(--primary-light);
}

.brand-mark svg,
.security-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-copy {
  display: grid;
  min-width: 0;
}

.brand-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
}

.brand-copy small {
  color: var(--muted);
  font-size: 11px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-wrap: nowrap;
}

.main-nav a {
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 14px;
  white-space: nowrap;
}

.main-nav a:hover {
  color: var(--text);
  background: var(--surface-soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-cta {
  white-space: nowrap;
}

.language-switcher {
  position: relative;
}

.language-button {
  min-height: 42px;
  min-width: 156px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font-weight: 650;
}

.language-button:hover {
  border-color: #3b5068;
  background: var(--surface-soft);
}

.globe-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.language-current {
  flex: 1;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chevron {
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
}

.language-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  width: min(320px, calc(100vw - 32px));
  max-height: min(420px, calc(100vh - 120px));
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s ease;
}

.language-switcher.open .language-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.language-option {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.language-option:hover,
.language-option[aria-selected="true"] {
  background: var(--primary-soft);
  color: var(--primary-light);
}

.language-option-code {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.language-option[aria-selected="true"] .language-option-code {
  color: var(--primary);
}

.language-select {
  flex: none;
  width: auto;
  min-width: 132px;
  padding: 9px 32px 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
}

.section-frame,
.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.page-shell {
  padding: 46px 0 72px;
}

.hero {
  min-height: 540px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding-top: 82px;
  padding-bottom: 82px;
  text-align: center;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 720;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.25;
}

.hero-subtitle {
  max-width: 650px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions,
.detail-actions,
.submit-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 700;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--primary);
  color: #fff;
}

.button-primary:hover {
  background: var(--primary-dark);
}

.button-secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.button-secondary:hover {
  border-color: #3b5068;
  background: var(--surface-soft);
}

.button-small {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.button.is-copied {
  border-color: var(--primary);
  color: var(--primary-light);
}

.icon {
  font-size: 17px;
  line-height: 1;
}

.hero-visual {
  position: relative;
  min-height: 390px;
}

.preview-card {
  position: absolute;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.preview-card-back {
  width: 74%;
  height: 310px;
  left: 4%;
  top: 28px;
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.28), rgba(21, 128, 61, 0.18)),
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(255, 255, 255, 0.04) 14px 28px);
  transform: rotate(-6deg);
}

.preview-card-front {
  width: 78%;
  height: 330px;
  right: 0;
  bottom: 0;
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid var(--line);
}

.preview-card-front::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 20%, rgba(34, 197, 94, 0.16), transparent 28%),
    linear-gradient(140deg, #152136, #101a2a);
}

.preview-badge,
.preview-title,
.preview-meta,
.preview-tags {
  position: relative;
  z-index: 1;
}

.preview-badge {
  align-self: flex-start;
  margin-bottom: auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-light);
  font-size: 12px;
  font-weight: 750;
}

.preview-title {
  margin-bottom: 8px;
  font-size: 30px;
  font-weight: 750;
}

.preview-meta {
  margin-bottom: 20px;
  color: var(--muted);
}

.preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preview-tags span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(11, 15, 23, 0.70);
  color: var(--muted);
  font-size: 12px;
}

.security-section {
  padding: 34px;
  margin-top: -28px;
  margin-bottom: 64px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.security-heading {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.security-icon {
  display: grid;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(34, 197, 94, 0.24);
  border-radius: 11px;
  background: var(--primary-soft);
  color: var(--primary-light);
}

.security-heading h2 {
  margin-bottom: 6px;
  font-size: clamp(24px, 4vw, 36px);
}

.security-heading p {
  margin-bottom: 0;
  color: var(--muted);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 28px;
}

.section-heading > div {
  min-width: 0;
}

.section-note {
  max-width: 460px;
  margin-bottom: 4px;
  color: var(--muted);
}

.security-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  outline: none;
}

input,
select {
  min-height: 46px;
  padding: 0 12px;
}

textarea {
  padding: 12px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.form-message {
  min-height: 24px;
  margin-top: 12px;
  color: var(--primary-light);
  font-size: 14px;
}

.inline-result {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.inline-result p {
  margin: 0;
  color: var(--muted);
}

.list-section {
  padding: 64px 0 84px;
}

.list-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.list-heading > div {
  min-width: 0;
}

.result-count {
  color: var(--muted);
  white-space: nowrap;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.search-box {
  position: relative;
  display: block;
  flex: 0 0 min(320px, 38vw);
}

.sort-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.sort-tab {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.sort-tab:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.sort-tab.active {
  border-color: rgba(34, 197, 94, 0.28);
  background: var(--primary-soft);
  color: var(--primary-light);
}

.control-select {
  min-width: 180px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.tag-chip {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tag-chip:hover,
.tag-chip.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-light);
}

.masonry {
  columns: 3 300px;
  column-gap: 18px;
}

.project-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 18px;
  break-inside: avoid;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.project-cover,
.detail-cover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  background-position: center;
  background-size: cover;
}

.project-cover-default,
.detail-cover-default {
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.22), rgba(21, 128, 61, 0.14)),
    repeating-linear-gradient(45deg, transparent 0 16px, rgba(255, 255, 255, 0.04) 16px 32px);
}

.cover-fallback {
  color: rgba(255, 255, 255, 0.86);
  font-size: 34px;
  font-weight: 800;
}

.recommend-flag {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 12px;
  font-weight: 750;
}

.project-cover .recommend-flag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(11, 15, 23, 0.82);
}

.project-body {
  padding: 18px;
}

.project-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-title-row h3 {
  min-width: 0;
}

.project-title-row a:hover {
  color: var(--primary);
}

.star-rating {
  color: var(--amber);
  font-size: 14px;
  white-space: nowrap;
}

.star-rating.large {
  font-size: 22px;
}

.project-intro {
  min-height: 66px;
  margin-bottom: 16px;
  color: var(--muted);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 18px;
}

.project-tags button {
  padding: 5px 8px;
  border: 0;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.risk {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}

.risk-safe {
  background: var(--primary-soft);
  color: var(--primary-light);
}

.risk-low {
  background: var(--blue-soft);
  color: var(--blue);
}

.risk-medium,
.risk-mid {
  background: var(--amber-soft);
  color: var(--amber);
}

.risk-high {
  background: var(--red-soft);
  color: var(--red);
}

.risk-unknown {
  background: var(--surface-soft);
  color: var(--muted);
}

.project-cover {
  cursor: pointer;
}

.project-tags button:hover {
  background: var(--primary-soft);
  color: var(--primary-light);
}

/* 首页弹窗公告：内容多语由服务端渲染，关闭状态前端用 localStorage 记版本号 */
/* 弹窗：结构与演示一致——遮罩 + 卡片（头部标题/关闭 + 可滚动正文 + 底部动作） */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 7, 12, 0.8);
  backdrop-filter: blur(6px);
}

.modal-backdrop[hidden] {
  display: none;
}

body.modal-open {
  overflow: hidden;
}

.modal-dialog {
  display: flex;
  flex-direction: column;
  width: min(880px, 100%);
  max-height: calc(100vh - 40px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.modal-dialog-sm {
  width: min(560px, 100%);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.modal-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 17px;
}

.modal-icon {
  color: var(--primary-light);
  font-size: 18px;
}

.modal-close {
  display: grid;
  width: 34px;
  height: 34px;
  flex: none;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
}

.modal-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

.announce-body {
  color: var(--muted);
  white-space: pre-line;
}

.header-upload {
  flex: none;
}

@media (max-width: 640px) {
  .header-upload span:last-child {
    display: none;
  }
}

.load-more {
  margin: 30px auto 0;
}

.load-status {
  min-height: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.page-indicator {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  min-width: 76px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(18, 24, 38, 0.92);
  box-shadow: var(--shadow);
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.friend-links {
  padding: 22px 0 64px;
  border-top: 1px solid var(--line);
}

.friend-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.friend-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.friend-card:hover {
  border-color: #3b5068;
  background: var(--surface-soft);
}

.friend-card > span:last-child {
  display: grid;
  min-width: 0;
}

.friend-card strong,
.friend-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-card strong {
  color: var(--text);
  font-size: 13px;
}

.friend-card small {
  color: var(--muted);
  font-size: 10px;
}

.friend-logo {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--primary-light);
  font-size: 11px;
  font-weight: 800;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.site-footer .nav-shell {
  min-height: 72px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.site-footer a:hover {
  color: var(--text);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.submit-heading {
  padding: 36px 0 34px;
}

.submit-heading h1 {
  font-size: clamp(34px, 6vw, 60px);
}

.submit-form {
  display: grid;
  gap: 18px;
}

.form-section {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.form-section > h2,
.form-section-title h2 {
  margin-bottom: 18px;
  font-size: 20px;
}

.form-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field-text {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.form-actions-row {
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 16px;
}

.upload-field {
  margin-top: 16px;
}

.upload-drop {
  position: relative;
  display: grid;
  min-height: 150px;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 18px;
  border: 1px dashed #3b5068;
  border-radius: var(--radius);
  background: #0f1622;
  color: var(--muted);
  text-align: center;
}

.upload-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-light);
  font-size: 24px;
}

.upload-size {
  color: #71808f;
  font-size: 12px;
}

.language-field {
  display: grid;
  gap: 10px;
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0f1622;
}

.language-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  font-weight: 750;
}

.language-code {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.tag-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.tag-input-row {
  grid-template-columns: 1fr auto;
}

.submit-actions {
  justify-content: flex-end;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--muted);
}

.back-link:hover {
  color: var(--text);
}

.detail-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.detail-cover {
  aspect-ratio: 21 / 9;
}

.detail-body {
  padding: 34px;
}

.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
}

.detail-title-row h1 {
  margin: 16px 0 10px;
  font-size: clamp(32px, 6vw, 58px);
}

.detail-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-intro {
  max-width: 820px;
  color: var(--muted);
  font-size: 18px;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 32px 0;
}

.detail-meta-grid div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0f1622;
}

.detail-meta-grid dt {
  color: var(--muted);
  font-size: 12px;
}

.detail-meta-grid dd {
  margin: 4px 0 0;
  font-weight: 700;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.detail-safety {
  margin-top: 28px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0f1622;
}

.detail-safety h2 {
  font-size: 22px;
}

.detail-safety p {
  margin: 14px 0 0;
  color: var(--muted);
}

.admin-body {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 238px 1fr;
  background: var(--bg);
}

.admin-sidebar {
  min-height: 100vh;
  padding: 22px;
  background: #0d1b16;
  color: #fff;
}

.admin-sidebar .brand {
  display: block;
  margin-bottom: 36px;
}

.admin-nav {
  display: grid;
  gap: 6px;
}

.admin-nav a {
  padding: 10px 12px;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.68);
}

.admin-nav a:hover,
.admin-nav a.active {
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
}

.admin-main {
  min-width: 0;
  padding: 30px;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.admin-topbar h1 {
  margin: 0;
  font-size: 34px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.stat-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.stat-card strong {
  display: block;
  font-size: 30px;
  line-height: 1;
}

.stat-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.admin-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h2 {
  margin: 0;
  font-size: 20px;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th,
.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.admin-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.table-project {
  display: flex;
  align-items: center;
  gap: 12px;
}

.table-project strong,
.table-project span {
  display: block;
}

.table-project span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.table-cover {
  width: 54px;
  height: 38px;
  border-radius: 5px;
  background: linear-gradient(135deg, #22c55e, #15803d);
}

.table-cover-alt {
  background: linear-gradient(135deg, #5271a8, #35486e);
}

.table-cover-third {
  background: linear-gradient(135deg, #b7791f, #7e4d14);
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  vertical-align: middle;
}

.status-approved {
  background: var(--primary);
}

.status-pending {
  background: var(--amber);
}

@media (max-width: 900px) {
  .hero,
  .section-heading,
  .security-form,
  .detail-title-row {
    grid-template-columns: 1fr;
  }

  /* 窄屏：导航单独占一行，避免与品牌、操作按钮互相挤压 */
  .nav-shell {
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .main-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
  }

  .hero {
    min-height: auto;
    padding-top: 42px;
  }

  .hero-visual {
    min-height: 320px;
  }

  .section-heading {
    display: grid;
    align-items: start;
  }

  .security-form {
    display: grid;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .control-select {
    width: 100%;
  }

  .masonry {
    columns: 2 240px;
  }

  .detail-title-row {
    display: grid;
  }

  .detail-meta-grid,
  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-body {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    min-height: auto;
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 12px 16px;
  }

  .admin-sidebar .brand {
    margin: 0;
  }

  .admin-nav {
    display: flex;
    overflow-x: auto;
  }

  .admin-nav a {
    white-space: nowrap;
  }

  .admin-main {
    padding: 18px;
  }
}

@media (max-width: 620px) {
  .nav-shell {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 0;
  }

  .main-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
  }

  .main-nav a {
    white-space: nowrap;
  }

  .header-actions {
    margin-left: auto;
  }

  .language-select {
    min-width: 112px;
  }

  .hero {
    padding-bottom: 36px;
  }

  .hero-visual {
    min-height: 280px;
  }

  .preview-card-back,
  .preview-card-front {
    height: 250px;
  }

  .preview-card-front {
    padding: 22px;
  }

  .masonry {
    columns: 1;
  }

  .form-grid,
  .detail-meta-grid,
  .admin-stats {
    grid-template-columns: 1fr;
  }

  .form-section-title,
  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-body {
    padding: 22px;
  }

  .site-footer .nav-shell {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 16px 0;
  }
}

/* =====================================================================
   后台（中文界面，仅用本地 app.css，不引任何 CDN）
   ===================================================================== */

.admin-user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.admin-body .panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-panel + .admin-panel {
  margin-top: 22px;
}

.admin-form {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.admin-form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-form-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-field {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.admin-field-full,
.field-full {
  grid-column: 1 / -1;
}

.admin-field small {
  color: #64748b;
  font-size: 12px;
}

.admin-field input,
.admin-field select,
.admin-field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0f1522;
  color: var(--text);
}

.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus {
  border-color: var(--primary);
  outline: none;
}

.admin-field input[type="checkbox"] {
  width: auto;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 0 22px 22px;
}

.admin-hint,
.field-hint {
  color: var(--muted);
  font-size: 12px;
}

.admin-pager {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.admin-pager ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-pager a,
.admin-pager span {
  display: inline-block;
  padding: 6px 11px;
  border-radius: 6px;
  color: var(--muted);
}

.admin-pager a:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.admin-pager li.active span {
  background: var(--primary-soft);
  color: var(--primary-light);
}

.admin-lang-grid {
  display: grid;
  gap: 14px;
}

.admin-lang-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.admin-lang-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-lang-card > header strong {
  font-size: 14px;
}

.lang-badge {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  white-space: nowrap;
}

.lang-badge-filled {
  background: var(--primary-soft);
  color: var(--primary-light);
}

.lang-badge-empty {
  background: rgba(148, 163, 184, 0.14);
  color: var(--muted);
}

.lang-badge-code {
  background: var(--blue-soft);
  color: var(--blue);
}

.admin-upload,
.upload-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
}

.admin-upload-preview,
.upload-panel-preview {
  width: 176px;
  height: 110px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: #0f1522;
  object-fit: cover;
}

.admin-upload-body,
.upload-panel-body {
  display: grid;
  gap: 8px;
  min-width: 240px;
  flex: 1;
}

.admin-checkbox-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-checkbox,
.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
}

.admin-alert {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 13px;
}

.admin-alert-error {
  background: var(--red-soft);
  color: var(--red);
}

.admin-alert-ok {
  background: var(--primary-soft);
  color: var(--primary-light);
}

.admin-status {
  font-size: 13px;
}

.admin-status-approved {
  color: var(--primary-light);
}

.admin-status-pending {
  color: var(--amber);
}

.admin-status-rejected,
.admin-status-offline {
  color: var(--muted);
}

.admin-cover {
  width: 96px;
  height: 60px;
  border-radius: 6px;
  background: var(--surface-soft);
  object-fit: cover;
}

.admin-cover-blank {
  background: linear-gradient(135deg, #1f2937, #111827);
}

.admin-progress,
.form-progress {
  min-height: 20px;
  color: var(--primary-light);
  font-size: 13px;
}

.admin-progress-list,
.form-progress-list {
  display: grid;
  gap: 4px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--muted);
}

/* 后台「操作日志」页：多条件筛选 + 可换行的详情列 */
.log-filter {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  align-items: end;
  padding-bottom: 0;
}

.log-filter .admin-field input,
.log-filter .admin-field select {
  min-width: 0;
}

.log-table td {
  white-space: normal;
}

.log-detail {
  max-width: 460px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  padding: 24px;
  place-items: center;
}

.login-card {
  width: 100%;
  max-width: 380px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.login-card h1 {
  margin: 0;
  font-size: 20px;
}

.login-card p.login-sub {
  margin: 6px 0 22px;
  color: var(--muted);
  font-size: 13px;
}

.login-card .button {
  width: 100%;
}

@media (max-width: 900px) {
  .admin-form-grid,
  .admin-form-grid-3 {
    grid-template-columns: 1fr;
  }
}
