:root {
  --bg-deep: #06090c;
  --bg-card: #161c24;
  --bg-elevated: #1a222d;
  --gold: #d4af37;
  --gold-bright: #f5e6a8;
  --gold-dim: rgba(212, 175, 55, 0.15);
  --text: #ffffff;
  --text-muted: #a0aab8;
  --border: rgba(212, 175, 55, 0.25);
  --radius: 12px;
  --radius-lg: 20px;
  --font-display: "Ma Shan Zheng", "ZCOOL XiaoWei", serif;
  --font-body: "Noto Serif SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

a {
  color: var(--gold-bright);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  box-sizing: border-box;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 20, 25, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top, 0px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gold-bright);
  letter-spacing: 0.08em;
  text-decoration: none;
}

.logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
}

.logo:hover {
  text-decoration: none;
  color: #f0d060;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.nav a:hover {
  color: var(--text);
}

.nav-cta {
  padding: 8px 18px;
  background: linear-gradient(135deg, var(--gold) 0%, #a67c00 100%);
  color: #1a1508 !important;
  border-radius: 999px;
  font-weight: 700;
}

.nav-cta:hover {
  filter: brightness(1.08);
  text-decoration: none;
}

.header-actions {
  display: none;
  align-items: center;
  gap: 12px;
}

.header-download-btn {
  background: linear-gradient(135deg, #f5e6a8 0%, var(--gold) 100%);
  color: #1a1508;
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 768px) {
  .header-actions {
    display: flex;
  }
}

/* 汉堡按钮：默认隐藏，小屏由媒体查询显示 */
.nav-toggle {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--gold-bright);
  cursor: pointer;
  border-radius: 10px;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.nav-toggle-lines {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 22px;
  height: 16px;
}

.nav-toggle-lines span {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition:
    transform 0.25s ease,
    opacity 0.2s ease;
}

.site-header.nav-open .nav-toggle-lines span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.nav-open .nav-toggle-lines span:nth-child(2) {
  opacity: 0;
}

.site-header.nav-open .nav-toggle-lines span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* 平板/手机：全屏菜单 */
@media (max-width: 768px) {
  .header-inner {
    flex-wrap: nowrap;
    padding: 10px 0 12px;
    position: relative;
    height: 60px;
    box-sizing: border-box;
  }

  .logo {
    font-size: 1.45rem;
    position: relative;
    z-index: 201;
    gap: 8px;
    margin: 0;
  }

  .header-actions {
    display: flex;
    position: relative;
    z-index: 201;
    margin-left: auto;
  }

  .logo-img {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
  }

  .nav-toggle {
    display: inline-flex;
    position: relative;
    z-index: 201;
    margin-left: 8px;
  }

  .nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 200;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0;
    padding: 20px;
    background: #0a0e12;
    -webkit-overflow-scrolling: touch;
  }

  .site-header.nav-open .nav {
    display: flex;
  }

  .nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 280px;
    min-height: 64px;
    padding: 0;
    font-size: 1.25rem;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
  }

  .nav .nav-cta {
    margin-top: 30px;
    width: 100%;
    max-width: 280px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f5e6a8 0%, #d4af37 100%);
    color: #1a1508 !important;
    font-weight: 700;
    min-height: 56px;
    font-size: 1.1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-bottom: none;
  }

  .nav .nav-cta:hover,
  .nav .nav-cta:active {
    filter: brightness(1.06);
  }

  .nav-cta-ios {
    margin-top: 12px !important;
  }
}

