:root {
  color-scheme: dark;
  --bg: #0f1218;
  --bg-soft: #171b24;
  --panel: rgba(20, 24, 34, 0.82);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f4f7fb;
  --muted: #aeb8c9;
  --cyan: #4cc9f0;
  --green: #4ade80;
  --gold: #f5c15c;
  --red: #fb7185;
  --blue: #5865f2;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans TC", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(18px, 5vw, 72px);
  background: rgba(15, 18, 24, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand,
.nav-links,
.header-actions,
.hero-actions,
.hero-stats,
.control-row,
.site-footer,
.site-footer div {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 900;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--gold) url("./assets/bot-avatar.png") center / cover;
  color: transparent;
  border-radius: 8px;
  font-size: 14px;
  overflow: hidden;
}

.nav-links {
  gap: 28px;
  color: var(--muted);
  font-size: 15px;
}

.nav-links a:hover {
  color: var(--text);
}

.header-button,
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 700;
}

.header-button,
.primary-button {
  background: var(--blue);
  color: white;
}

.header-actions {
  gap: 10px;
}

.header-status {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--muted);
  box-shadow: 0 0 0 4px rgba(174, 184, 201, 0.12);
}

.status-dot-ok {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.14), 0 0 18px rgba(74, 222, 128, 0.42);
}

.status-dot-bad {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.14), 0 0 18px rgba(251, 113, 133, 0.32);
}

.secondary-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 140px clamp(18px, 5vw, 72px) 70px;
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(15, 18, 24, 0.92) 0%, rgba(15, 18, 24, 0.68) 46%, rgba(15, 18, 24, 0.38) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(15, 18, 24, 0.02) 34%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
}

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

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

h1 {
  margin-bottom: 18px;
  font-size: 88px;
  line-height: 0.95;
}

h2 {
  margin-bottom: 14px;
  font-size: 48px;
  line-height: 1.15;
}

h3 {
  margin-bottom: 10px;
  font-size: 21px;
}

.hero-copy,
.section-heading p,
.cta-section p,
.feature-card p,
.management-item p {
  color: var(--muted);
  line-height: 1.75;
}

.hero-copy {
  max-width: 680px;
  font-size: 19px;
}

