/* ==================== Design Tokens ==================== */
:root {
  --primary: #ec4899;
  --primary-dark: #db2777;
  --primary-light: #fdf2f8;
  --primary-lighter: #fef7fb;

  --accent: #a855f7;
  --accent-light: #faf5ff;

  --bg: #ffffff;
  --bg-section: #fafafa;
  --bg-card: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #555566;
  --text-muted: #8a8a9a;
  --border: #f1e8f0;
  --border-hover: #e8d8e6;

  --shadow-sm: 0 1px 3px rgba(236, 72, 153, 0.06);
  --shadow-md: 0 4px 16px rgba(236, 72, 153, 0.08);
  --shadow-lg: 0 8px 32px rgba(236, 72, 153, 0.1);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --container: 1140px;
  --header-h: 64px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
          "Noto Sans SC", sans-serif;

  --transition: 0.25s ease;
}

/* ==================== Dark Mode Tokens ==================== */
[data-theme="dark"] {
  --primary: #ec4899;
  --primary-dark: #db2777;
  --primary-light: rgba(236, 72, 153, 0.14);
  --primary-lighter: rgba(236, 72, 153, 0.07);

  --accent: #a855f7;
  --accent-light: rgba(168, 85, 247, 0.1);

  --bg: #0f0f1a;
  --bg-section: #15151f;
  --bg-card: #1a1a28;

  --text: #e4e4f0;
  --text-secondary: #a0a0b8;
  --text-muted: #6a6a80;

  --border: #2a2a3e;
  --border-hover: #3a3a52;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ==================== Reset ==================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

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

/* ==================== Container ==================== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ==================== Breadcrumb ==================== */
.breadcrumb {
  padding-top: calc(var(--header-h) + 16px);
  padding-bottom: 4px;
  background: var(--primary-lighter);
}

.breadcrumb-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.breadcrumb-item a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}

.breadcrumb-item a:hover {
  color: var(--primary);
}

.breadcrumb-item[aria-current="page"] {
  color: var(--text);
  font-weight: 500;
}

.breadcrumb-separator {
  display: flex;
  align-items: center;
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1;
}

/* ==================== Header ==================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

[data-theme="dark"] .site-header {
  background: rgba(15, 15, 26, 0.95);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  flex-shrink: 0;
}

.logo img {
  border-radius: var(--radius-sm);
}

.main-nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
  margin-right: 16px;
}

.main-nav a {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  position: relative;
}

.main-nav a:hover {
  color: var(--primary);
}

.header-download {
  flex-shrink: 0;
}

.menu-toggle {
  display: none;
  font-size: 24px;
  color: var(--text);
  padding: 4px;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 20px;
  flex-shrink: 0;
  transition: all var(--transition);
}

.theme-toggle:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* ==================== Buttons ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1.4;
}

.btn i {
  font-size: 20px;
}

.btn-sm {
  font-size: 14px;
  padding: 8px 18px;
}

.btn-lg {
  font-size: 17px;
  padding: 14px 36px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-outline {
  background: #fff;
  color: var(--primary);
  border: 2px solid var(--primary);
}

[data-theme="dark"] .btn-outline {
  background: var(--bg-card);
}

.btn-outline:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* ==================== Hero ==================== */
.hero-section {
  padding-top: calc(var(--header-h) + 60px);
  padding-bottom: 80px;
  background: linear-gradient(180deg, var(--primary-lighter) 0%, #fff 70%);
  overflow: hidden;
}

[data-theme="dark"] .hero-section {
  background: linear-gradient(180deg, var(--primary-lighter) 0%, var(--bg) 70%);
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 48px;
}

.hero-content {
  flex: 1;
}

.hero-content h1 {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 520px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 20px;
}

.hero-tag i {
  font-size: 16px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-image {
  flex-shrink: 0;
}

.hero-image img {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

/* ==================== Section ==================== */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-section);
}

/* ==================== Privacy Page ==================== */
.privacy-main {
  padding-top: calc(var(--header-h) + 40px);
  padding-bottom: 60px;
}

.privacy-main h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.privacy-update {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.privacy-main h2 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
}

.privacy-main p,
.privacy-main li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 8px;
}

.privacy-main ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.section-title {
  font-size: 30px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 48px;
}

/* ==================== Screenshots ==================== */
.screenshot-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 8px;
}

.screenshot-scroll::-webkit-scrollbar {
  display: none;
}

.screenshot-track {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.screenshot-item {
  flex-shrink: 0;
  scroll-snap-align: center;
}

.screenshot-item img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.screenshot-item figcaption {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
}

.screenshot-nav {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

.screenshot-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

[data-theme="dark"] .screenshot-btn {
  background: var(--bg-card);
}

.screenshot-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* ==================== Feature Grid ==================== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  transition: all var(--transition);
}

.feature-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==================== Scene Grid ==================== */
.scene-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.scene-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: all var(--transition);
}

