:root {
  --bg: #020617;
  --bg-card: #020617;
  --accent: #38bdf8;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --danger: #f97373;
  --success: #4ade80;
  --radius-lg: 16px;
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.6);
  --transition-fast: 0.18s ease-out;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #020617 0, #000 55%);
  color: var(--text-main);
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

/* 顶部导航 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: linear-gradient(
    to right,
    rgba(15, 23, 42, 0.92),
    rgba(15, 23, 42, 0.96)
  );
  border-bottom: 1px solid rgba(51, 65, 85, 0.9);
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nav-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: inherit;
}

.nav-logo {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: radial-gradient(
    circle at 0 0,
    #38bdf8 0,
    #1d4ed8 45%,
    #020617 100%
  );
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #f9fafb;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.4),
    0 10px 25px rgba(15, 23, 42, 0.8);
}

.nav-left span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-left small {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.nav-link {
  padding: 4px 8px;
  border-radius: 999px;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.nav-link:hover {
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
}

.nav-link.is-active {
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
}

.nav-pill {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.6);
  color: var(--accent);
  font-size: 11px;
}

/* 主体内容 */
.page-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 20px;
}

.page-inner {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

.hidden {
  display: none;
  visibility: hidden;
  height: 0;
}

.card {
  background: rgba(15, 23, 42, 0.96);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(55, 65, 81, 0.9);
  box-shadow: var(--shadow-soft);
  padding: 20px 18px 16px;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.2), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(129, 140, 248, 0.16), transparent
          52%);
  opacity: 0.45;
  pointer-events: none;
}

.card-inner {
  position: relative;
  z-index: 1;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.9);
}

h1 {
  margin: 0 0 6px;
  font-size: clamp(22px, 3vw, 26px);
  letter-spacing: 0.02em;
}

.intro-subtitle {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

.intro-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 11px;
  color: var(--text-muted);
}

.intro-meta span {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px dashed rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
}

.intro-meta span strong {
  color: var(--accent);
  font-weight: 500;
}

.layout-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr);
  gap: 18px;
  align-items: flex-start;
}

/* 左：正文（SEO 文案） */
.main-content {
  padding: 12px 0 0;
  transition: filter var(--transition-fast), opacity var(--transition-fast);
}

body.locked .main-content {
  filter: blur(4px);
  opacity: 0.7;
  pointer-events: none;
  user-select: none;
}

/* 解锁后：隐藏右侧数学验证模块，正文正常展示且占满宽度 */
body.unlocked .math-gate {
  display: none;
}

body.unlocked .layout-cols {
  grid-template-columns: minmax(0, 1fr);
}

.content-header {
  margin-bottom: 8px;
}

.content-header h2 {
  margin: 0;
  font-size: 15px;
}

.content-body p {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

.content-body ul {
  margin: 0 0 6px 18px;
  padding: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.content-body li {
  margin-bottom: 4px;
}

.content-footer {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid rgba(30, 64, 175, 0.7);
  padding-top: 6px;
}

/* 右：数学验证 */
.math-gate {
  position: relative;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.7);
  padding: 14px 12px 10px;
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.7);
}

.math-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.math-title-main {
  display: flex;
  flex-direction: column;
}

.math-title-main span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.math-title-main strong {
  font-size: 14px;
}

.math-pill {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.7);
  font-size: 11px;
  color: var(--success);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.math-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.9);
}

.math-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.6;
}

.math-eq {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 18px;
  margin-bottom: 10px;
}

.math-eq span {
  min-width: 24px;
  text-align: center;
}

.math-input {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.math-input input {
  flex: 1;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-main);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition-fast),
    box-shadow var(--transition-fast), background var(--transition-fast);
}

.math-input input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.6);
  background: rgba(15, 23, 42, 1);
}

.math-input button {
  padding: 7px 14px;
  border-radius: 999px;
  border: none;
  font-size: 13px;
  cursor: pointer;
  background: linear-gradient(135deg, #38bdf8, #4f46e5);
  color: #f9fafb;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
    filter var(--transition-fast);
  white-space: nowrap;
}

.math-input button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.7);
  filter: brightness(1.05);
}

.math-input button:active {
  transform: translateY(0);
  box-shadow: none;
  filter: brightness(0.98);
}

.math-tip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
  gap: 8px;
}

.math-msg {
  font-size: 12px;
  min-height: 16px;
}

.math-msg.error {
  color: var(--danger);
}

.math-msg.success {
  color: var(--success);
}

.math-meta {
  margin-top: 4px;
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.reset-link {
  font-size: 10px;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.reset-link:hover {
  opacity: 0.9;
}

/* 页脚 */
.site-footer {
  border-top: 1px solid rgba(31, 41, 55, 0.9);
  background: radial-gradient(
    circle at top,
    #020617 0,
    #020617 50%,
    #000 100%
  );
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 10px 16px 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  opacity: 0.85;
}

.footer-links a:hover {
  opacity: 1;
}

@media (max-width: 768px) {
  .page-main {
    padding: 18px 12px 16px;
  }
  .card {
    padding: 16px 12px 12px;
  }
  .layout-cols {
    grid-template-columns: minmax(0, 1fr);
  }
  .math-gate {
    order: -1;
  }
  .nav-inner {
    padding-inline: 12px;
  }
  .footer-inner {
    padding-inline: 12px;
  }
}