.hero-actions {
  gap: 12px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.hero-stats {
  gap: 14px;
  flex-wrap: wrap;
}

.hero-stats div {
  min-width: 128px;
  padding: 16px;
  background: rgba(17, 23, 33, 0.76);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hero-stats dt {
  font-size: 28px;
  font-weight: 900;
}

.hero-stats dd {
  margin: 2px 0 0;
  color: var(--muted);
}

.live-stat {
  border-color: rgba(74, 222, 128, 0.32) !important;
}

.live-stat.is-offline {
  border-color: rgba(251, 113, 133, 0.32) !important;
}

.section {
  padding: 92px clamp(18px, 5vw, 72px);
}

.section-heading {
  width: min(780px, 100%);
  margin: 0 auto 38px;
  text-align: center;
}

.section-heading.align-left {
  margin-left: 0;
  text-align: left;
}

.feature-overview {
  background: var(--bg);
}

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

.feature-card,
.management-item,
.music-panel,
.command-table {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.feature-card {
  min-height: 260px;
  padding: 24px;
  border-top: 4px solid var(--cyan);
}

.accent-green {
  border-top-color: var(--green);
}

.accent-gold {
  border-top-color: var(--gold);
}

.accent-red {
  border-top-color: var(--red);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 22px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-weight: 900;
}

.reveal-item {
  transform: translateY(18px);
  opacity: 0;
  transition: transform 520ms ease, opacity 520ms ease, border-color 220ms ease;
}

.reveal-item.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.feature-card:hover,
.management-item:hover,
.trust-card:hover,
.status-card:hover,
.simple-card:hover {
  border-color: rgba(255, 255, 255, 0.28);
}

.feature-switcher {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(260px, 0.45fr) 1fr;
  gap: 16px;
  align-items: stretch;
}

.switcher-tabs {
  display: grid;
  gap: 10px;
}

.switcher-tab,
.command-filter {
  min-height: 46px;
  justify-content: flex-start;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.switcher-tab.is-active,
.command-filter.is-active {
  border-color: rgba(76, 201, 240, 0.68);
  background: rgba(76, 201, 240, 0.16);
  color: var(--text);
}

.switcher-panel {
  min-height: 168px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(76, 201, 240, 0.12), rgba(245, 193, 92, 0.08)),
    rgba(20, 24, 34, 0.78);
}

.switcher-panel span {
  display: block;
  margin-bottom: 12px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.switcher-panel strong {
  display: block;
  margin-bottom: 12px;
  font-size: 32px;
  line-height: 1.2;
}

.switcher-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(360px, 1fr);
  gap: 44px;
  align-items: center;
  background: #11151d;
}

.music-panel {
  padding: 22px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.track-art {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 18px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(76, 201, 240, 0.38), rgba(245, 193, 92, 0.42)),
    url("./assets/hero-corgi.png") center / cover;
}

.track-info {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.track-info span,
.track-info small {
  color: var(--muted);
}

.track-info strong {
  font-size: 26px;
}

.music-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 0 8px;
}

.music-progress span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
  transition: width 260ms ease;
}

.control-row {
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  background: #2785e5;
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

button:hover,
.primary-button:hover,
.secondary-button:hover,
.header-button:hover,
.header-status:hover {
  transform: translateY(-1px);
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

button.danger {
  background: #d63b43;
}

.management-section {
  background: #171315;
}

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

.management-item {
  padding: 24px;
}

.trust-section {
  background: #10151d;
}

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

.trust-card {
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(88, 101, 242, 0.16), rgba(20, 24, 34, 0.86));
}

.trust-card p {
  color: var(--muted);
  line-height: 1.75;
}

.permissions-section {
  background: #141116;
}

.permission-list {
  display: grid;
  gap: 10px;
}

.permission-list div {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 24, 34, 0.72);
}

.permission-list strong {
  color: var(--gold);
}

.permission-list span {
  color: var(--muted);
}

.audience-section {
  background: #0f1218;
}

.audience-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.audience-grid span {
  padding: 13px 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: #dfe8f8;
  font-weight: 800;
}

.commands-section {
  background: #10141d;
}

.command-table {
  overflow: hidden;
}

.command-filters {
  display: flex !important;
  grid-template-columns: none !important;
  flex-wrap: wrap;
  gap: 10px !important;
  padding: 16px !important;
  background: rgba(255, 255, 255, 0.04);
}

.command-table div {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  padding: 18px 22px;
  border-top: 1px solid var(--line);
}

.command-table div:first-child {
  border-top: 0;
}

.command-table span:first-child {
  color: var(--cyan);
  font-weight: 900;
  font-family: Consolas, "Noto Sans TC", monospace;
}

.command-table span:last-child {
  color: var(--muted);
}

.command-table div.is-hidden {
  display: none;
}

.cta-section {
  margin: 0 clamp(18px, 5vw, 72px) 72px;
  padding: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.28), rgba(245, 193, 92, 0.14));
}

.cta-section h2 {
  margin-bottom: 8px;
}

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

.site-footer div {
  gap: 18px;
}

.legal-body {
  min-height: 100vh;
  background:
    linear-gradient(rgba(76, 201, 240, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76, 201, 240, 0.04) 1px, transparent 1px),
    radial-gradient(circle at top, rgba(88, 101, 242, 0.16), transparent 34rem),
    #080c12;
  background-size: 40px 40px, 40px 40px, auto, auto;
}

.legal-header {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(18px, 5vw, 72px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 12, 18, 0.82);
  backdrop-filter: blur(18px);
}

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

.legal-main {
  width: min(980px, calc(100% - 36px));
  margin: 0 auto;
  padding: 66px 0 90px;
}

