/* 沙城风云 - 全局样式与首页样式 */
:root {
  --color-primary: #D97706;
  --color-secondary: #92400E;
  --color-accent: #FBBF24;
  --color-bg: #15100c;
  --color-bg-light: #1c1510;
  --color-bg-card: #231a12;
  --color-text: #f5f0e8;
  --color-text-muted: #b8a99a;
  --color-border: rgba(217, 119, 6, 0.25);
  --shadow-gold: 0 0 24px rgba(217, 119, 6, 0.35);
  --shadow-dark: 0 12px 40px rgba(0, 0, 0, 0.55);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-weight: 800;
  letter-spacing: 0.04em;
}

/* Image constraints by location */
#main-header img,
footer img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header */
#main-header {
  backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
}

#main-header.scrolled {
  background: rgba(21, 16, 12, 0.95);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--color-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.logo-text {
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  color: var(--color-accent);
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.35);
}

.nav-link {
  position: relative;
  color: rgba(245, 240, 232, 0.85);
  font-weight: 600;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transition: width 0.25s ease;
}

.nav-link:hover {
  color: var(--color-accent);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--color-accent);
}

/* Mobile Nav */
#mobile-nav {
  background: rgba(28, 21, 16, 0.98);
  border-left: 1px solid var(--color-border);
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  padding: 0.85rem 1rem;
  color: var(--color-text);
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: rgba(217, 119, 6, 0.12);
  color: var(--color-accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 9999px;
  font-weight: 800;
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: #fff;
  box-shadow: var(--shadow-gold), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 32px rgba(217, 119, 6, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-accent {
  background: linear-gradient(135deg, var(--color-accent) 0%, #f59e0b 100%);
  color: #2a1d12;
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.35);
}

.btn-accent:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 32px rgba(251, 191, 36, 0.5);
}

.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-primary);
  box-shadow: inset 0 0 12px rgba(217, 119, 6, 0.1);
}

.btn-outline:hover {
  background: rgba(217, 119, 6, 0.12);
  box-shadow: inset 0 0 20px rgba(217, 119, 6, 0.2), 0 0 16px rgba(217, 119, 6, 0.25);
}

.btn-giant {
  padding: 1.2rem 3rem;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  border-radius: 9999px;
}

/* Section titles */
.section-title {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  color: var(--color-accent);
  margin-bottom: 0.75rem;
  position: relative;
  display: inline-block;
}

.section-title::before,
.section-title::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-primary));
  transform: translateY(-50%);
}

.section-title::before {
  right: calc(100% + 16px);
  background: linear-gradient(90deg, transparent, var(--color-primary));
}

.section-title::after {
  left: calc(100% + 16px);
  background: linear-gradient(90deg, var(--color-primary), transparent);
}

.section-title.center {
  display: block;
  text-align: center;
}

.section-title.center::before,
.section-title.center::after {
  width: 60px;
}

.section-subtitle {
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  color: var(--color-text-muted);
}

/* Cards */
.card {
  background: linear-gradient(180deg, rgba(35, 26, 18, 0.95) 0%, rgba(28, 21, 16, 0.95) 100%);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-gold);
  border-color: rgba(251, 191, 36, 0.4);
}

.card-variant-2 {
  background: rgba(21, 16, 12, 0.85);
  border: 1px solid rgba(146, 64, 14, 0.4);
  border-radius: 0.75rem;
  position: relative;
}

.card-variant-2::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-secondary), var(--color-primary), var(--color-accent));
}

/* Hero */
.page-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(217, 119, 6, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(146, 64, 14, 0.2) 0%, transparent 50%),
    linear-gradient(180deg, #1a120c 0%, #15100c 100%);
  padding-top: 5rem;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d97706' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.6;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: rgba(217, 119, 6, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: var(--color-accent);
  font-size: 0.85rem;
  font-weight: 700;
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: 1.1;
  color: var(--color-accent);
  text-shadow: 0 4px 20px rgba(217, 119, 6, 0.4), 0 2px 4px rgba(0, 0, 0, 0.6);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.35rem);
  color: var(--color-text-muted);
  max-width: 540px;
}

.hero-logo {
  width: clamp(160px, 30vw, 280px);
  max-width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 24px rgba(217, 119, 6, 0.35));
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Feature cards */
.feature-card {
  background: linear-gradient(180deg, rgba(35, 26, 18, 0.95) 0%, rgba(28, 21, 16, 0.95) 100%);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-gold);
  border-color: rgba(251, 191, 36, 0.4);
}

.feature-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--color-border);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #fff;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.feature-title {
  font-size: 1.25rem;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.feature-desc {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Intro section */
.intro-text {
  color: var(--color-text-muted);
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  line-height: 1.9;
}

.highlight-box {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.12), rgba(146, 64, 14, 0.12));
  border: 1px solid var(--color-border);
  border-radius: 1.25rem;
  padding: 1.5rem;
}

.stat-item {
  text-align: center;
  padding: 1.25rem;
  background: rgba(21, 16, 12, 0.5);
  border-radius: 0.75rem;
  border: 1px solid rgba(217, 119, 6, 0.15);
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-accent);
  line-height: 1;
}

.stat-label {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* Download section */
.download-section {
  position: relative;
  background:
    radial-gradient(ellipse at center, rgba(217, 119, 6, 0.2) 0%, transparent 70%),
    linear-gradient(180deg, #1c1510 0%, #15100c 100%);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.platform-icons {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
}

.platform-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.platform-icon i {
  font-size: 2rem;
  color: var(--color-accent);
}

/* Contact cards */
.contact-card {
  background: linear-gradient(180deg, rgba(35, 26, 18, 0.95) 0%, rgba(28, 21, 16, 0.95) 100%);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-gold);
}

.contact-card img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  display: block;
  margin: 0 auto 1rem;
  border-radius: 0.75rem;
  border: 2px solid var(--color-border);
}

.contact-card h3 {
  font-size: 1.2rem;
  color: var(--color-accent);
  margin-bottom: 0.25rem;
}

.contact-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* Footer */
.footer-link {
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--color-accent);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Friend links section */
.friend-links-section .section-title {
  margin-bottom: 1.5rem;
}

.friend-links-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.friend-link {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1rem;
  background: rgba(35, 26, 18, 0.8);
  border: 1px solid var(--color-border);
  border-radius: 9999px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s ease;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

.friend-link:hover {
  background: rgba(217, 119, 6, 0.15);
  border-color: var(--color-primary);
  color: var(--color-accent);
  transform: translateY(-2px);
}
/* Responsive */
@media (max-width: 768px) {
  .section-title::before,
  .section-title::after {
    display: none;
  }

  .feature-card img {
    height: 160px;
  }

  .contact-card img {
    width: 120px;
    height: 120px;
  }

  .platform-icons {
    gap: 1.25rem;
  }

  .friend-links-list {
    gap: 0.5rem;
  }

  .friend-link {
    font-size: 0.85rem;
    padding: 0.5rem 0.85rem;
  }

}

/* Utilities */
.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-accent { color: var(--color-accent); }
.text-muted { color: var(--color-text-muted); }
.bg-card { background-color: var(--color-bg-card); }
.border-gold { border-color: var(--color-border); }
