:root {
  --primary: #B91C1C;
  --secondary: #1F2937;
  --accent: #D4AF37;
  --bg-dark: #1C1814;
  --bg-light: rgba(255, 255, 255, 0.05);
  --text-main: #F9F7F2;
  --text-muted: rgba(249, 247, 242, 0.7);
}

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

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  min-width: 375px;
}

body {
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.7;
}

h1, h2, h3, h4, h5, h6, p {
  margin: 0;
}

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

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

.font-display {
  font-family: 'STXingkai', 'KaiTi', 'SimKai', serif;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(28, 24, 20, 0.95) 0%, rgba(28, 24, 20, 0.7) 60%, transparent 100%);
  backdrop-filter: blur(6px);
}

.nav-link {
  position: relative;
  padding: 0.25rem 0;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

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

.nav-link:hover,
.nav-link.active {
  color: var(--text-main);
}

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

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(28, 24, 20, 0.98);
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  padding: 1rem;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu .nav-link {
  display: block;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-3d {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: linear-gradient(180deg, var(--primary) 0%, #991b1b 100%);
  color: var(--text-main);
  border: none;
  border-radius: 0.5rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 0 #7f1d1d, 0 10px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-3d:hover {
  transform: translateY(2px);
  box-shadow: 0 4px 0 #7f1d1d, 0 6px 12px rgba(0, 0, 0, 0.4);
}

.btn-3d:active {
  transform: translateY(5px);
  box-shadow: 0 1px 0 #7f1d1d, 0 2px 6px rgba(0, 0, 0, 0.4);
}

.btn-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 9999px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

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

.btn-glass:hover {
  border-color: var(--accent);
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.25);
}

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

.card-glass {
  background: var(--bg-light);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 1rem;
  backdrop-filter: blur(10px);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.card-glass:hover {
  transform: translateY(-8px);
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.card-border {
  background: rgba(28, 24, 20, 0.6);
  border: 2px solid rgba(185, 28, 28, 0.35);
  border-radius: 0.75rem;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card-border:hover {
  transform: scale(1.02);
  border-color: var(--primary);
  box-shadow: 0 0 24px rgba(185, 28, 28, 0.2);
}

.heading-seal {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
}

.heading-seal::before {
  content: '';
  width: 2.5rem;
  height: 2.5rem;
  background: var(--primary);
  border: 2px solid var(--accent);
  border-radius: 0.35rem;
  transform: rotate(45deg);
  opacity: 0.9;
}

.heading-seal span {
  position: relative;
  z-index: 1;
}

.heading-line {
  position: relative;
  display: inline-block;
  padding-bottom: 0.75rem;
}

.heading-line::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 4rem;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 2px;
}

.ink-wash-bg {
  background:
    radial-gradient(circle at 20% 30%, rgba(185, 28, 28, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(31, 41, 55, 0.25) 0%, transparent 40%),
    linear-gradient(180deg, var(--bg-dark) 0%, #14110e 100%);
}

.hero-logo-glow {
  animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
  0%, 100% {
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.35));
  }
  50% {
    filter: drop-shadow(0 0 22px rgba(212, 175, 55, 0.7));
  }
}

.float-ink {
  animation: floatInk 6s ease-in-out infinite;
}

@keyframes floatInk {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

.pulse-dot {
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

.site-footer {
  background: linear-gradient(180deg, transparent 0%, rgba(20, 17, 14, 0.98) 20%);
  border-top: 1px solid rgba(212, 175, 55, 0.15);
}

.qr-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.qr-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.qr-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.friend-link {
  color: var(--text-muted);
  transition: color 0.25s ease;
  white-space: nowrap;
}

.friend-link:hover {
  color: var(--accent);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  background: rgba(185, 28, 28, 0.2);
  border: 1px solid rgba(185, 28, 28, 0.4);
  border-radius: 9999px;
  font-size: 0.75rem;
  color: var(--accent);
}

.section-inner {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 768px) {
  .section-inner {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

.divider-gold {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.5), transparent);
}
