/* 共享主题与顶部导航样式（三个页面共用） */
:root {
  --bg: #10131a;
  --panel: #181d28;
  --panel-2: #1f2534;
  --line: #2c3548;
  --text: #e8ecf4;
  --muted: #8a94ab;
  --accent: #ffb02e;
  --accent-2: #ff7a3d;
  --good: #4cd9a0;
  --bad: #ff5d5d;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  background: radial-gradient(1200px 600px at 50% -10%, #1d2536 0%, var(--bg) 60%);
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px 48px;
}

/* ---------- 顶部导航 + 右上角“秘密”按钮 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  width: min(1080px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(16, 19, 26, .86);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 16px 16px;
}

.nav { display: flex; gap: 4px; flex-wrap: wrap; }

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
  transition: .15s;
}
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.nav-link.active {
  color: #0e1015;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 700;
}

.secret-btn {
  cursor: pointer;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 1px;
  padding: 8px 16px;
  border-radius: 999px;
  white-space: nowrap;
  transition: .15s;
}
.secret-btn:hover {
  background: rgba(255, 176, 46, .12);
  box-shadow: 0 0 18px rgba(255, 176, 46, .35);
}

/* ---------- 通用容器 / 标题 / 卡片 / 按钮 ---------- */
.container {
  width: min(760px, 100%);
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 26px;
}

h1 { text-align: center; margin: 0; font-size: 26px; letter-spacing: 2px; font-weight: 700; }
h1 .sub {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 4px;
  color: var(--muted);
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
}

.btn {
  cursor: pointer;
  font-family: inherit;
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  padding: 8px 18px;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: .15s;
}
.btn:hover { background: rgba(255, 176, 46, .12); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary {
  color: #0e1015;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  font-weight: 700;
}
.btn.primary:hover { filter: brightness(1.08); background: linear-gradient(135deg, var(--accent), var(--accent-2)); }

/* ---------- 滑动变阻器组件 ---------- */
.rheostat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px 10px 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
}
.rheostat-svg { display: block; width: 100%; height: auto; touch-action: none; }
.tick-label {
  font-family: Consolas, monospace;
  font-size: 17px;
  font-weight: 700;
  fill: var(--muted);
  text-anchor: middle;
  user-select: none;
}
.tick-label.active { fill: var(--accent); }
.slider-handle { cursor: grab; }
.slider-handle:active { cursor: grabbing; }
.slider-handle:focus { outline: none; }

/* ---------- 图片舞台 ---------- */
.stage {
  width: 100%;
  height: 300px;
  border-radius: 12px;
  background: repeating-linear-gradient(45deg, #141925 0 12px, #161c29 12px 24px);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  animation: pop .25s ease;
}
@keyframes pop {
  from { transform: scale(.92); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.qmark {
  font-size: 140px;
  font-weight: 900;
  color: #55607a;
  text-shadow: 0 0 30px rgba(255,176,46,.25);
  animation: pop .25s ease;
  user-select: none;
}

/* ---------- 音频控制条 ---------- */
.audio-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  min-height: 44px;
}
.auto-loop {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.auto-loop input { display: none; }
.auto-loop .track {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: var(--line);
  position: relative;
  transition: .2s;
  flex: none;
}
.auto-loop .track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: .2s;
}
.auto-loop input:checked + .track {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.auto-loop input:checked + .track::after { left: 21px; }

.badge {
  font-family: Consolas, monospace;
  font-size: 13px;
  color: #0e1015;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  padding: 3px 12px;
  font-weight: 700;
}
