:root {
  --primary: #C0A062;
  --primary-deep: #8B6F3E;
  --secondary: #6B46C1;
  --accent: #FF6B6B;
  --bg-dark: #1A0F1A;
  --bg-darker: #0F0810;
  --bg-card: rgba(26, 15, 26, 0.6);
  --text-main: #F5E6D3;
  --text-muted: #9CA3AF;
  --gold-glow: rgba(192, 160, 98, 0.4);
  --purple-glow: rgba(107, 70, 193, 0.4);
  --red-glow: rgba(255, 107, 107, 0.3);
  --border-gold: rgba(192, 160, 98, 0.3);
  --border-soft: rgba(245, 230, 211, 0.12);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  width: 100%;
}

body {
  background: var(--bg-dark);
  color: var(--text-main);
  font-family: "Noto Serif SC", "Songti SC", "STSong", serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.7;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.container-x {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.bg-dark-grad {
  background: radial-gradient(ellipse at top, rgba(107, 70, 193, 0.18) 0%, transparent 55%), linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
}

.texture-grain {
  position: relative;
}

.texture-grain::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(192, 160, 98, 0.06) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.5;
  z-index: 0;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(15, 8, 16, 0.95) 0%, rgba(15, 8, 16, 0.65) 75%, transparent 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-gold);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--text-main);
  font-size: 0.95rem;
  padding: 0.5rem 0.9rem;
  border-radius: 0.5rem;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: rgba(192, 160, 98, 0.08);
}

.hamburger {
  display: none;
  background: transparent;
  border: 1px solid var(--border-gold);
  color: var(--primary);
  width: 42px;
  height: 42px;
  border-radius: 0.5rem;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.hamburger:hover {
  background: rgba(192, 160, 98, 0.1);
}

@media (max-width: 767px) {
  .hamburger { display: inline-flex; align-items: center; justify-content: center; }
  .nav-menu {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-darker);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem;
    gap: 0.25rem;
    transform: translateY(-180%);
    transition: transform 0.4s ease;
    border-bottom: 1px solid var(--border-gold);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  }
  .nav-menu.open { transform: translateY(0); }
  .nav-menu .nav-link { padding: 0.75rem 1rem; }
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2.25rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
  color: var(--bg-dark);
  font-weight: 700;
  font-size: 1rem;
  border-radius: 999px;
  border: 1px solid var(--primary);
  box-shadow: 0 6px 24px var(--gold-glow);
  transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
  cursor: pointer;
  text-align: center;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 36px var(--gold-glow);
  color: var(--bg-dark);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-main);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 999px;
  border: 1px solid rgba(245, 230, 211, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(192, 160, 98, 0.1);
  transform: translateY(-2px);
}

.btn-accent {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: linear-gradient(135deg, var(--accent) 0%, #C74545 100%);
  color: #fff;
  font-weight: 700;
  border-radius: 0.5rem;
  border: 1px solid var(--accent);
  box-shadow: 0 4px 18px var(--red-glow);
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px var(--red-glow);
  color: #fff;
}

.card-glass {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-gold);
  border-radius: 1rem;
  padding: 1.75rem;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  position: relative;
  overflow: hidden;
}

.card-glass::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.6;
}

.card-glass:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 44px var(--purple-glow);
  border-color: var(--primary);
}

.card-bordered {
  background: linear-gradient(160deg, rgba(107, 70, 193, 0.1) 0%, rgba(26, 15, 26, 0.7) 100%);
  border: 1px solid var(--border-gold);
  border-radius: 0.875rem;
  padding: 1.5rem;
  position: relative;
  transition: all 0.3s ease;
}

.card-bordered:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 10px 30px var(--red-glow);
  transform: translateY(-4px);
}

.card-flat {
  background: rgba(15, 8, 16, 0.7);
  border: 1px solid var(--border-soft);
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: all 0.3s ease;
}

.card-flat:hover {
  border-color: var(--primary);
  background: rgba(26, 15, 26, 0.8);
}

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

.heading-line::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 64px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  border-radius: 2px;
}

.heading-quote {
  border-left: 4px solid var(--primary);
  padding-left: 1rem;
}

.seal-title {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
}

.seal-title .seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  border-radius: 0.5rem;
  font-size: 1.1rem;
  background: rgba(255, 107, 107, 0.08);
  flex-shrink: 0;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.5) saturate(1.1);
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(26, 15, 26, 0.25) 0%, rgba(26, 15, 26, 0.8) 65%, var(--bg-dark) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 6rem 1rem 3rem;
  max-width: 900px;
  margin: 0 auto;
}

.hero-mini {
  position: relative;
  padding: 7rem 0 3rem;
  overflow: hidden;
}

.hero-mini .hero-bg {
  filter: brightness(0.35) saturate(1.1);
}

