/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-deep: #06060c;
  --bg-surface: #0d0d16;
  --bg-card: #12121e;
  --text-primary: #f0f0f5;
  --text-secondary: #8a8a9a;
  --accent: #e63946;
  --accent-glow: rgba(230, 57, 70, 0.3);
  --border: rgba(255, 255, 255, 0.06);
  --font-display: 'Space Grotesk', 'Noto Sans SC', sans-serif;
  --font-body: 'Noto Sans SC', sans-serif;
  --radius: 12px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 2rem;
  transition: var(--transition);
  backdrop-filter: blur(0px);
}

.nav.scrolled {
  background: rgba(6, 6, 12, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo-img {
  height: 36px;
  width: auto;
  border-radius: 6px;
  transition: var(--transition);
}

.nav-logo:hover .nav-logo-img {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
}

.nav-link:hover { color: var(--text-primary); }
.nav-link:hover::after { width: 100%; }

/* ===== Hero ===== */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 8rem 2rem 4rem;
  gap: 4rem;
}

.hero-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(230, 57, 70, 0.1);
  border: 1px solid rgba(230, 57, 70, 0.3);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.title-line { display: block; }
.title-line.accent { color: var(--accent); }

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 480px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 3rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 24px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow);
  background: #d62f3c;
}

.btn-ghost {
  color: var(--text-secondary);
  border: 1px solid var(--border);
  background: transparent;
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
}

.btn-lg {
  padding: 1.1rem 2.4rem;
  font-size: 1.05rem;
}

.btn-win {
  background: rgba(0, 120, 212, 0.12);
  color: #4db8ff;
  border: 1px solid rgba(0, 120, 212, 0.35);
  box-shadow: 0 4px 20px rgba(0, 120, 212, 0.15);
}

.btn-win:hover {
  background: rgba(0, 120, 212, 0.22);
  border-color: rgba(0, 120, 212, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 120, 212, 0.25);
  color: #7fccff;
}

.download-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 0.5rem;
}

/* Stats */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.stat { text-align: left; }

.stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-suffix {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* Hero Visual */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo-wrap {
  position: relative;
  width: 320px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo {
  width: 260px;
  height: 260px;
  object-fit: contain;
  border-radius: 24px;
  position: relative;
  z-index: 2;
  animation: float 6s ease-in-out infinite;
}

.logo-glow {
  position: absolute;
  inset: 20%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(40px);
  animation: pulse 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.1); }
}

/* ===== Sections Common ===== */
section {
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-tag {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: rgba(230, 57, 70, 0.08);
  border: 1px solid rgba(230, 57, 70, 0.2);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 0.8rem;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* ===== Features ===== */
.features {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(230, 57, 70, 0.2);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.feature-card:hover::before { opacity: 1; }

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(230, 57, 70, 0.08);
  border-radius: 10px;
  color: var(--accent);
  margin-bottom: 1.2rem;
}

.feature-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.feature-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ===== Download ===== */
.download {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.download-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4rem;
  position: relative;
  overflow: hidden;
}

.download-inner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  opacity: 0.15;
  pointer-events: none;
}

.download-text .section-title {
  text-align: left;
}

.download-text .section-desc {
  margin-bottom: 2rem;
}

.download-note {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.download-qr {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

.qr-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.qr-img {
  width: 180px;
  height: 180px;
  object-fit: contain;
}

.qr-label {
  margin-top: 0.8rem;
  font-size: 0.85rem;
  color: #333;
  font-weight: 500;
}

/* ===== About ===== */
.about {
  padding: 6rem 2rem;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-text {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 2;
  margin-top: 1.5rem;
}

/* ===== Footer ===== */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  height: 28px;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition);
}

.footer-links a:hover { color: var(--text-primary); }

/* ===== Reveal Animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 6rem;
    gap: 2rem;
  }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { order: -1; }
  .hero-logo-wrap { width: 200px; height: 200px; }
  .hero-logo { width: 160px; height: 160px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .download-inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 3rem 2rem;
  }
  .download-text .section-title { text-align: center; }
  .download-buttons { justify-content: center; }
}

@media (max-width: 600px) {
  .features-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 1.2rem; }
  .hero-stats { flex-direction: column; gap: 1rem; }
  .stat-divider { width: 32px; height: 1px; }
  .footer-inner { flex-direction: column; gap: 1.5rem; text-align: center; }
  .download-buttons { flex-direction: column; align-items: stretch; }
  .download-buttons .btn { justify-content: center; }
  .download-card { padding: 2.5rem 1.5rem; }
  .ios-tip { white-space: normal; width: 90%; text-align: center; border-radius: 12px; }
}

/* ===== Download Landing Page ===== */
.download-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
}

.download-card {
  width: 100%;
  max-width: 560px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.download-card::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  opacity: 0.18;
  pointer-events: none;
}

.card-logo {
  width: 84px;
  height: 84px;
  object-fit: contain;
  border-radius: 18px;
  margin-bottom: 1rem;
  position: relative;
  animation: float 6s ease-in-out infinite;
}

.card-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  position: relative;
}

