/* ===== 基础变量 ===== */
:root {
  --bg-deep: #0a0608;
  --bg-card: rgba(20, 10, 12, 0.82);
  --bg-card-hover: rgba(32, 16, 18, 0.92);
  --gold: #e8b84a;
  --gold-light: #ffd875;
  --red: #c42b2b;
  --red-glow: rgba(196, 43, 43, 0.45);
  --orange: #ff6a2a;
  --text: #f5e8d8;
  --text-muted: #b8a898;
  --border: rgba(232, 184, 74, 0.28);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --header-h: 72px;
  --container: 1120px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  color: var(--text);
  background: var(--bg-deep);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(196, 43, 43, 0.22), transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(232, 184, 74, 0.08), transparent 55%),
    linear-gradient(180deg, #12080a 0%, #0a0608 45%, #050304 100%);
}

/* ===== 页头 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(8, 4, 6, 0.82);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.brand-logo img {
  width: auto;
  height: 48px;
  object-fit: contain;
}

.header-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.header-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.header-nav a:hover {
  color: var(--gold-light);
  border-color: var(--border);
  background: rgba(232, 184, 74, 0.08);
}

.nav-screenshots--pc {
  display: none;
}

/* ===== 主视觉 ===== */
.hero {
  position: relative;
  overflow: hidden;
  background: #000;
}

.hero-picture,
.hero-picture img {
  width: 100%;
}

.hero-picture img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.hero-carousel-wrap {
  display: none;
  padding: 20px 0 8px;
  background: #000;
}

.hero-carousel-wrap .container {
  max-width: var(--container);
}

.carousel--hero .carousel-viewport {
  border-radius: var(--radius);
}

.carousel--hero .carousel-dots {
  margin-top: 14px;
}

.hero-overlay {
  position: absolute;
  inset: auto 0 0;
  padding: 24px 16px 20px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  pointer-events: none;
}

.hero-tag {
  margin: 0;
  text-align: center;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  color: var(--gold-light);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* ===== 通用区块标题 ===== */
.section-head {
  text-align: center;
  margin-bottom: 28px;
}

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ===== 下载区 ===== */
.download-section {
  padding: 40px 0 36px;
}

.download-grid {
  display: grid;
  gap: 16px;
}

.download-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px 20px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.download-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.download-title,
.download-desc {
  display: block;
  max-width: 100%;
}

.download-card:hover {
  transform: translateY(-3px);
  background: var(--bg-card-hover);
  border-color: rgba(232, 184, 74, 0.55);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55), 0 0 24px var(--red-glow);
}

@media (hover: none) {
  .download-card:hover {
    transform: none;
    background: var(--bg-card);
    border-color: var(--border);
    box-shadow: var(--shadow);
  }

  .download-card--primary:hover {
    background: linear-gradient(145deg, rgba(196, 43, 43, 0.18), rgba(20, 10, 12, 0.88));
    border-color: rgba(232, 184, 74, 0.5);
  }
}

.download-card--primary {
  border-color: rgba(232, 184, 74, 0.5);
  background: linear-gradient(145deg, rgba(196, 43, 43, 0.18), rgba(20, 10, 12, 0.88));
}

.download-icon {
  font-size: 2rem;
  line-height: 1;
}

.download-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold-light);
}

.download-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.download-desc--mobile-tip {
  display: none;
  color: var(--orange);
}

.download-card--pc.download-card--mobile-blocked {
  border-color: rgba(255, 106, 42, 0.35);
}

.download-tip {
  margin: 18px 0 0;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(184, 168, 152, 0.65);
}

/* ===== 游戏介绍 ===== */
.intro-section {
  padding: 36px 0 44px;
}

.intro-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.intro-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px 16px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.intro-num {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold-light);
  background: linear-gradient(135deg, rgba(196, 43, 43, 0.35), rgba(232, 184, 74, 0.15));
  border: 1px solid rgba(232, 184, 74, 0.25);
}

.intro-item p {
  margin: 0;
  padding-top: 6px;
  font-size: 0.98rem;
}

.intro-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 24px;
}

.intro-highlights span {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--gold-light);
  background: rgba(196, 43, 43, 0.15);
  border: 1px solid rgba(232, 184, 74, 0.22);
}

/* ===== 截图轮播 ===== */
.gallery-section {
  padding: 36px 0 56px;
}

.carousel {
  position: relative;
}

.carousel-viewport {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #000;
  box-shadow: var(--shadow);
}

.carousel-track {
  display: flex;
  transition: transform 0.45s ease;
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 100%;
  margin: 0;
}

.carousel-slide img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(8, 4, 6, 0.78);
  color: var(--gold-light);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.carousel-btn:hover {
  background: rgba(196, 43, 43, 0.35);
  border-color: rgba(232, 184, 74, 0.55);
}