.scene-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.scene-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
  color: var(--primary);
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.scene-card h3 {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 10px;
}

.scene-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ==================== Highlight Grid ==================== */
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.highlight-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all var(--transition);
}

.highlight-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.highlight-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-light);
  color: var(--accent);
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.highlight-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ==================== FAQ ==================== */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color var(--transition);
}

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

.faq-item summary {
  padding: 18px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
}

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

.faq-item summary::after {
  content: "\ea4e";
  font-family: "remixicon";
  font-size: 20px;
  color: var(--text-muted);
  transition: transform var(--transition);
}

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

.faq-answer {
  padding: 0 24px 18px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ==================== Download ==================== */
.download-section {
  background: linear-gradient(135deg, var(--primary-lighter) 0%, var(--accent-light) 100%);
  text-align: center;
  padding: 72px 0;
}

.download-inner h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}

.download-desc {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.download-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ==================== Footer ==================== */
.site-footer {
  background: var(--text);
  color: #fff;
  padding: 40px 0;
}

[data-theme="dark"] .site-footer {
  background: #08080f;
  color: #e4e4f0;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
}

.footer-brand img {
  border-radius: var(--radius-sm);
}

.footer-nav {
  display: flex;
  gap: 24px;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-copyright {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

/* ==================== Responsive ==================== */

/* Tablet */
@media (max-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-content h1 {
    font-size: 32px;
  }

  .hero-image img {
    width: 200px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 16px 20px;
    gap: 0;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }

  [data-theme="dark"] .main-nav {
    background: var(--bg);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 16px;
  }

  .main-nav a:last-child {
    border-bottom: none;
  }

  .header-download {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero-section {
    padding-top: calc(var(--header-h) + 40px);
  }

  .hero-inner {
    flex-direction: column;
    text-align: center;
    gap: 32px;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-tags {
    justify-content: center;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-image img {
    width: 220px;
    margin: 0 auto;
  }

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

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

  .section-title {
    font-size: 24px;
  }

  .section {
    padding: 56px 0;
  }

  .screenshot-track {
    justify-content: flex-start;
  }

  .screenshot-item img {
    width: 280px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* Small mobile */
@media (max-width: 390px) {
  .container {
    padding: 0 16px;
  }

  .hero-content h1 {
    font-size: 26px;
  }

  .hero-subtitle {
    font-size: 15px;
  }

  .btn {
    font-size: 14px;
    padding: 10px 20px;
  }

  .btn-lg {
    font-size: 15px;
    padding: 12px 28px;
  }

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

  .section-title {
    font-size: 22px;
  }

  .section {
    padding: 48px 0;
  }

  .screenshot-item img {
    width: 260px;
  }
}

/* Extra small */
@media (max-width: 320px) {
  .hero-content h1 {
    font-size: 22px;
  }

  .hero-tags {
    gap: 8px;
  }

  .hero-tag {
    font-size: 12px;
    padding: 5px 12px;
  }

  .screenshot-item img {
    width: 240px;
  }
}

/* ==================== Reduced Motion ==================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

/* ==================== Download Page ==================== */
.download-page {
  padding-top: 0;
}

.download-hero {
  text-align: center;
  padding: 60px 0 48px;
  background: linear-gradient(180deg, var(--primary-lighter) 0%, var(--bg) 70%);
}

[data-theme="dark"] .download-hero {
  background: linear-gradient(180deg, var(--primary-lighter) 0%, var(--bg) 70%);
}

.download-hero h1 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text);
}

.download-hero-desc {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.download-platforms {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.platform-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  text-align: center;
  width: 320px;
  transition: all var(--transition);
}

.platform-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.platform-icon {
  font-size: 56px;
  color: var(--primary);
  margin-bottom: 20px;
}

.platform-card h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.platform-version {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Steps Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: all var(--transition);
}

.step-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.step-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.step-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Changelog */
.changelog {
  max-width: 720px;
  margin: 0 auto;
}

.changelog-item {
  border-left: 3px solid var(--primary);
  padding: 0 0 24px 24px;
  margin-bottom: 8px;
  position: relative;
}

.changelog-item::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  position: absolute;
  left: -8px;
  top: 4px;
}

.changelog-version {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.version-tag {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
}

.version-date {
  font-size: 13px;
  color: var(--text-muted);
}

.changelog-item ul {
  list-style: none;
  padding: 0;
}

.changelog-item li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  padding-left: 20px;
  position: relative;
}

.changelog-item li::before {
  content: "-";
  position: absolute;
  left: 6px;
  color: var(--text-muted);
}

/* ==================== Download Page Responsive ==================== */
@media (max-width: 768px) {
  .download-hero h1 {
    font-size: 28px;
  }

  .download-platforms {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .platform-card {
    width: 100%;
    max-width: 360px;
    padding: 32px 24px;
  }

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