:root {
  --bg: #0b1222;
  --surface: #101a31;
  --surface-2: #162645;
  --text: #e9f1ff;
  --muted: #b3c2df;
  --primary: #59a8ff;
  --primary-2: #8a6bff;
  --border: #2a3b63;
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at top right, rgba(89, 168, 255, 0.2), transparent 40%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.35s ease, color 0.35s ease;
}

.container {
  width: 80%;
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0;
}

.brand {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.3px;
}

.nav-links {
  display: flex;
  gap: 1rem;
  margin-left: 1rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
}

.theme-switcher {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mini-cta {
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  color: var(--muted);
  background: var(--surface);
  font-size: 0.82rem;
}

.build-status {
  margin-left: auto;
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
  color: color-mix(in srgb, var(--text) 82%, var(--muted));
  font-weight: 600;
}

.theme-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-btn.theme-icon {
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  line-height: 1;
}

.theme-btn.is-active {
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--primary-2));
  border-color: transparent;
}

.hero {
  padding: 4.5rem 0 3rem;
}

.eyebrow {
  color: var(--primary);
  font-weight: 700;
  margin: 0 0 0.6rem;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 3.2vw, 3.1rem);
  line-height: 1.2;
}

.hero-description {
  color: var(--muted);
  max-width: 76ch;
}

.feature-tags {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border));
  border-radius: 999px;
  padding: 0.38rem 0.76rem;
  font-size: 0.83rem;
  font-weight: 600;
  line-height: 1;
  color: color-mix(in srgb, var(--text) 82%, var(--muted));
  background: linear-gradient(
    120deg,
    color-mix(in srgb, var(--primary) 14%, var(--surface)),
    color-mix(in srgb, var(--primary-2) 10%, var(--surface))
  );
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.feature-tag::before {
  content: "";
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--primary), var(--primary-2));
}

.feature-tag:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.1rem;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(120deg, var(--primary), var(--primary-2));
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.section {
  padding: 2.5rem 0;
}

.section.alt {
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  border-bottom: 1px solid var(--border);
}

.section-head h2 {
  margin: 0;
  font-size: 1.8rem;
}

.section-head p {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.section-emphasis {
  margin: 0.85rem 0 0;
  padding: 0.7rem 0.85rem;
  border-left: 3px solid var(--primary);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  color: var(--muted);
}

.tool-grid {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
}

.tool-card h3 {
  margin-top: 0;
}

.tool-card p {
  color: var(--muted);
  min-height: 3.2rem;
}

.collection-list {
  margin-top: 1.2rem;
  display: grid;
  gap: 0.8rem;
}

.collection-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}

.collection-item h4 {
  margin: 0;
}

.collection-item p {
  color: var(--muted);
  margin-bottom: 0;
}

/* Section-level visual differentiation for main homepage */
.section-about {
  border-bottom: 1px solid var(--border);
}

.section-usage .tool-card {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow);
}

.section-coming {
  background: transparent;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-coming .collection-item {
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow);
}

.site-footer {
  margin-top: 0.7rem;
  padding: 0 0 0.45rem;
  border-bottom: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: flex-start;
  gap: 0.6rem;
  color: color-mix(in srgb, var(--muted) 86%, var(--text));
  padding-top: 0.12rem;
  text-align: left;
  font-size: 0.84rem;
  letter-spacing: 0.1px;
  opacity: 0.92;
}

.footer-inner a {
  color: var(--muted);
  text-decoration: none;
}

.footer-inner a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* Theme: minimal */
body[data-theme="minimal"] {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f0f2f7;
  --text: #1c1f2a;
  --muted: #606778;
  --primary: #316dff;
  --primary-2: #111827;
  --border: #dbe1eb;
  --shadow: 0 10px 24px rgba(31, 43, 68, 0.08);
}

/* Theme: neon */
body[data-theme="neon"] {
  --bg: #09030f;
  --surface: #130b24;
  --surface-2: #1f1236;
  --text: #f5edff;
  --muted: #c7b5e8;
  --primary: #ff4fd8;
  --primary-2: #7b61ff;
  --border: #3f2a61;
  --shadow: 0 20px 42px rgba(255, 79, 216, 0.18);
}

/* Theme: forest */
body[data-theme="forest"] {
  --bg: #0f1b16;
  --surface: #15271f;
  --surface-2: #1a3026;
  --text: #e9f6ef;
  --muted: #b5cfbf;
  --primary: #3ecf8e;
  --primary-2: #1e9f6e;
  --border: #2f5646;
  --shadow: 0 20px 42px rgba(62, 207, 142, 0.16);
}

@media (max-width: 980px) {
  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .nav {
    flex-wrap: wrap;
  }

  .nav-links {
    order: 3;
    width: 100%;
    margin-left: 0;
    padding-top: 0.3rem;
  }

  .theme-switcher {
    margin-left: 0;
  }

  .mini-cta {
    display: none;
  }

  .build-status {
    display: none;
  }

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

  .footer-inner {
    flex-direction: column;
  }
}
