:root {
  color-scheme: light;
  --teal-50: #f0fdfa;
  --teal-100: #ccfbf1;
  --teal-200: #99f6e4;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --teal-700: #0f766e;
  --teal-800: #115e59;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --bg: var(--slate-50);
  --card-bg: rgba(255, 255, 255, 0.92);
  --text: var(--slate-900);
  --text-muted: var(--slate-500);
  --accent: var(--teal-600);
  --big: #2563eb;
  --normal: var(--teal-700);
  --star: #f59e0b;
  --danger: #dc2626;
  --success: #059669;
  --border: var(--slate-200);
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 16px 32px rgba(15, 118, 110, 0.12);
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }

.site-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
  color: #fff;
}
.site-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to right, transparent, #000 30%, #000 70%, transparent);
  pointer-events: none;
}
.header-inner {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 30px 0 48px;
}
.eyebrow, .content-kicker {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eyebrow {
  display: inline-block;
  padding: 4px 9px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  color: #fff;
}
.site-header .eyebrow {
  position: absolute;
  right: 0;
  bottom: 14px;
  margin: 0;
}
.site-header h1 {
  max-width: 720px;
  margin: 10px 0 6px;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: 0;
}
.site-header .subtitle {
  max-width: 680px;
  margin: 0;
  color: rgba(255,255,255,.88);
  font-size: 15px;
}
.site-header .stats {
  display: inline-flex;
  margin-top: 16px;
  padding: 7px 12px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  background: rgba(4,47,46,.16);
  color: rgba(255,255,255,.9);
  font-size: 12px;
  backdrop-filter: blur(8px);
}
.site-header .stats b { color: #fff; font-weight: 800; }

.controls {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(226,232,240,.9);
  background: rgba(248,250,252,.88);
  backdrop-filter: blur(16px);
}
.controls-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.search-box { position: relative; flex: 1 1 360px; max-width: 520px; }
.search-box input, .field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-lg);
  background: #fff;
  color: var(--slate-900);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.search-box input { height: 42px; padding: 0 14px 0 42px; font-size: 14px; }
.search-box input:focus, .field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(20,184,166,.15);
}
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  opacity: 0.4;
}
.search-icon::before, .search-icon::after {
  content: "";
  position: absolute;
  background: var(--slate-600);
  border-radius: 999px;
}
.search-icon::before {
  width: 10px; height: 10px;
  border: 2px solid currentColor;
  background: transparent;
  border-radius: 50%;
  top: 1px; left: 1px;
}
.search-icon::after {
  width: 2px; height: 6px;
  bottom: 0; right: 0;
  transform: rotate(45deg);
}
.filters { display: flex; gap: 6px; flex-shrink: 0; }
.filter-btn {
  padding: 7px 14px;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  background: #fff;
  color: var(--slate-600);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.filter-btn:hover { border-color: var(--teal-300); color: var(--teal-700); }
.filter-btn.active {
  background: var(--teal-600);
  border-color: var(--teal-600);
  color: #fff;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 48px;
}
.content-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.content-kicker { color: var(--teal-600); margin: 0 0 4px; }
.content-intro h2 { margin: 0 0 6px; font-size: 20px; letter-spacing: -0.01em; }
.content-intro > p { margin: 0; color: var(--slate-500); font-size: 13px; }

.section { margin-bottom: 36px; }
.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--slate-200);
}
.section-head h2 { margin: 0; font-size: 16px; font-weight: 700; }
.section-head .count { font-size: 12px; color: var(--slate-500); font-weight: 600; }
.section-head .bar { flex: 1; height: 3px; border-radius: 999px; background: var(--teal-100); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.card {
  min-width: 0;
  min-height: 200px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--card-bg);
  box-shadow: 0 1px 2px rgba(15,23,42,.03);
  transition: transform .3s, box-shadow .3s, border-color .3s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card:hover { border-color: var(--teal-200); box-shadow: var(--shadow-hover); transform: translateY(-2px); }

.card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--teal-50);
  border: 1px solid var(--teal-100);
  font-size: 18px;
  line-height: 1;
}
.card-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 4px;
}
.card-name {
  color: var(--slate-900);
  font-size: 15px;
  font-weight: 700;
  flex: 1;
  min-width: 0;
}
.card:hover .card-name { color: var(--teal-700); }
.card-desc {
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 2px 0 8px;
  color: var(--slate-600);
  font-size: 13px;
  line-height: 1.55;
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--slate-100);
}
.site-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  background: var(--teal-600);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  transition: background .2s;
  white-space: nowrap;
}
.site-link:hover { background: var(--teal-700); }

.meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--slate-500); }
.stars { display: flex; gap: 1px; color: var(--star); }
.score { color: var(--slate-600); font-weight: 600; }

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--slate-400);
  font-size: 15px;
}