.logo-badge {
  display: inline-block;
  padding: 0.3rem 1rem;
  border: 1px solid var(--primary);
  color: var(--primary);
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  background: rgba(192, 160, 98, 0.08);
  margin-bottom: 1.25rem;
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 0.375rem 0.875rem;
  border-radius: 0.375rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.copy-btn:hover {
  background: var(--primary);
  color: var(--bg-dark);
}

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

.code-chip {
  display: inline-block;
  font-family: "Courier New", monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.05em;
}

.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(180%);
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: var(--bg-dark);
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  font-weight: 700;
  z-index: 100;
  transition: transform 0.4s ease;
  box-shadow: 0 10px 30px var(--gold-glow);
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.feature-img-frame {
  position: relative;
  overflow: hidden;
  border-radius: 0.875rem;
  border: 1px solid var(--border-gold);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.feature-img-frame img {
  transition: transform 0.7s ease;
  width: 100%;
}

.feature-img-frame:hover img {
  transform: scale(1.08);
}

.feature-img-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(26, 15, 26, 0.7) 100%);
  pointer-events: none;
}

.gold-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  margin: 3rem 0;
  opacity: 0.6;
}

.footer {
  background: var(--bg-darker);
  border-top: 1px solid var(--border-gold);
  padding: 3rem 0 1.5rem;
}

.friend-link {
  display: inline-block;
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 0.25rem 0;
  transition: color 0.25s ease;
}

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

.qr-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 0.75rem;
  padding: 0.875rem;
  text-align: center;
  border: 1px solid var(--border-gold);
  transition: transform 0.3s ease;
}

.qr-card:hover {
  transform: translateY(-4px);
}

.qr-card img {
  width: 100%;
  max-width: 160px;
  margin: 0 auto;
  border-radius: 0.375rem;
}

.toc-link {
  display: block;
  padding: 0.65rem 0.875rem;
  color: var(--text-muted);
  border-left: 2px solid var(--border-soft);
  transition: all 0.25s ease;
  font-size: 0.95rem;
}

.toc-link:hover, .toc-link.active {
  color: var(--primary);
  border-left-color: var(--primary);
  background: rgba(192, 160, 98, 0.06);
}

.tier-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.tier-lx {
  background: rgba(192, 160, 98, 0.15);
  color: var(--primary);
  border: 1px solid var(--primary);
}

.tier-cs {
  background: rgba(107, 70, 193, 0.15);
  color: #B794F6;
  border: 1px solid var(--secondary);
}

.tier-vip {
  background: rgba(255, 107, 107, 0.15);
  color: var(--accent);
  border: 1px solid var(--accent);
}

.news-card-img {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem 0.75rem 0 0;
  aspect-ratio: 16 / 9;
}

.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.news-card:hover .news-card-img img {
  transform: scale(1.08);
}

.article-body p {
  margin: 0 0 1.1rem;
  color: var(--text-main);
  line-height: 1.9;
}

.article-body h2 {
  color: var(--primary);
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  padding-left: 0.875rem;
  border-left: 4px solid var(--primary);
}

.article-body h3 {
  color: var(--primary);
  font-size: 1.15rem;
  margin: 1.5rem 0 0.75rem;
}

.article-body ul {
  margin: 0 0 1.25rem 1.25rem;
  padding-left: 1rem;
}

.article-body li {
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.tier-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.tier-table th,
.tier-table td {
  padding: 0.75rem 0.875rem;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
}

.tier-table th {
  background: rgba(192, 160, 98, 0.1);
  color: var(--primary);
  font-weight: 700;
  white-space: nowrap;
}

.tier-table tr:hover td {
  background: rgba(192, 160, 98, 0.05);
}

.text-fluid-hero {
  font-size: clamp(2.25rem, 6.5vw, 4.75rem);
  line-height: 1.1;
}

.text-fluid-title {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1.2;
}

.text-fluid-sub {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  line-height: 1.6;
}

.text-fluid-body {
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
}

@media (max-width: 767px) {
  .container-x { padding-left: 0.875rem; padding-right: 0.875rem; }
  .card-glass { padding: 1.25rem; }
  .article-body h2 { font-size: 1.3rem; }
  .tier-table { font-size: 0.8rem; }
  .tier-table th, .tier-table td { padding: 0.55rem 0.5rem; }
}

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

.float-slow {
  animation: float-slow 4s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px var(--gold-glow); }
  50% { box-shadow: 0 0 40px var(--gold-glow), 0 0 60px rgba(192, 160, 98, 0.2); }
}

.glow-pulse {
  animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fade-up 0.8s ease-out both;
}

.fade-up-1 { animation-delay: 0.1s; }
.fade-up-2 { animation-delay: 0.25s; }
.fade-up-3 { animation-delay: 0.4s; }
.fade-up-4 { animation-delay: 0.55s; }
