:root {
  --bg: #17120d;
  --bg-deep: #0d0b08;
  --panel: #241b13;
  --panel-soft: #302318;
  --cream: #fff7ed;
  --muted: #d8c4ad;
  --line: rgba(255, 247, 237, 0.16);
  --orange: #f97316;
  --amber: #facc15;
  --green: #22c55e;
  --teal: #2dd4bf;
  --sky: #38bdf8;
  --ink: #1c1917;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 8px;
  --focus: 0 0 0 3px rgba(45, 212, 191, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--cream);
  background:
    radial-gradient(circle at 8% 8%, rgba(249, 115, 22, 0.18), transparent 28rem),
    radial-gradient(circle at 88% 0%, rgba(45, 212, 191, 0.15), transparent 30rem),
    linear-gradient(180deg, #1b140e 0%, var(--bg) 48%, #100d09 100%);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  letter-spacing: 0;
}

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

button,
input {
  font: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  min-height: 72px;
  padding: 0 clamp(18px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(23, 18, 13, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-weight: 900;
  color: var(--cream);
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: conic-gradient(from 140deg, var(--green), var(--sky), var(--orange), var(--green));
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.32);
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.site-nav a,
.submit-button,
.category-button,
.link-button,
.tool-link {
  min-height: 42px;
  border-radius: var(--radius);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  color: var(--muted);
}

.site-nav a:hover {
  color: var(--cream);
  background: rgba(255, 247, 237, 0.08);
}

.submit-button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(249, 115, 22, 0.45);
  padding: 0 16px;
  color: var(--cream);
  background: rgba(249, 115, 22, 0.16);
  cursor: pointer;
}

main {
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(28px, 5vw, 68px);
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: clamp(34px, 6vw, 76px) clamp(18px, 5vw, 72px) 42px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 22px;
  font-size: clamp(44px, 7vw, 88px);
  line-height: 1;
  font-weight: 950;
}

.hero-lede {
  max-width: 560px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.72;
}

.search-box {
  display: grid;
  gap: 10px;
  max-width: 580px;
}

.search-box span {
  color: var(--cream);
  font-weight: 800;
}

.search-box input {
  width: 100%;
  min-height: 58px;
  border: 1px solid rgba(255, 247, 237, 0.2);
  border-radius: var(--radius);
  padding: 0 18px;
  color: var(--cream);
  background: rgba(255, 247, 237, 0.08);
}

.search-box input::placeholder {
  color: rgba(216, 196, 173, 0.72);
}

.tiny-note {
  margin: 12px 0 0;
  color: rgba(216, 196, 173, 0.78);
  font-size: 13px;
}

.hero-machine {
  position: relative;
  min-height: min(62vh, 520px);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(16px, 3vw, 26px);
  background:
    linear-gradient(135deg, rgba(255, 247, 237, 0.12), rgba(255, 247, 237, 0.03)),
    var(--panel);
  box-shadow: var(--shadow);
}

.machine-topline {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.machine-topline span {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 247, 237, 0.2);
}

.machine-topline span:nth-child(1) {
  width: 28%;
}

.machine-topline span:nth-child(2) {
  width: 18%;
}

.machine-topline span:nth-child(3) {
  width: 34%;
  background: var(--orange);
}

.machine-screen {
  position: relative;
  min-height: 300px;
  border: 1px solid rgba(255, 247, 237, 0.16);
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 28%, rgba(34, 197, 94, 0.7), transparent 4rem),
    radial-gradient(circle at 75% 38%, rgba(56, 189, 248, 0.6), transparent 5rem),
    radial-gradient(circle at 48% 74%, rgba(249, 115, 22, 0.72), transparent 5.5rem),
    var(--bg-deep);
}

.machine-screen span {
  position: absolute;
  width: 112px;
  height: 112px;
  border: 1px solid rgba(255, 247, 237, 0.2);
  border-radius: 20px;
  animation: floatLight 6s ease-in-out infinite;
}

.machine-screen span:nth-child(1) {
  left: 10%;
  top: 15%;
}

.machine-screen span:nth-child(2) {
  right: 12%;
  top: 30%;
  animation-delay: -1.7s;
}

.machine-screen span:nth-child(3) {
  left: 34%;
  bottom: 10%;
  animation-delay: -3s;
}

.machine-screen b {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58%;
  height: 2px;
  background: rgba(255, 247, 237, 0.5);
  transform-origin: left;
  animation: scan 5s linear infinite;
}

.machine-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.machine-controls i {
  min-height: 68px;
  border: 1px solid rgba(255, 247, 237, 0.13);
  border-radius: 14px;
  background: rgba(255, 247, 237, 0.08);
}

.category-section,
.featured-section,
.tools-section {
  padding: 34px clamp(18px, 5vw, 72px);
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(26px, 4vw, 46px);
}

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

.category-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--line);
  padding: 15px 14px;
  color: var(--cream);
  background: rgba(255, 247, 237, 0.07);
  cursor: pointer;
}