.site-footer {
  border-top: 1px solid var(--slate-200);
  background: #fff;
  color: var(--slate-500);
  font-size: 12px;
}
.footer-inner {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.site-footer a { color: var(--teal-700); font-weight: 600; }

.admin-page { background: var(--slate-50); }
.login-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: linear-gradient(135deg, var(--teal-600), var(--teal-800));
}
.login-box {
  width: 100%;
  max-width: 380px;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: 0 20px 50px rgba(0,0,0,.18);
}
.login-box .eyebrow {
  border-color: var(--teal-200);
  background: var(--teal-50);
  color: var(--teal-700);
}
.login-box h1 { margin: 14px 0 4px; font-size: 23px; letter-spacing: 0; }
.login-copy { margin: 0 0 24px; color: var(--slate-500); font-size: 13px; }
.admin-wrap {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0 64px;
  animation: fade-in .3s ease-out;
}
.admin-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.admin-head p:not(.content-kicker) { margin: 4px 0 0; color: var(--slate-500); font-size: 13px; }
.panel {
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,.92);
  box-shadow: 0 1px 3px rgba(15,23,42,.04);
}
.panel-head { margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--slate-100); }
.panel-head h2 { margin: 0; font-size: 16px; letter-spacing: 0; }
.panel-head p { margin: 3px 0 0; color: var(--slate-500); font-size: 12px; }
.panel-head strong { color: var(--teal-700); }
.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 6px; color: var(--slate-700); font-size: 12px; font-weight: 600; }
.field input, .field select { min-height: 42px; padding: 9px 11px; }
.field textarea { min-height: 92px; padding: 10px 11px; resize: vertical; }
.row2, .row3 { display: grid; gap: 12px; }
.row2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.btn {
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--teal-600);
  border-radius: var(--radius-md);
  background: var(--teal-600);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 7px 18px rgba(13,148,136,.2);
  transition: background .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.btn:hover { border-color: var(--teal-700); background: var(--teal-700); box-shadow: 0 9px 22px rgba(13,148,136,.26); }
.btn-block { width: 100%; }
.btn.ghost { border-color: var(--slate-300); background: #fff; color: var(--slate-700); box-shadow: none; }
.btn.ghost:hover { border-color: var(--slate-400); background: var(--slate-100); }
.btn.danger {
  min-height: 32px;
  padding: 5px 10px;
  border-color: #fecaca;
  background: #fff;
  color: var(--danger);
  box-shadow: none;
  font-size: 12px;
}
.btn.danger:hover { border-color: #fca5a5; background: #fef2f2; }
.btn.compact { min-height: 32px; padding: 5px 10px; font-size: 12px; }
.form-actions { display: flex; gap: 9px; align-items: center; }
.actions { display: flex; gap: 7px; align-items: center; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 11px 10px; border-bottom: 1px solid var(--slate-200); text-align: left; vertical-align: top; }
th { background: var(--slate-50); color: var(--slate-600); font-size: 11px; font-weight: 700; text-transform: uppercase; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: var(--teal-50); }
td.name { max-width: 240px; color: var(--slate-800); font-weight: 700; overflow-wrap: anywhere; }
td.desc { max-width: 340px; color: var(--slate-500); font-size: 12px; }
.msg { min-height: 18px; margin-top: 10px; font-size: 12px; }
.msg.err { color: var(--danger); }
.msg.ok { color: var(--success); }
.hidden { display: none !important; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scale-in { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: scale(1); } }

@media (max-width: 720px) {
  .header-inner { padding: 26px 0 48px; }
  .controls-inner, .content-intro, .admin-head, .footer-inner { align-items: stretch; flex-direction: column; }
  .search-box { flex: 0 0 auto; width: 100%; max-width: none; }
  .filters { width: 100%; }
  .filter-btn { flex: 1; }
  .content-intro { gap: 10px; }
  .content-intro > p { text-align: left; }
  .footer-inner { min-height: 92px; justify-content: center; gap: 4px; }
  .row3 { grid-template-columns: 1fr; }
  .admin-head .btn { align-self: flex-start; }
  .card-icon { width: 30px; height: 30px; font-size: 15px; }
}

@media (max-width: 480px) {
  .header-inner, .container, .admin-wrap, .footer-inner { width: min(100% - 28px, 1120px); }
  .controls { padding-inline: 14px; }
  .controls-inner { gap: 9px; }
  .site-header h1 { font-size: 27px; }
  .site-header .stats { border-radius: var(--radius-md); }
  .grid { grid-template-columns: 1fr; }
  .card { min-height: 194px; }
  .card-footer { align-items: flex-end; }
  .panel, .login-box { padding: 18px; }
  .login-shell { padding: 32px 14px; }
  .row2 { grid-template-columns: 1fr; }
  th, td { white-space: nowrap; }
  td.desc { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}



