:root {
  --primary: #B91C1C;
  --secondary: #D4A574;
  --accent: #F59E0B;
  --bg-dark: #0f0a08;
  --bg-light: rgba(212, 165, 116, 0.08);
  --text-main: #FFFFFF;
  --text-muted: rgba(255, 255, 255, 0.7);
  --bronze-glow: 0 0 20px rgba(212, 165, 116, 0.3);
  --flame-glow: 0 0 25px rgba(185, 28, 28, 0.5), 0 0 50px rgba(245, 158, 11, 0.25);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "WenQuanYi Micro Hei", sans-serif;
  background: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.25;
}

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

a {
  color: inherit;
  text-decoration: none;
}

#main-header {
  transition: background 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
}

.header-scrolled {
  background: rgba(15, 10, 8, 0.95) !important;
  backdrop-filter: blur(14px);
  box-shadow: 0 4px 30px rgba(185, 28, 28, 0.2);
  border-bottom: 1px solid rgba(212, 165, 116, 0.15);
}

.nav-link {
  position: relative;
  padding: 0.25rem 0;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.25s ease;
  letter-spacing: 0.05em;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--secondary);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--accent);
}

.nav-link.active::after {
  width: 100%;
}

.btn-flame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, var(--primary) 0%, #991b1b 100%);
  color: white;
  font-weight: 700;
  border-radius: 4px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: var(--flame-glow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.08em;
}

.btn-flame::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: metalShine 3s infinite;
}

.btn-flame:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 35px rgba(185, 28, 28, 0.7), 0 0 70px rgba(245, 158, 11, 0.35);
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.25rem;
  background: rgba(185, 28, 28, 0.2);
  border: 1px solid var(--primary);
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-copy:hover {
  background: var(--primary);
  color: white;
  box-shadow: var(--flame-glow);
}

.btn-copy.copied {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg-dark);
}

.mobile-nav {
  background: rgba(15, 10, 8, 0.98);
  border-left: 2px solid var(--primary);
}

.mobile-nav nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.mobile-nav nav a:hover {
  background: rgba(185, 28, 28, 0.15);
  color: var(--accent);
}

.mobile-nav nav a.active {
  background: rgba(185, 28, 28, 0.25);
  color: var(--accent);
  border-left: 3px solid var(--accent);
}

.page-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 5rem;
  padding-bottom: 4rem;
}

.page-hero-small {
  min-height: 60svh;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 10, 8, 0.4) 0%, rgba(15, 10, 8, 0.85) 70%, var(--bg-dark) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.section-label {
  display: inline-block;
  padding: 0.35rem 1rem;
  border: 1px solid var(--primary);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
  position: relative;
}

.section-label::before,
.section-label::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 30px;
  height: 1px;
}

.section-label::before {
  right: 100%;
  margin-right: 0.75rem;
  background: linear-gradient(90deg, transparent, var(--primary));
}

.section-label::after {
  left: 100%;
  margin-left: 0.75rem;
  background: linear-gradient(90deg, var(--primary), transparent);
}

.hero-title {
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 900;
  color: white;
  letter-spacing: 0.12em;
  text-shadow: 0 0 40px rgba(185, 28, 28, 0.8), 0 4px 20px rgba(0, 0, 0, 0.8);
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.25rem);
  color: var(--secondary);
  letter-spacing: 0.15em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.section {
  padding: 5rem 0;
  position: relative;
}

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

.section-policy {
  background: linear-gradient(180deg, rgba(185, 28, 28, 0.03) 0%, var(--bg-dark) 100%);
}

.section-download-cta {
  background: radial-gradient(ellipse at center, rgba(212, 165, 116, 0.06) 0%, var(--bg-dark) 70%);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: white;
  margin-bottom: 0.75rem;
  letter-spacing: 0.08em;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  letter-spacing: 0.05em;
}

