/* ==========================================================
   KiraTale — Landing Page
   International dark theme · RU / EN / ZH
   ========================================================== */

:root {
  --bg: #050405;
  --bg-soft: #120c0e;
  --surface: rgba(255, 246, 243, 0.055);
  --surface-strong: rgba(255, 246, 243, 0.1);
  --border: rgba(255, 246, 243, 0.09);
  --border-strong: rgba(255, 246, 243, 0.16);

  --text: #fff6f3;
  --text-2: rgba(255, 246, 243, 0.64);
  --text-3: rgba(255, 246, 243, 0.4);

  --accent: #c72039;
  --accent-2: #f0546d;
  --accent-gradient: linear-gradient(135deg, #c72039 0%, #f0546d 100%);
  --accent-soft: rgba(199, 32, 57, 0.16);
  --accent-light: #ffbac1;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  --blur: saturate(160%) blur(18px);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI',
    Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', sans-serif;

  --max: 1140px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

/* ---------- 首屏分区 ---------- */
.hero-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(1200px 720px at 14% -16%, rgba(199, 32, 57, 0.46), transparent 62%),
    radial-gradient(820px 520px at 86% 106%, rgba(199, 32, 57, 0.24), transparent 65%),
    radial-gradient(900px 580px at 95% -10%, rgba(255, 186, 193, 0.2), transparent 60%),
    linear-gradient(180deg, #33151d 0%, #27121a 45%, #1d0d13 100%);
}

/* 细腻噪点质感 */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 通用容器 ---------- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(16, 9, 11, 0.72);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.site-header.scrolled {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
  border-bottom-color: var(--border-strong);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  box-shadow: 0 6px 18px rgba(199, 32, 57, 0.36);
}

.site-nav {
  display: flex;
  gap: 26px;
  margin-right: auto;
}

.site-nav a {
  font-size: 14px;
  color: var(--text-2);
  transition: color 0.2s ease;
}

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

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* 语言切换 */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.lang-btn {
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-3);
  transition: all 0.2s ease;
}

.lang-btn:hover {
  color: var(--text-2);
}

.lang-btn.active {
  color: #fff;
  background: var(--surface-strong);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  color: #fff;
  background: var(--accent-gradient);
  box-shadow: 0 10px 30px rgba(199, 32, 57, 0.32);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(199, 32, 57, 0.42);
}

.btn-ghost {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  backdrop-filter: var(--blur);
}

.btn-ghost:hover {
  background: var(--surface-strong);
}

.btn-sm {
  height: 36px;
  padding: 0 16px;
  font-size: 13px;
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 64px;
  padding: 104px 0 112px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: #ffd6dc;
  background: var(--accent-soft);
  border: 1px solid rgba(199, 32, 57, 0.3);
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.hero h1 {
  margin-top: 22px;
  font-size: clamp(34px, 4.6vw, 58px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  background: linear-gradient(180deg, #fff6f3 30%, rgba(255, 246, 243, 0.6) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p.lead {
  margin-top: 20px;
  max-width: 520px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-stats {
  display: flex;
  gap: 36px;
  margin-top: 46px;
}

.hero-stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-stats strong {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-stats span {
  font-size: 12.5px;
  color: var(--text-3);
}

/* ---------- 手机模型 ---------- */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  perspective: 1400px;
}

/* 手机背后聚光 */
.hero-visual::before {
  content: '';
  position: absolute;
  top: 46%;
  left: 50%;
  width: 620px;
  height: 620px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(199, 32, 57, 0.26), transparent 62%);
  filter: blur(6px);
  pointer-events: none;
  z-index: 0;
}

.phone {
  position: relative;
  z-index: 1;
  position: relative;
  width: 300px;
  height: 610px;
  border-radius: 46px;
  padding: 9px;
  background: linear-gradient(160deg, #26262f 0%, #101016 55%, #1c1c24 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 50px 110px rgba(0, 0, 0, 0.72),
    0 0 90px rgba(199, 32, 57, 0.14);
  transform: rotateY(-8deg) rotateX(3deg);
  transition: transform 0.6s ease;
}

.phone:hover {
  transform: rotateY(-3deg) rotateX(1deg) translateY(-6px);
}

.phone::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 84px;
  height: 24px;
  border-radius: 999px;
  background: #0a0809;
  z-index: 3;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 38px;
  overflow: hidden;
  background: #000;
}

.still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.still.active {
  opacity: 1;
}

.screen-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 4, 8, 0) 38%, rgba(4, 4, 8, 0.92) 100%);
}

.screen-ui {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 22px;
  color: #fff;
}

.screen-ui .chip {
  display: inline-block;
  height: 21px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 21px;
  background: var(--accent-gradient);
}

.screen-title {
  margin-top: 9px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.screen-sub {
  margin-top: 3px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.62);
}

/* ---------- Section ---------- */
.section {
  padding: 92px 0;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 52px;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.18;
}

.section-head p {
  margin-top: 14px;
  font-size: 15.5px;
  color: var(--text-2);
}

/* 特性卡片 */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.card {
  position: relative;
  padding: 28px 24px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: var(--blur);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.075);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--accent-soft);
  border: 1px solid rgba(199, 32, 57, 0.24);
  margin-bottom: 18px;
}

