:root {
  --bg: #0f0e0c;
  --bg-elevated: #1a1814;
  --bg-card: #221f1a;
  --border: #3d3830;
  --text: #f5f0e8;
  --text-muted: #a89f91;
  --accent: #c9a227;
  --accent-hover: #e0b83a;
  --green: #3d9a6a;
  --green-bg: rgba(61, 154, 106, 0.12);
  --red-soft: #c45c4a;
  --warn-bg: rgba(201, 162, 39, 0.15);
  --radius: 12px;
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --max: 1080px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

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

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(15, 14, 12, 0.92);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
  text-decoration: none;
}
.logo span { color: var(--accent); }
.logo:hover { text-decoration: none; color: var(--text); }

.nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.nav a {
  color: var(--text-muted);
  font-size: 0.92rem;
  text-decoration: none;
}
.nav a:hover, .nav a.active { color: var(--accent); }

.badge-demo {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--warn-bg);
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  vertical-align: middle;
}

/* Hero */
.hero {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(201, 162, 39, 0.18), transparent);
}

.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.35rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1rem;
  max-width: 18em;
}

.hero .lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 38em;
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.35rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: #1a1508;
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #1a1508;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-cta {
  background: var(--green);
  color: #fff;
  width: 100%;
  margin-top: 0.75rem;
}
.btn-cta:hover { background: #4bb07a; color: #fff; }

/* Sections */
.section { padding: 2.75rem 0; }
.section-title {
  font-size: 1.45rem;
  margin-bottom: 0.5rem;
}
.section-sub {
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  max-width: 40em;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.mode-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
}
.mode-card .step {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.mode-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}
.mode-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.platform-tag {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Alert / disclaimer banner */
.alert {
  background: var(--warn-bg);
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.alert strong { color: var(--accent); }

/* Product cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s;
}
.card:hover { border-color: rgba(201, 162, 39, 0.5); }

.card-visual {
  height: 140px;
  background: linear-gradient(135deg, #2a261f 0%, #1a1814 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-bottom: 1px solid var(--border);
}
.card-visual .icon-label {
  font-size: 2.5rem;
  opacity: 0.85;
}
.card-visual .badge-demo {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
}

.card-body {
  padding: 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-brand {
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
  line-height: 1.35;
}

.card-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.price-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.price-box {
  background: var(--bg-elevated);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
}
.price-box .label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.price-box .platform {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.price-box .amount {
  font-size: 1.1rem;
  font-weight: 700;
}
.price-box.low .amount { color: var(--green); }
.price-box.high .amount { color: var(--text-muted); }

.spread {
  background: var(--green-bg);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.spread .spread-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.spread .spread-val {
  font-weight: 700;
  color: var(--green);
  font-size: 1.05rem;
}

.cps-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.card-footer-link {
  margin-top: auto;
  padding-top: 0.5rem;
}
.card-footer-link a {
  font-size: 0.85rem;
}

/* Detail page */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .detail-layout {
    grid-template-columns: 1fr 1.2fr;
  }
}

.detail-visual {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  position: relative;
}
.detail-visual .badge-demo {
  position: absolute;
  top: 1rem;
  left: 1rem;
}

.detail-info h1 {
  font-size: 1.5rem;
  margin: 0.5rem 0 0.75rem;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.92rem;
}
.compare-table th,
.compare-table td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.compare-table th {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.8rem;
}
.compare-table .highlight { color: var(--green); font-weight: 700; }

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }

/* Disclaimer page */
.prose {
  max-width: 42em;
}
.prose h1 { font-size: 1.75rem; margin-bottom: 1rem; }
.prose h2 {
  font-size: 1.2rem;
  margin: 1.75rem 0 0.65rem;
  color: var(--accent);
}
.prose p, .prose li {
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.prose ul { padding-left: 1.25rem; margin-bottom: 1rem; }
.prose li { margin-bottom: 0.4rem; }

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 2rem 0 1.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
}
.footer-brand { font-weight: 600; color: var(--text); margin-bottom: 0.35rem; }
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-note {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  line-height: 1.5;
}

.page-header {
  padding: 2rem 0 0.5rem;
}
.page-header h1 {
  font-size: 1.75rem;
  margin-bottom: 0.4rem;
}
.page-header p { color: var(--text-muted); }


/* Language switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
}
.lang-switcher-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.lang-switcher select {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  font-size: 0.85rem;
  max-width: 11rem;
  cursor: pointer;
}
.lang-switcher select:focus {
  outline: 1px solid var(--accent);
  border-color: var(--accent);
}

@media (max-width: 720px) {
  .header-inner { align-items: flex-start; }
  .lang-switcher { width: 100%; margin-left: 0; justify-content: flex-end; }
}

/* Soft toast (Coming soon) */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%) translateY(120%);
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 0.85rem 1.2rem;
  font-size: 0.92rem;
  max-width: min(92vw, 420px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
  z-index: 200;
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
}
.toast.toast-show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* RTL */
html[dir="rtl"] body { direction: rtl; }
html[dir="rtl"] .nav { flex-direction: row-reverse; }
html[dir="rtl"] .header-inner { flex-direction: row-reverse; }
html[dir="rtl"] .lang-switcher { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .price-row,
html[dir="rtl"] .mode-grid,
html[dir="rtl"] .cards { direction: rtl; }
html[dir="rtl"] .breadcrumb { direction: rtl; }
html[dir="rtl"] .prose ul { padding-left: 0; padding-right: 1.25rem; }
html[dir="rtl"] .footer-inner { direction: rtl; }
html[dir="rtl"] .spread { flex-direction: row-reverse; }
html[dir="rtl"] .card-visual .badge-demo,
html[dir="rtl"] .detail-visual .badge-demo {
  left: auto;
  right: 0.75rem;
}

/* Hide legacy cps-note if any remain */
.cps-note { display: none; }