.carousel-btn--prev {
  left: 12px;
}

.carousel-btn--next {
  right: 12px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(184, 168, 152, 0.35);
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.carousel-dot--active {
  background: var(--gold-light);
  transform: scale(1.15);
}

/* ===== 页脚 ===== */
.site-footer {
  padding: 32px 0 calc(32px + var(--safe-bottom));
  border-top: 1px solid var(--border);
  background: rgba(5, 3, 4, 0.9);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.footer-logo img {
  width: auto;
  height: 56px;
  object-fit: contain;
  opacity: 0.92;
}

.footer-inner p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-download {
  margin-top: 4px;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--gold-light);
  border: 1px solid var(--border);
  transition: background 0.2s, border-color 0.2s;
}

.footer-download:hover {
  background: rgba(232, 184, 74, 0.1);
  border-color: rgba(232, 184, 74, 0.5);
}

/* ===== 提示条 ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--safe-bottom));
  z-index: 200;
  width: min(calc(100% - 32px), 420px);
  padding: 14px 18px;
  border-radius: 12px;
  text-align: center;
  font-size: 0.92rem;
  color: var(--text);
  background: rgba(20, 10, 12, 0.96);
  border: 1px solid rgba(255, 106, 42, 0.45);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast--visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ===== 手机 (<768px) ===== */
@media (max-width: 767px) {
  :root {
    --header-h: 56px;
  }

  .main-content {
    display: flex;
    flex-direction: column;
  }

  /* 下载区置顶，确保首屏可见 */
  .download-section {
    order: 1;
    padding: 12px 0 16px;
  }

  .hero {
    order: 2;
  }

  .intro-section {
    order: 3;
  }

  .gallery-section {
    order: 4;
  }

  .brand-logo img {
    height: 40px;
    max-width: 40px;
  }

  .header-nav {
    gap: 4px;
  }

  .header-nav a {
    padding: 6px 10px;
    font-size: 0.78rem;
  }

  .download-section .section-head {
    margin-bottom: 12px;
  }

  .download-section .section-head h2 {
    font-size: 1.25rem;
    color: var(--gold-light);
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
  }

  .download-section .section-head p {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .download-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .download-card {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 14px 16px;
    min-height: auto;
  }

  .download-body {
    flex: 1;
    align-items: flex-start;
    gap: 4px;
    text-align: left;
  }

  .download-icon {
    flex-shrink: 0;
    font-size: 1.6rem;
    line-height: 1;
  }

  .download-title {
    font-size: 1rem;
    line-height: 1.4;
    letter-spacing: normal;
  }

  .download-desc {
    font-size: 0.8rem;
    line-height: 1.45;
    letter-spacing: normal;
  }

  .hero {
    max-height: 150px;
  }

  .hero-picture img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    object-position: center top;
    background: #000;
  }

  .hero-overlay {
    padding: 10px 12px 8px;
  }

  .hero-tag {
    font-size: 0.72rem;
    letter-spacing: 0.04em;
  }

  .download-desc--pc {
    display: none;
  }

  .download-desc--mobile-tip {
    display: block;
  }

  .download-card--pc {
    cursor: pointer;
  }

  .intro-section,
  .gallery-section {
    padding-block: 28px;
  }

  .intro-item {
    grid-template-columns: 48px 1fr;
    padding: 14px 12px;
  }

  .intro-num {
    width: 48px;
    height: 48px;
    font-size: 0.88rem;
  }

  .intro-item p {
    font-size: 0.92rem;
    padding-top: 4px;
  }

  .carousel-btn {
    width: 36px;
    height: 36px;
    margin-top: -18px;
    font-size: 1.5rem;
  }

  .carousel-btn--prev {
    left: 6px;
  }

  .carousel-btn--next {
    right: 6px;
  }
}

/* ===== iPad (768px - 1024px) ===== */
@media (min-width: 768px) and (max-width: 1024px) {
  .brand-logo img {
    height: 56px;
    max-width: none;
  }

  .download-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== PC (>1024px) ===== */
@media (min-width: 1025px) {
  .nav-screenshots--pc {
    display: inline-block;
  }

  .nav-screenshots--mobile {
    display: none;
  }

  .hero-picture {
    display: none;
  }

  .hero-overlay {
    display: none;
  }

  .hero-carousel-wrap {
    display: block;
    scroll-margin-top: calc(var(--header-h) + 12px);
  }

  .gallery-section {
    display: none;
  }

  .brand-logo img {
    height: 64px;
    max-width: none;
  }

  .download-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .download-card {
    padding: 28px 24px;
  }

  .intro-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}