/* Hero */
.hero {
  position: relative;
  padding: 48px 0 72px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(201, 162, 39, 0.12), transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(80, 120, 180, 0.08), transparent 50%),
    var(--bg-deep);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 28px;
  }

  .hero-actions,
  .hero-badges {
    justify-content: center;
  }

  .hero-art {
    order: -1;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    max-width: 320px;
    margin-inline: auto;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

.hero-logo-box {
  margin-bottom: 20px;
  display: flex;
  justify-content: flex-start;
}

@media (max-width: 900px) {
  .hero-logo-box {
    justify-content: center;
  }
}

.hero-logo-img {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
}

.eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 12px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 12vw, 5rem);
  font-weight: 900;
  margin: 0 0 16px;
  background: linear-gradient(135deg, #f5e6a8 0%, #d4af37 50%, #a67c00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.15em;
  text-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

@media (max-width: 900px) {
  .hero-copy {
    align-items: center;
  }
}

.lead {
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 32em;
}

@media (max-width: 900px) {
  .lead {
    margin-inline: auto;
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 32px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background: linear-gradient(135deg, #f5e6a8 0%, var(--gold) 50%, #8a6b00 100%);
  color: #1a1508;
  box-shadow: 0 8px 25px rgba(201, 162, 39, 0.4);
}

.btn-primary:active {
  transform: scale(0.96);
  box-shadow: 0 4px 12px rgba(201, 162, 39, 0.3);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.btn-ghost:active {
  transform: scale(0.96);
  background: rgba(255, 255, 255, 0.08);
}

.btn-large {
  min-height: 48px;
  padding: 14px 36px;
  font-size: 1.05rem;
}

.btn-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-disabled:hover {
  transform: none;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.hero-badges li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-badges li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

/* Hero art */
.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 420px;
}

.hero-card {
  position: absolute;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.hero-card-1 {
  width: 200px;
  height: 260px;
  top: 8%;
  left: 5%;
  transform: rotate(-8deg);
  opacity: 0.5;
}

.hero-card-2 {
  width: 180px;
  height: 240px;
  bottom: 10%;
  right: 8%;
  transform: rotate(10deg);
  opacity: 0.45;
}

.hero-phone {
  position: relative;
  z-index: 2;
  padding: 8px;
  background: #000;
  border-radius: 36px;
  border: 4px solid #1a222d;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  max-width: 320px;
  width: 100%;
}

.hero-phone img {
  border-radius: 28px;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

@media (max-width: 900px) {
  .hero-phone {
    max-width: 90%;
    margin: 0 auto;
    border-width: 3px;
    border-radius: 24px;
    padding: 6px;
  }

  .hero-phone img {
    border-radius: 18px;
  }
}

/* Sections */
.section {
  padding: 72px 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  text-align: center;
  margin: 0 0 12px;
  color: var(--text);
  font-weight: 700;
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  margin: 0 0 48px;
  font-size: 1rem;
}

/* Gallery */
.screens {
  background: linear-gradient(180deg, var(--bg-deep) 0%, #121820 50%, var(--bg-deep) 100%);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 700px) {
  .gallery {
    grid-template-columns: 1fr;
  }
}

.gallery-item {
  margin: 0;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.gallery-item:hover {
  border-color: var(--gold);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.gallery-item--wide {
  grid-column: 1 / -1;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.gallery-item figcaption {
  padding: 16px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  background: linear-gradient(to bottom, rgba(26, 34, 45, 0), rgba(26, 34, 45, 1));
  text-align: center;
}

/* Features */
.features {
  border-block: 1px solid var(--border);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.feature-card {
  padding: 28px 24px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.feature-card h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  color: var(--gold-bright);
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.feature-icon {
  display: block;
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 14px;
  opacity: 0.9;
}

/* Download */
.download {
  padding-bottom: 96px;
}

.download-logo-box {
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
}

.download-logo-img {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
}

.download-inner {
  text-align: center;
  max-width: 640px;
}

.download-hint {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0 0 28px;
  line-height: 1.7;
}

.download-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-bottom: 24px;
}

.version {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.version code {
  font-size: 0.85em;
  padding: 2px 8px;
  background: var(--bg-elevated);
  border-radius: 6px;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  padding: 40px 0 max(40px, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: #0c1014;
}

.footer-inner {
  text-align: center;
}

.footer-logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.footer-logo-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 4px;
  opacity: 0.8;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--gold);
  letter-spacing: 0.15em;
}

.footer-note {
  max-width: 560px;
  margin: 20px auto 16px;
  font-size: 0.75rem;
  line-height: 1.7;
  color: #5c6675;
}

.footer-copy {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* —— 手机与小屏 —— */
@media (max-width: 600px) {
  .hero-logo-img {
    width: 64px;
    height: 64px;
    border-radius: 14px;
  }

  .hero {
    padding: 20px 0 40px;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 12vw, 3.25rem);
  }

  .lead {
    font-size: 0.98rem;
  }

  .hero-art {
    min-height: 0;
  }

  .hero-card {
    display: none;
  }

  .hero-phone {
    max-width: 92%;
    margin: 0 auto;
    padding: 6px;
    background: #000;
    border-radius: 16px;
    border: 3px solid #1a222d;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  }

  .hero-phone img {
    border-radius: 12px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }

  .hero-badges {
    justify-content: center;
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .section {
    padding: 44px 0;
  }

  .section-sub {
    margin-bottom: 28px;
  }

  .gallery {
    gap: 20px;
    padding: 0 4px;
  }

  .gallery-item {
    border-radius: 16px;
    background: #161c24;
    border: 1px solid rgba(255, 255, 255, 0.05);
  }

  .gallery-item img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #000;
  }

  .gallery-item:not(.gallery-item--wide) img {
    aspect-ratio: 16 / 9;
    max-height: none;
    width: 100%;
    object-fit: cover;
  }

  .gallery-item figcaption {
    padding: 12px;
    font-size: 0.9rem;
    color: var(--text-muted);
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .feature-card {
    padding: 22px 18px;
  }

  .download-logo-img {
    width: 80px;
    height: 80px;
    border-radius: 16px;
  }

  .download {
    padding-bottom: max(64px, env(safe-area-inset-bottom, 0px));
  }

  .download-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .download-buttons .btn-large,
  .download-buttons .btn-disabled {
    width: 100%;
    justify-content: center;
  }

  .version {
    padding: 0 4px;
    line-height: 1.6;
    word-break: break-all;
  }

  .version code {
    word-break: break-all;
  }
}