.codes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.code-card {
  position: relative;
  padding: 2.5rem 2rem 2rem;
  text-align: center;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.code-card:hover {
  transform: translateY(-8px);
}

.code-scroll {
  background: linear-gradient(135deg, rgba(212, 165, 116, 0.1) 0%, rgba(139, 69, 19, 0.08) 100%);
  border: 2px solid rgba(212, 165, 116, 0.35);
  border-radius: 4px;
}

.code-scroll::before,
.code-scroll::after {
  content: '';
  position: absolute;
  left: 1rem;
  right: 1rem;
  height: 6px;
  background: linear-gradient(90deg, transparent, rgba(212, 165, 116, 0.4), transparent);
}

.code-scroll::before {
  top: 0.5rem;
}

.code-scroll::after {
  bottom: 0.5rem;
}

.code-stone {
  background: linear-gradient(135deg, rgba(60, 60, 60, 0.15) 0%, rgba(30, 30, 30, 0.25) 100%);
  border: 3px solid rgba(120, 113, 108, 0.4);
  border-radius: 2px;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.code-stone::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(0deg, transparent, transparent 19px, rgba(212, 165, 116, 0.03) 20px);
  pointer-events: none;
}

.code-ribbon {
  position: absolute;
  top: 1rem;
  left: -0.5rem;
  padding: 0.35rem 1rem;
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.code-ribbon::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0.5rem 0.5rem 0;
  border-color: transparent #7f1d1d transparent transparent;
}

.code-icon {
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  background: rgba(185, 28, 28, 0.2);
  border: 2px solid var(--primary);
  color: var(--accent);
  font-size: 1.75rem;
  border-radius: 50%;
  box-shadow: var(--flame-glow);
}

.code-name {
  font-size: clamp(2rem, 5vw, 2.75rem);
  color: var(--accent);
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
}

.code-desc {
  color: var(--secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}

.code-rewards {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  text-align: left;
  margin-bottom: 1.75rem;
  padding: 1.25rem;
  background: rgba(15, 10, 8, 0.4);
  border: 1px solid rgba(212, 165, 116, 0.15);
}

.code-rewards li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.code-rewards li i {
  color: var(--accent);
  width: 1.25rem;
  text-align: center;
}

.code-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.code-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--secondary);
  letter-spacing: 0.1em;
  padding: 0.5rem 1rem;
  border: 1px dashed rgba(212, 165, 116, 0.4);
}

.how-to-use {
  background: var(--bg-light);
  border: 1px solid rgba(212, 165, 116, 0.2);
  padding: 1.75rem;
}

.how-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  color: var(--accent);
  font-size: 1.15rem;
}

.how-steps {
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.how-steps li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.how-steps li::before {
  counter-increment: step;
  content: counter(step);
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(185, 28, 28, 0.2);
  border: 1px solid var(--primary);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.policy-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.policy-card {
  background: var(--bg-light);
  border: 1px solid rgba(212, 165, 116, 0.2);
  padding: 1.75rem;
  transition: all 0.35s ease;
}

.policy-card:hover {
  transform: translateY(-6px);
  border-color: rgba(212, 165, 116, 0.45);
  box-shadow: var(--bronze-glow);
}

.policy-icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(185, 28, 28, 0.15);
  border: 2px solid var(--primary);
  color: var(--accent);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.policy-card h3 {
  font-size: 1.2rem;
  color: var(--secondary);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.policy-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.policy-card ul li {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding-left: 1rem;
  position: relative;
}

.policy-card ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 0.35rem;
  height: 0.35rem;
  background: var(--accent);
  border-radius: 50%;
}

.policy-contact p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.site-footer {
  position: relative;
  background: linear-gradient(180deg, #1a0f0c 0%, #0f0a08 100%);
  border-top: 2px solid rgba(185, 28, 28, 0.4);
  padding: 4rem 0 2rem;
  overflow: hidden;
}

.footer-banner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--accent), var(--primary), transparent);
  background-size: 200% 100%;
  animation: bannerFlow 4s linear infinite;
}

.footer-content {
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.footer-desc {
  max-width: 600px;
  margin: 0 auto 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.footer-links a {
  color: var(--secondary);
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-copy {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

@keyframes metalShine {
  0% { left: -100%; }
  20% { left: 100%; }
  100% { left: 100%; }
}

@keyframes bannerFlow {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

@media (min-width: 768px) {
  .codes-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .code-rewards {
    grid-template-columns: repeat(2, 1fr);
  }

  .policy-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .code-card {
    padding: 3rem 2.5rem 2.5rem;
  }
}

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

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.qr-card {
  background: var(--bg-light);
  border: 1px solid rgba(212, 165, 116, 0.2);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.35s ease;
}

.qr-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(212, 165, 116, 0.5);
  box-shadow: 0 0 20px rgba(212, 165, 116, 0.3);
}

.qr-img {
  width: 160px;
  height: 160px;
  margin: 0 auto 1rem;
  padding: 0.5rem;
  background: white;
  border: 2px solid var(--secondary);
}

.qr-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-card h3 {
  font-size: 1.15rem;
  color: var(--secondary);
  margin-bottom: 0.35rem;
}

.qr-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.btn-metal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  background: transparent;
  color: var(--secondary);
  font-weight: 700;
  border-radius: 4px;
  border: 2px solid var(--secondary);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  letter-spacing: 0.05em;
}

.btn-metal::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(212, 165, 116, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-metal:hover {
  background: rgba(212, 165, 116, 0.12);
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: var(--bronze-glow);
}

.btn-metal:hover::before {
  left: 100%;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
