:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1f2430;
  --text: #f1f3f7;
  --muted: #b8bfd0;
  --primary: #ff9d00;
  --primary-dark: #e38c00;
  --line: #2d3342;
  --ok: #2dd4bf;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  line-height: 1.75;
}

a {
  color: #ffd17a;
  text-decoration: none;
}

a:hover {
  color: #ffe5b2;
  text-decoration: underline;
}

.container {
  width: min(1160px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 130000;
  background: rgba(15, 17, 21, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.menu-toggle:hover {
  background: #293040;
}

.breadcrumbs-wrap {
  border-bottom: 1px solid var(--line);
  background: rgba(18, 21, 28, 0.96);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.breadcrumbs span[aria-current="page"] {
  color: var(--text);
}

.bc-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bc-icon {
  display: none;
  width: 18px;
  height: 18px;
  position: relative;
}

.bc-icon:before {
  content: "";
  position: absolute;
  left: 1px;
  top: 3px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 7px solid #ffd17a;
}

.bc-icon:after {
  content: "";
  position: absolute;
  left: 4px;
  top: 9px;
  width: 10px;
  height: 8px;
  border: 2px solid #ffd17a;
  border-top: 0;
  border-radius: 2px;
}

.bc-sep {
  color: var(--muted);
}

.nav a {
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--muted);
}

.nav a:hover,
.nav a.active {
  color: var(--text);
  background: var(--panel-2);
  text-decoration: none;
}

.hero {
  padding: 42px 0 26px;
}

.hero-card {
  background: linear-gradient(145deg, #171a21 0%, #1c2230 55%, #171a21 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
}

h1,
h2,
h3 {
  line-height: 1.35;
  margin: 0 0 12px;
}

h1 {
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
}

h2 {
  margin-top: 26px;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
}

.lead {
  color: #d9dfeb;
  margin-bottom: 16px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.btn {
  display: inline-block;
  border-radius: 10px;
  padding: 11px 16px;
  font-weight: 700;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: #19120a;
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: #130d05;
  text-decoration: none;
}

.btn-outline {
  border-color: var(--line);
  color: var(--text);
  background: transparent;
}

.btn-outline:hover {
  background: var(--panel-2);
  text-decoration: none;
}

.content {
  padding: 12px 0 36px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 18px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.keyword-list,
.plain-list {
  margin: 10px 0 0;
  padding-left: 18px;
}

.keyword-list li,
.plain-list li {
  margin-bottom: 8px;
}

.tag {
  display: inline-block;
  margin-right: 8px;
  margin-bottom: 8px;
  border: 1px solid #3b4254;
  background: #252c3b;
  color: #f4d7a3;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.9rem;
}

.tip {
  border-left: 4px solid var(--ok);
  padding-left: 12px;
  color: #d7eee9;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 20px 0 36px;
  color: var(--muted);
  font-size: 0.95rem;
}

.links-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 10px;
}

.center-page {
  min-height: 70vh;
  display: grid;
  place-items: center;
  padding: 40px 0;
}

.error-box {
  width: min(720px, 92%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  text-align: center;
}

.error-code {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  margin: 0 0 6px;
  color: #ffd38c;
}

@media (max-width: 860px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .hero-card,
  .panel,
  .error-box {
    padding: 18px;
  }

  .header-inner {
    align-items: center;
    flex-wrap: nowrap;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .menu-toggle {
    font-size: 20px;
    border-color: #2a3040;
    background: rgba(31, 36, 48, 0.92);
  }

  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(240px, 82vw);
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px;
    background: rgba(23, 26, 33, 0.98);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.38);
    z-index: 120000;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    display: block;
    width: 100%;
    padding: 10px 12px;
    background: var(--panel);
    border: 1px solid var(--line);
  }

  .breadcrumbs {
    font-size: 0.9rem;
  }

  /* Mobile: breadcrumb becomes an icon button (home) */
  .breadcrumbs .bc-label,
  .breadcrumbs .bc-sep,
  .breadcrumbs .bc-current {
    display: none;
  }

  .breadcrumbs .bc-icon {
    display: inline-block;
  }

  .breadcrumbs {
    padding: 8px 0;
  }
}