.card h3 {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card p {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-2);
}

/* 分类 */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.cat {
  position: relative;
  height: 118px;
  border-radius: var(--r-md);
  display: flex;
  align-items: flex-end;
  padding: 16px;
  font-size: 15px;
  font-weight: 700;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.25s ease;
}

.cat:hover {
  transform: translateY(-3px) scale(1.01);
}

.cat::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.9;
  transition: opacity 0.25s ease;
}

.cat:hover::before {
  opacity: 1;
}

.cat span {
  position: relative;
  z-index: 1;
}

.cat-1::before {
  background:
    linear-gradient(150deg, rgba(10, 3, 4, 0.22), rgba(10, 3, 4, 0.62)),
    url('./img/cat/cat-1.jpg') center/cover no-repeat;
}
.cat-2::before {
  background:
    linear-gradient(150deg, rgba(10, 3, 4, 0.18), rgba(10, 3, 4, 0.6)),
    url('./img/cat/cat-2.jpg') center/cover no-repeat;
}
.cat-3::before {
  background:
    linear-gradient(150deg, rgba(10, 3, 4, 0.2), rgba(10, 3, 4, 0.62)),
    url('./img/cat/cat-3.jpg') center/cover no-repeat;
}
.cat-4::before {
  background:
    linear-gradient(150deg, rgba(10, 3, 4, 0.18), rgba(10, 3, 4, 0.6)),
    url('./img/cat/cat-4.jpg') center/cover no-repeat;
}
.cat-5::before {
  background:
    linear-gradient(150deg, rgba(10, 3, 4, 0.18), rgba(10, 3, 4, 0.6)),
    url('./img/cat/cat-5.jpg') center/cover no-repeat;
}
.cat-6::before {
  background:
    linear-gradient(150deg, rgba(10, 3, 4, 0.25), rgba(10, 3, 4, 0.68)),
    url('./img/cat/cat-6.jpg') center/cover no-repeat;
}
.cat-7::before {
  background:
    linear-gradient(150deg, rgba(10, 3, 4, 0.18), rgba(10, 3, 4, 0.58)),
    url('./img/cat/cat-7.jpg') center/cover no-repeat;
}
.cat-8::before {
  background:
    linear-gradient(150deg, rgba(10, 3, 4, 0.15), rgba(10, 3, 4, 0.55)),
    url('./img/cat/cat-8.jpg') center/cover no-repeat;
}

/* ---------- 收费档位 ---------- */
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.plan {
  position: relative;
  padding: 32px 26px 28px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(28, 12, 16, 0.86), rgba(12, 6, 8, 0.92));
  border: 1px solid rgba(200, 100, 110, 0.14);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.plan:hover {
  transform: translateY(-4px);
  border-color: rgba(240, 84, 109, 0.35);
}

.plan-featured {
  border-color: rgba(240, 84, 109, 0.55);
  box-shadow:
    0 18px 60px rgba(199, 32, 57, 0.18),
    inset 0 0 0 1px rgba(240, 84, 109, 0.18);
  background: linear-gradient(160deg, rgba(54, 14, 22, 0.92), rgba(18, 6, 10, 0.96));
}

.plan-hot {
  position: absolute;
  top: -12px;
  right: 20px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(90deg, #c72039, #f0546d);
  box-shadow: 0 6px 18px rgba(199, 32, 57, 0.35);
}

.plan-badge {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  color: var(--rose);
  letter-spacing: -0.02em;
}

.plan-vip {
  color: var(--gold, #d9b050);
}

.plan h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff6f3;
}

.plan-price {
  margin: 4px 0 18px;
  font-size: 12px;
  color: rgba(255, 246, 243, 0.55);
  letter-spacing: 0.02em;
}

.plan-features {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.plan-features li {
  position: relative;
  padding-left: 22px;
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 246, 243, 0.78);
}

.plan-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--crimson);
  border-bottom: 2px solid var(--crimson);
  transform: rotate(-45deg);
  opacity: 0.9;
}

