/* Truth or Dare — 双主题(默认浅色, 用户偏好) */
:root {
  --bg-grad-from: #fef6f9;
  --bg-grad-to: #ffffff;
  --panel: #ffffff;
  --panel-2: #faf3f5;
  --line: #f0e0e6;
  --text: #2a1a20;
  --muted: #8a6b76;
  --truth: #e85d75;      /* 玫瑰红 = truth */
  --dare: #8b5cf6;       /* 紫 = dare */
  --truth-soft: #fdeef1;
  --dare-soft: #f3edfe;
  --shadow: 0 8px 30px rgba(42, 26, 32, .08);
  --shadow-truth: 0 10px 28px rgba(232, 93, 117, .38);
  --shadow-dare: 0 10px 28px rgba(139, 92, 246, .38);
  --radius: 18px;
}
[data-theme="dark"] {
  --bg-grad-from: #17101a;
  --bg-grad-to: #1e1420;
  --panel: #241a26;
  --panel-2: #2d2130;
  --line: #3d2f40;
  --text: #f5ecf0;
  --muted: #a98f99;
  --truth: #ff7a90;
  --dare: #a78bfa;
  --truth-soft: #3a2229;
  --dare-soft: #2d2440;
  --shadow: 0 8px 30px rgba(0, 0, 0, .4);
  --shadow-truth: 0 10px 28px rgba(255, 122, 144, .3);
  --shadow-dare: 0 10px 28px rgba(167, 139, 250, .3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(180deg, var(--bg-grad-from) 0%, var(--bg-grad-to) 60%);
  background-attachment: fixed;
  color: var(--text); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
}
.wrap { max-width: 860px; margin: 0 auto; padding: 0 20px; }

header {
  padding: 18px 0; position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg-grad-from) 82%, transparent);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; text-decoration: none; color: var(--text); }
.logo .t { color: var(--truth); } .logo .d { color: var(--dare); }
nav { display: flex; align-items: center; gap: 20px; }
nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; }
nav a:hover { color: var(--text); }
.theme-toggle {
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  width: 38px; height: 38px; cursor: pointer; font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s, transform .15s;
}
.theme-toggle:hover { border-color: var(--truth); transform: scale(1.06); }

.hero { text-align: center; padding: 60px 0 8px; }
.hero h1 { font-size: clamp(32px, 5.4vw, 54px); font-weight: 800; letter-spacing: -1.5px; line-height: 1.1; }
.hero h1 .t { color: var(--truth); } .hero h1 .d { color: var(--dare); }
.hero p.sub { color: var(--muted); font-size: 17px; margin-top: 14px; max-width: 540px; margin-left: auto; margin-right: auto; }

/* 模式选择 */
.mode-row { display: flex; gap: 10px; justify-content: center; margin: 30px 0 8px; flex-wrap: wrap; }
.mode-btn {
  background: var(--panel); border: 1.5px solid var(--line); border-radius: 999px;
  padding: 10px 22px; font-size: 14px; font-weight: 600; cursor: pointer;
  color: var(--muted); transition: all .15s;
}
.mode-btn:hover { border-color: var(--truth); color: var(--text); }
.mode-btn.on { background: var(--truth-soft); border-color: var(--truth); color: var(--truth); font-weight: 700; }

/* 卡片舞台 */
.stage { text-align: center; margin: 26px 0 12px; }
.card {
  position: relative; width: min(420px, 92vw); height: 280px; margin: 0 auto;
  perspective: 1200px; cursor: pointer;
}
.card-inner {
  position: absolute; inset: 0; transition: transform .55s cubic-bezier(.4,.1,.2,1);
  transform-style: preserve-3d;
}
.card.flipped .card-inner { transform: rotateY(180deg); }
.face {
  position: absolute; inset: 0; backface-visibility: hidden;
  border-radius: var(--radius); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; padding: 28px;
  box-shadow: var(--shadow);
}
.face.back-face { background: var(--panel); border: 2px dashed var(--line); }
.face.back-face .big { font-size: 44px; }
.face.back-face .hint { color: var(--muted); font-size: 14px; }
.face.front-face { transform: rotateY(180deg); }
.face.front-face.truth-face { background: var(--truth); color: #fff; box-shadow: var(--shadow-truth); }
.face.front-face.dare-face { background: var(--dare); color: #fff; box-shadow: var(--shadow-dare); }
.face .kind { font-size: 13px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; opacity: .85; }
.face .q { font-size: clamp(17px, 4vw, 21px); font-weight: 700; line-height: 1.4; text-align: center; }

.controls { display: flex; gap: 12px; justify-content: center; margin: 22px 0; flex-wrap: wrap; }
.btn {
  border: none; border-radius: 13px; padding: 15px 30px; font-size: 16px; font-weight: 700;
  cursor: pointer; color: #fff; transition: transform .12s, filter .15s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn:active { transform: translateY(0); }
.btn.truth { background: var(--truth); box-shadow: var(--shadow-truth); }
.btn.dare { background: var(--dare); box-shadow: var(--shadow-dare); }
.btn.ghost { background: var(--panel); color: var(--text); border: 1.5px solid var(--line); box-shadow: none; }
.btn.ghost:hover { border-color: var(--truth); }

.trust-line { margin: 8px 0 0; font-size: 13px; color: var(--muted); display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.trust-line span::before { content: "✓ "; color: var(--truth); font-weight: 700; }

section.block { padding: 48px 0; border-top: 1px solid var(--line); }
section.block h2 { font-size: 27px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 16px; }
section.block p, section.block li { color: var(--muted); }
section.block a { color: var(--truth); }
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 22px; }
.how-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.how-card .num { font-size: 28px; font-weight: 800; color: var(--dare); opacity: .45; }
.how-card h3 { font-size: 15px; margin: 6px 0 4px; }
.how-card p { font-size: 13.5px; }

.faq details { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; background: var(--panel); }
.faq summary { padding: 16px 18px; cursor: pointer; font-weight: 600; font-size: 15px; list-style: none; }
.faq summary::before { content: "+"; color: var(--truth); margin-right: 10px; font-weight: 700; }
.faq details[open] summary::before { content: "–"; }
.faq details p { padding: 0 18px 16px; font-size: 14px; }

footer { border-top: 1px solid var(--line); padding: 30px 0 50px; color: var(--muted); font-size: 13px; margin-top: 40px; }
footer a { color: var(--muted); }

@media (max-width: 640px) {
  .hero { padding: 40px 0 4px; }
  .card { height: 250px; }
}