.legal-hero {
  padding: 54px 0 44px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.legal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 18px;
  margin-bottom: 28px;
  color: #c5a7ff;
  border: 1px solid rgba(168, 85, 247, 0.52);
  border-radius: 5px;
  background: rgba(88, 28, 135, 0.35);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.legal-hero h1 {
  margin-bottom: 16px;
  font-size: 58px;
}

.legal-hero p {
  color: var(--muted);
}

.legal-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 32px 0 24px;
}

.legal-tab {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(15, 18, 24, 0.76);
  color: var(--muted);
  font-weight: 800;
}

.legal-tab:hover,
.legal-tab:focus-visible {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.75);
  outline: none;
}

.legal-card {
  padding: clamp(24px, 4vw, 44px);
  margin-top: 18px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(12, 16, 24, 0.82);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.28);
}

.legal-card h2 {
  margin-bottom: 6px;
  font-size: 40px;
}

.legal-card h3 {
  margin-top: 30px;
  color: #dfe8f8;
}

.legal-card p,
.legal-card li {
  color: var(--muted);
  line-height: 1.85;
}

.legal-card ul {
  padding-left: 22px;
}

.legal-updated {
  margin-bottom: 28px;
  color: #7f8ea8;
  font-size: 14px;
}

.legal-footer {
  background: rgba(8, 12, 18, 0.88);
}

.simple-main {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 126px 0 84px;
}

.simple-hero {
  padding: 34px 0 38px;
}

.simple-hero h1 {
  margin-bottom: 12px;
  font-size: 60px;
}

.simple-hero p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.8;
}

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

.simple-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.simple-card p,
.simple-card li {
  color: var(--muted);
  line-height: 1.75;
}

.simple-card ul {
  padding-left: 20px;
}

.full-card {
  grid-column: 1 / -1;
}

.command-list {
  display: grid;
  gap: 10px;
}

.command-list div {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.command-list code {
  color: var(--cyan);
  font-weight: 900;
}

.command-list span {
  color: var(--muted);
}

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

.status-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 24, 34, 0.82);
}

.status-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 26px;
}

.status-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.status-ok {
  color: var(--green);
}

.status-bad {
  color: #ff6b6b;
}

.status-warn {
  color: #ffd166;
}

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

.status-note {
  color: var(--muted);
  line-height: 1.75;
}

@media (max-width: 980px) {
  h1 {
    font-size: 72px;
  }

  h2 {
    font-size: 42px;
  }

  .legal-hero h1,
  .simple-hero h1 {
    font-size: 52px;
  }

  .nav-links {
    display: none;
  }

  .feature-grid,
  .management-grid,
  .trust-grid,
  .split-section {
    grid-template-columns: 1fr 1fr;
  }

  .simple-grid,
  .status-grid {
    grid-template-columns: 1fr 1fr;
  }

  .feature-switcher {
    grid-template-columns: 1fr;
  }

  .split-section .section-heading {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  h1 {
    font-size: 52px;
  }

  h2 {
    font-size: 32px;
  }

  .switcher-panel strong {
    font-size: 24px;
  }

  .legal-hero h1,
  .simple-hero h1 {
    font-size: 40px;
  }

  .legal-card h2 {
    font-size: 28px;
  }

  .site-header {
    height: 62px;
  }

  .header-button {
    display: none;
  }

  .header-status {
    display: none;
  }

  .hero {
    min-height: 88vh;
    padding-top: 110px;
  }

  .hero-copy {
    font-size: 17px;
  }

  .feature-grid,
  .management-grid,
  .trust-grid,
  .split-section,
  .command-table div,
  .permission-list div,
  .command-list div,
  .cta-section {
    grid-template-columns: 1fr;
  }

  .simple-grid,
  .status-grid {
    grid-template-columns: 1fr;
  }

  .cta-section {
    display: grid;
  }

  .section {
    padding-top: 66px;
    padding-bottom: 66px;
  }

  .site-footer {
    display: grid;
  }

  .legal-header {
    height: auto;
    min-height: 68px;
    gap: 16px;
    padding-top: 14px;
    padding-bottom: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .reveal-item {
    transform: none;
    opacity: 1;
  }
}