.plan-cta {
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  text-align: center;
  color: #fff6f3;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
}

.plan-cta:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 186, 193, 0.35);
}

.plan-cta-primary {
  background: var(--accent-gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 26px rgba(199, 32, 57, 0.3);
}

.plan-cta-primary:hover {
  background: linear-gradient(135deg, #d82e48, #ff637f);
  border-color: transparent;
}

/* 步骤 */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 30px 26px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

.step-num {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 16px;
}

.step h3 {
  font-size: 17px;
  font-weight: 700;
}

.step p {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-2);
}

/* ---------- CTA ---------- */
.cta-card {
  position: relative;
  padding: 64px 40px;
  border-radius: var(--r-xl);
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(90% 130% at 50% 0%, rgba(199, 32, 57, 0.32) 0%, transparent 65%),
    linear-gradient(180deg, #16161f 0%, #0c0c12 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

.cta-card h2 {
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.cta-card p {
  margin: 14px auto 0;
  max-width: 520px;
  font-size: 15px;
  color: var(--text-2);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
}

.store-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 26px;
}

.store-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 20px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-strong);
  transition: background 0.2s ease, transform 0.2s ease;
}

.store-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.store-btn b {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
}

.store-btn small {
  display: block;
  font-size: 10.5px;
  color: var(--text-3);
  line-height: 1.2;
  text-align: left;
}

.cta-note {
  margin-top: 22px;
  font-size: 12.5px;
  color: var(--text-3);
}

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.25s ease;
}

.faq-item[open] {
  border-color: var(--border-strong);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 400;
  color: var(--text-2);
  background: var(--surface-strong);
  transition: transform 0.25s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item .faq-a {
  padding: 0 22px 22px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
}

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 44px 0 54px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-tagline {
  font-size: 13px;
  color: var(--text-3);
}

.footer-links {
  display: flex;
  gap: 22px;
  font-size: 13px;
  color: var(--text-2);
}

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

.footer-rights {
  margin-top: 28px;
  font-size: 12px;
  color: var(--text-3);
}

/* ---------- 滚动出现 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 56px;
    padding: 64px 0 72px;
    text-align: center;
  }

  .hero p.lead {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions,
  .hero-stats {
    justify-content: center;
  }

  .phone {
    transform: none;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .plans {
    grid-template-columns: repeat(2, 1fr);
  }

  .site-nav {
    display: none;
  }
}

@media (max-width: 680px) {
  .header-inner {
    gap: 14px;
  }

  .header-right .btn {
    display: none;
  }

  .lang-btn {
    padding: 0 9px;
  }

  .hero {
    padding: 48px 0 60px;
  }

  .hero-stats {
    gap: 24px;
  }

  .section {
    padding: 64px 0;
  }

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

  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .plans {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cta-card {
    padding: 44px 22px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .phone {
    width: 262px;
    height: 534px;
  }
}

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

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

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

/* ---------- Prelaunch Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.modal.is-open {
  opacity: 1;
  pointer-events: auto;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 12, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal-card {
  position: relative;
  width: min(700px, 100%);
  background: #151014;
  border: 1px solid rgba(199, 32, 57, 0.28);
  border-radius: 18px;
  padding: 26px 32px 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(240, 84, 109, 0.08) inset;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.3, 1.1);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.modal-card::-webkit-scrollbar {
  width: 0;
  height: 0;
}
.modal.is-open .modal-card {
  transform: translateY(0) scale(1);
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 246, 243, 0.06);
  color: var(--text-3);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.modal-close:hover { background: rgba(255, 246, 243, 0.14); color: var(--text-1); }

.modal-badge {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--brand), var(--brand-soft));
  color: #fff;
  margin-bottom: 8px;
}
.modal-card h3 {
  font-size: 21px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.modal-sub {
  font-size: 13.5px;
  color: var(--text-2);
  margin: 0 0 16px;
  line-height: 1.5;
}

.prelaunch-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}
.prelaunch-form .field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.prelaunch-form .field > span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-3);
  text-transform: uppercase;
}
.prelaunch-form input,
.prelaunch-form select,
.prelaunch-form textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 246, 243, 0.12);
  background: rgba(8, 8, 12, 0.6);
  color: var(--text-1);
  font: inherit;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.prelaunch-form textarea { resize: none; height: 46px; min-height: 46px; padding-top: 12px; }
.prelaunch-form input,
.prelaunch-form textarea { height: 46px; }
.prelaunch-form input:focus,
.prelaunch-form select:focus,
.prelaunch-form textarea:focus {
  border-color: var(--brand-soft);
  box-shadow: 0 0 0 3px rgba(240, 84, 109, 0.18);
  background: rgba(8, 8, 12, 0.8);
}
.prelaunch-form select option { background: #151014; color: var(--text-1); }

.modal-submit {
  margin-top: 2px;
  justify-content: center;
}
.modal-hint {
  font-size: 11.5px;
  color: var(--text-3);
  margin: 0;
  align-self: center;
  line-height: 1.4;
}

.modal-success {
  text-align: center;
  padding: 0;
}
.modal.is-success .modal-sub {
  display: none;
}
/* 首页弹窗：进入「已生成」态后隐藏表单态标题，避免两个标题叠加 */
#prelaunchModal.is-success .modal-head {
  display: none;
}
#prelaunchModal .modal-success h3 {
  margin-bottom: 10px;
}
.modal-success-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-soft));
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin: 0 auto 8px;
  box-shadow: 0 8px 24px rgba(199, 32, 57, 0.35);
}
.modal-success p {
  margin: 0 0 10px;
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.45;
}