.card-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  position: relative;
}

.download-card .download-buttons {
  justify-content: center;
  flex-direction: column;
  align-items: stretch;
  gap: 0.8rem;
  position: relative;
}

.download-card .download-buttons .btn {
  justify-content: center;
}

.download-card .download-note {
  position: relative;
}

/* iOS notice (APK is Android-only) */
.ios-tip {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  z-index: 2000;
  background: rgba(230, 57, 70, 0.92);
  color: #fff;
  font-size: 0.9rem;
  padding: 0.7rem 1.4rem;
  border-radius: 100px;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(230, 57, 70, 0.35);
}

/* ===== WeChat Browser Guide Mask ===== */
.wechat-mask {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  cursor: pointer;
}

.wechat-mask.show {
  opacity: 1;
  visibility: visible;
}

.wechat-mask-content {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  color: var(--text-primary);
  pointer-events: none;
}

.wechat-arrow {
  width: 110px;
  height: 110px;
  margin-bottom: 0.5rem;
  animation: wechat-arrow-bounce 1.6s ease-in-out infinite;
}

.wechat-tip-title {
  font-size: 1.3rem;
  font-weight: 700;
}

.wechat-tip-title .wechat-dots {
  display: inline-block;
  padding: 0 0.35em;
  margin: 0 0.15em;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  letter-spacing: 2px;
}

.wechat-tip-desc {
  margin-top: 0.6rem;
  font-size: 1rem;
  color: var(--text-secondary);
}

@keyframes wechat-arrow-bounce {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(6px, -6px); }
}

/* ===== Privacy Policy ===== */
.policy-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(230, 57, 70, 0.16), transparent 28rem),
    radial-gradient(circle at 88% 14%, rgba(230, 57, 70, 0.08), transparent 24rem),
    var(--bg-deep);
}

.policy-page {
  width: min(100% - 2rem, 960px);
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.policy-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.4rem 2rem;
}

.policy-brand,
.policy-back {
  color: var(--text-primary);
  text-decoration: none;
}

.policy-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
}

.policy-logo {
  width: 34px;
  height: 34px;
  border-radius: 7px;
}

.policy-back {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: var(--transition);
}

.policy-back:hover,
.policy-contact a:hover { color: var(--accent); }

.policy-card {
  padding: clamp(1.5rem, 5vw, 4rem);
  background: rgba(18, 18, 30, 0.92);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.policy-intro {
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.policy-intro h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3.25rem);
  line-height: 1.2;
  margin-bottom: 0.6rem;
}

.policy-intro p,
.policy-card section > p,
.policy-card li { color: var(--text-secondary); }

.policy-card section + section { margin-top: 2.4rem; }

.policy-card h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
}

.policy-card ul { padding-left: 1.25rem; }
.policy-card li + li { margin-top: 0.5rem; }

.policy-table-wrap { overflow-x: auto; }

.policy-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.policy-table th,
.policy-table td {
  padding: 1rem;
  text-align: left;
  vertical-align: top;
  border: 1px solid var(--border);
}

.policy-table th {
  color: var(--text-primary);
  background: rgba(230, 57, 70, 0.1);
  font-weight: 700;
}

.policy-table td { color: var(--text-secondary); }
.policy-table td:first-child { color: var(--text-primary); font-weight: 500; }

.policy-contact {
  padding: 1.35rem 1.5rem;
  border: 1px solid rgba(230, 57, 70, 0.28);
  border-radius: 12px;
  background: rgba(230, 57, 70, 0.07);
}

.policy-contact a { color: #ff7580; transition: var(--transition); }

.policy-footer {
  padding: 2rem 0.4rem 0;
  color: var(--text-secondary);
  text-align: center;
  font-size: 0.8rem;
}

@media (max-width: 600px) {
  .policy-page { width: min(100% - 1.25rem, 960px); padding-top: 1.25rem; }
  .policy-header { padding-bottom: 1.25rem; }
  .policy-card { border-radius: 14px; }
  .policy-table th, .policy-table td { padding: 0.8rem; }
}
