:root {
  color-scheme: dark;
  --bg: #070b14;
  --panel: #101826;
  --panel-2: #151f31;
  --line: rgba(255, 255, 255, 0.1);
  --text: #edf3ff;
  --muted: #99a7bd;
  --primary: #29d3a8;
  --primary-2: #57a6ff;
  --warning: #ffd166;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(41, 211, 168, 0.16), transparent 28rem),
    radial-gradient(circle at top right, rgba(87, 166, 255, 0.14), transparent 24rem),
    var(--bg);
  color: var(--text);
  font-family:
    Inter,
    "Microsoft YaHei UI",
    "PingFang SC",
    "Noto Sans CJK SC",
    Arial,
    sans-serif;
  line-height: 1.6;
}

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

button,
input {
  font: inherit;
}

.site-header,
main,
.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  background: rgba(7, 11, 20, 0.86);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #06111b;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: -2px;
  color: var(--muted);
  font-size: 12px;
}

.top-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.top-nav a,
.button,
.ad-slot a,
.section-title button,
.category-tabs button,
.tag-list button,
.download-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.top-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  white-space: nowrap;
  font-size: 14px;
}

.top-nav a:hover,
.button:hover,
.ad-slot a:hover,
.section-title button:hover,
.category-tabs button:hover,
.tag-list button:hover,
.download-button:hover {
  transform: translateY(-1px);
  border-color: rgba(41, 211, 168, 0.5);
  background: rgba(41, 211, 168, 0.1);
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 28px 0 18px;
}

.hero-copy {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(16, 24, 38, 0.94), rgba(21, 31, 49, 0.72));
  box-shadow: var(--shadow);
  padding: 28px;
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 14px;
  border: 1px solid rgba(41, 211, 168, 0.32);
  border-radius: 999px;
  background: rgba(41, 211, 168, 0.1);
  padding: 5px 10px;
  color: var(--primary);
  font-size: 13px;
}

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

h1 {
  max-width: 800px;
  margin-bottom: 14px;
  font-size: clamp(32px, 7vw, 58px);
  line-height: 1.08;
}

.hero-desc {
  max-width: 680px;
  color: #d4deef;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  font-weight: 700;
}

.button.primary {
  border-color: transparent;
  background: var(--primary);
  color: #03110d;
}

.button.ghost {
  background: rgba(255, 255, 255, 0.06);
}

.hero-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.hero-panel div {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  padding: 16px;
}

.hero-panel span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.hero-panel strong {
  display: block;
  margin-top: 6px;
  color: var(--primary);
  font-size: 26px;
}

.ad-slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(87, 166, 255, 0.14), rgba(41, 211, 168, 0.1));
  padding: 16px;
}

.ad-slot strong,
.ad-slot span {
  display: block;
}

.ad-slot span {
  color: var(--muted);
  font-size: 14px;
}

.ad-slot a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  white-space: nowrap;
}

.controls,
.resource-section,
.download-note {
  margin-top: 22px;
}

.search-box {
  display: grid;
  gap: 8px;
}

.search-box span {
  color: var(--muted);
  font-size: 14px;
}

.search-box input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  padding: 0 14px;
}

.search-box input:focus {
  border-color: rgba(41, 211, 168, 0.7);
  box-shadow: 0 0 0 3px rgba(41, 211, 168, 0.12);
}

.category-tabs,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.category-tabs button,
.tag-list button,
.section-title button {
  padding: 0 12px;
}

.category-tabs button.active,
.tag-list button.active {
  border-color: transparent;
  background: var(--primary);
  color: #03110d;
  font-weight: 800;
}

.tag-filter {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  padding: 14px;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-title h2 {
  margin-bottom: 2px;
  font-size: 22px;
}

.section-title p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.resource-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.resource-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.18);
}

.category-badge {
  display: inline-flex;
  margin-bottom: 10px;
  border-radius: 999px;
  background: rgba(41, 211, 168, 0.1);
  color: var(--primary);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.card-body p {
  color: var(--muted);
  font-size: 14px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.card-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  color: #c8d4e8;
  font-size: 12px;
}

.card-footer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.extract-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 9px 10px;
  color: var(--muted);
  font-size: 13px;
}

.extract-code code {
  color: var(--warning);
  font-weight: 800;
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 12px;
  background: rgba(41, 211, 168, 0.13);
  color: var(--primary);
  font-weight: 800;
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

.download-note {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  padding: 18px;
}

.download-note p {
  color: var(--muted);
}

.note-card {
  border: 1px solid rgba(41, 211, 168, 0.2);
  border-radius: 10px;
  background: rgba(41, 211, 168, 0.08);
  padding: 14px;
}

.note-card strong,
.note-card span {
  display: block;
}

.note-card span {
  margin-top: 5px;
  color: #cce7df;
  font-size: 14px;
}

.site-footer {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding: 22px 0 34px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer p {
  margin-bottom: 0;
}

@media (min-width: 680px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 260px;
    align-items: stretch;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-footer {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .download-note {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: center;
  }
}

@media (min-width: 980px) {
  .resource-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-copy {
    padding: 22px;
  }

  .ad-slot,
  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-panel strong {
    font-size: 22px;
  }
}