/* 邮箱直达区 */
.mail-target {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: rgba(199, 32, 57, 0.1);
  border: 1px solid rgba(240, 84, 109, 0.22);
}
.mail-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
}
.mail-address {
  flex: 1 1 auto;
  font-size: 15px;
  font-weight: 600;
  color: var(--brand-soft);
  text-decoration: none;
  word-break: break-all;
}
.mail-address:hover {
  color: #fff;
  text-decoration: underline;
}
.copy-btn {
  flex: 0 0 auto;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 246, 243, 0.18);
  background: rgba(255, 246, 243, 0.06);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}
.copy-btn:hover {
  border-color: rgba(240, 84, 109, 0.5);
  color: var(--text-1);
}
.copy-btn.is-copied {
  border-color: var(--brand-soft);
  background: rgba(240, 84, 109, 0.18);
  color: #fff;
}
.modal-success .mail-target {
  margin: 0;
  justify-content: center;
}

/* 邮件内容预览 */
.mail-preview {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(8, 8, 12, 0.65);
  border: 1px dashed rgba(255, 246, 243, 0.16);
  color: var(--text-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 84px;
  overflow: hidden;
  text-align: left;
}

/* 窄屏：弹窗单列 */
@media (max-width: 620px) {
  .modal-card {
    padding: 22px 18px 18px;
  }
  .prelaunch-form {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .modal-hint {
    text-align: center;
  }
  .mail-preview {
    max-height: 96px;
  }
  .mail-target {
    gap: 8px;
  }
}

/* ---------- 成功态：两步引导（首页 & 招商页共用） ---------- */
.send-steps {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.send-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 246, 243, 0.14);
  background: rgba(255, 246, 243, 0.03);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.send-step:hover {
  border-color: rgba(240, 84, 109, 0.34);
  background: rgba(240, 84, 109, 0.06);
}

.step-num {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  margin: 0;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--accent-gradient);
  box-shadow: 0 4px 12px rgba(199, 32, 57, 0.3);
}

.step-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  color: var(--text-1);
}

.step-btn {
  flex: 0 0 auto;
  height: 32px !important;
  min-width: 64px;
  padding: 0 14px;
  margin: 0 !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.step-btn:hover {
  transform: none !important;
}

.step-btn.is-copied {
  border-color: var(--brand-soft);
  background: rgba(240, 84, 109, 0.24);
  color: #fff;
}

@media (max-width: 560px) {
  .send-step {
    gap: 10px;
    padding: 8px 12px;
  }
  .step-btn {
    min-width: 56px;
    height: 30px !important;
    padding: 0 12px;
    font-size: 12.5px;
  }
}

/* ---------- 通用移动端：加大水平留白 + 长文本 badge 换行保护 ---------- */
@media (max-width: 720px) {
  .site-header .wrap,
  .site-footer .wrap,
  .wrap {
    padding-left: 28px;
    padding-right: 28px;
  }
  .p-hero .badge,
  .hero .badge,
  .p-hero-inner .badge {
    position: relative;
    display: block;
    max-width: 100%;
    height: auto;
    min-height: 30px;
    padding: 7px 14px 7px 26px;
    line-height: 1.45;
    font-size: 11.5px;
    border-radius: 14px;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .p-hero .badge::before,
  .hero .badge::before,
  .p-hero-inner .badge::before {
    position: absolute;
    left: 12px;
    top: 14px;
    transform: none;
  }
}