.category-button b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--amber);
}

.category-button.is-active {
  border-color: rgba(249, 115, 22, 0.72);
  background: rgba(249, 115, 22, 0.2);
}

.featured-card {
  position: relative;
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 24px;
  align-items: center;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(20px, 4vw, 34px);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.28), rgba(45, 212, 191, 0.12)),
    var(--panel-soft);
  box-shadow: var(--shadow);
}

.featured-orbit {
  position: relative;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  border: 1px solid rgba(255, 247, 237, 0.2);
  background: rgba(13, 11, 8, 0.38);
}

.featured-orbit span {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--teal);
}

.featured-orbit span:nth-child(1) {
  left: 12px;
  top: 18px;
}

.featured-orbit span:nth-child(2) {
  right: 14px;
  top: 46px;
  background: var(--orange);
}

.featured-orbit span:nth-child(3) {
  left: 48px;
  bottom: 12px;
  background: var(--green);
}

.card-kicker {
  margin-bottom: 10px;
  color: var(--amber);
  font-weight: 900;
}

.featured-card h3,
.tool-card h3 {
  margin-bottom: 10px;
}

.featured-card p {
  color: var(--muted);
  line-height: 1.68;
}

.tool-card p {
  color: #6f5e50;
  line-height: 1.68;
}

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

.tag-list span {
  border: 1px solid rgba(255, 247, 237, 0.14);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--cream);
  background: rgba(255, 247, 237, 0.08);
  font-size: 13px;
}

.link-button,
.tool-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.link-button {
  align-self: end;
  min-width: 132px;
  padding: 0 18px;
  color: var(--ink);
  background: var(--cream);
}

.tools-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.result-count {
  margin: 12px 0 0;
  color: var(--muted);
}

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

.tool-card {
  display: flex;
  flex-direction: column;
  min-height: 360px;
  border: 1px solid rgba(28, 25, 23, 0.1);
  border-radius: 18px;
  padding: 18px;
  color: var(--ink);
  background: var(--cream);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.3);
}

.tool-card-top,
.tool-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: var(--cream);
  background: linear-gradient(135deg, var(--orange), var(--teal));
  font-weight: 900;
}

.status {
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--ink);
  background: #fed7aa;
  font-size: 13px;
  font-weight: 900;
}

.status-demo {
  background: #bae6fd;
}

.status-pending {
  background: #fde68a;
}

.tool-card .tag-list span {
  border-color: rgba(28, 25, 23, 0.1);
  color: var(--ink);
  background: #f5e8d8;
}

.tool-meta {
  margin-top: auto;
  border-top: 1px solid #ead8c5;
  padding-top: 16px;
  color: #6b5b4d;
  line-height: 1.5;
}

.tool-meta strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--cream);
  background: var(--ink);
}

.tool-link {
  margin-top: 16px;
  border: 1px solid var(--ink);
  padding: 12px 14px;
}

.tool-link:hover {
  color: var(--cream);
  background: var(--ink);
}

.empty-state {
  border: 1px dashed rgba(255, 247, 237, 0.28);
  border-radius: 18px;
  padding: 26px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 247, 237, 0.05);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 30px clamp(18px, 5vw, 72px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@keyframes floatLight {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-14px) rotate(8deg);
  }
}

@keyframes scan {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@media (max-width: 1000px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-machine {
    min-height: 420px;
  }

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

  .featured-card {
    grid-template-columns: 120px 1fr;
  }

  .link-button {
    grid-column: 2;
    justify-self: start;
  }

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

@media (max-width: 700px) {
  .site-header {
    position: static;
    grid-template-columns: 1fr;
    gap: 12px;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .site-nav {
    justify-content: start;
    flex-wrap: wrap;
  }

  .submit-button {
    justify-self: start;
  }

  h1 {
    font-size: clamp(42px, 15vw, 66px);
  }

  .hero {
    padding-top: 28px;
  }

  .hero-machine {
    min-height: 330px;
  }

  .machine-screen {
    min-height: 210px;
  }

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

  .section-heading,
  .tools-heading {
    display: block;
  }

  .featured-card {
    grid-template-columns: 1fr;
  }

  .featured-orbit {
    width: 110px;
    height: 110px;
  }

  .link-button {
    grid-column: auto;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: grid;
  }
}

@media (max-width: 420px) {
  .category-list {
    grid-template-columns: 1fr;
  }

  .tool-meta {
    display: grid;
  }
}

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