/* ==========================================================================
   白月光官网 (bygjc.blog) - 视觉样式系统 (Moonlight Black & White Theme)
   ========================================================================== */

:root {
  --bg-dark: #040407;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.3);
  
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --accent-white: #ffffff;
  --moon-silver: #e2e8f0;
  --moon-glow: rgba(255, 255, 255, 0.15);
  
  --success-color: #22c55e;
  --warning-color: #eab308;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --max-width: 1240px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Basic Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  overflow-x: hidden;
}

body {
  position: relative;
  min-height: 100vh;
  line-height: 1.6;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.05) 0%, transparent 70%), var(--bg-dark);
}

/* Canvas Background */
#moonlight-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Typography & Layout */
a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

.section {
  padding: 6rem 0;
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 4rem auto;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--moon-silver);
  margin-bottom: 1.25rem;
  backdrop-filter: blur(8px);
}

.section-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-white);
  box-shadow: 0 0 8px var(--accent-white);
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Glass Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px var(--moon-glow);
  transform: translateY(-4px);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.8rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
}

.btn-primary {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
  background: #e2e8f0;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.6);
  transform: translateY(-2px) scale(1.02);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1.1rem;
  font-size: 0.875rem;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: var(--transition);
}

.navbar.scrolled {
  padding: 0.85rem 0;
  background: rgba(4, 4, 7, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.logo-moon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #a1a1aa 60%, #3f3f46 100%);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
  display: inline-block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 0.4rem 0;
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #ffffff;
  transition: var(--transition);
  border-radius: 2px;
  box-shadow: 0 0 8px #ffffff;
}

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

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  padding-top: 10rem;
  padding-bottom: 6rem;
  text-align: center;
  position: relative;
}

.hero-glow {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.02) 40%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-title {
  font-size: 3.75rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  background: linear-gradient(180deg, #ffffff 0%, #d4d4d8 60%, #71717a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 2.5rem auto;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
}

.hero-highlights {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  max-width: 900px;
  margin: 0 auto;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--moon-silver);
  font-size: 0.95rem;
  font-weight: 500;
}

.highlight-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.85rem;
}

/* Core Advantages */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
}

.advantage-card .icon-box {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #ffffff;
  margin-bottom: 1.5rem;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.05);
}

.advantage-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #ffffff;
}

.advantage-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Node Latency & Status */
.status-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.status-stat-card {
  text-align: center;
  padding: 1.5rem;
}

.status-stat-val {
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.status-stat-lbl {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.node-table-wrapper {
  overflow-x: auto;
}

.node-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.node-table th {
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-color);
}

.node-table td {
  padding: 1.15rem 1.25rem;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.node-table tr:last-child td {
  border-bottom: none;
}

.node-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
}

.flag {
  font-size: 1.25rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(34, 197, 94, 0.1);
  color: var(--success-color);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-badge .ping-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success-color);
  box-shadow: 0 0 6px var(--success-color);
}

.latency-val {
  font-family: monospace;
  font-weight: 700;
  color: var(--success-color);
}

.load-bar-bg {
  width: 100px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.5rem;
}

.load-bar-fill {
  height: 100%;
  background: #ffffff;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.test-ping-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

/* Pricing Plans */
.pricing-toggle-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.pricing-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 4px;
}

.toggle-btn {
  padding: 0.5rem 1.5rem;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.toggle-btn.active {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.discount-tag {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}

.pricing-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.pricing-card.featured {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.15);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.badge-popular {
  position: absolute;
  top: -12px;
  right: 20px;
  background: #ffffff;
  color: #000000;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.85rem;
  border-radius: 999px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pricing-header {
  margin-bottom: 1.5rem;
}

.pricing-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.pricing-price {
  font-size: 2.5rem;
  font-weight: 900;
  color: #ffffff;
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.pricing-price .currency {
  font-size: 1.35rem;
  font-weight: 600;
}

.pricing-price .period {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 400;
}

.pricing-features {
  list-style: none;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.925rem;
  color: var(--moon-silver);
  margin-bottom: 0.85rem;
}

.pricing-features li i {
  color: #ffffff;
  font-size: 0.9rem;
}

/* Knowledge Base & Tutorials Section */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
}

.article-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.article-tag {
  background: rgba(255, 255, 255, 0.08);
  color: var(--moon-silver);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-weight: 500;
}

.article-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  transition: var(--transition);
}

.article-card:hover .article-title {
  color: var(--moon-silver);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.article-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
}

/* User Reviews Section */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.review-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.review-stars {
  color: #ffffff;
  font-size: 0.9rem;
  letter-spacing: 2px;
  margin-bottom: 1rem;
}

.review-content {
  font-size: 0.95rem;
  color: var(--moon-silver);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #ffffff;
  font-size: 1rem;
}

.author-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.author-role {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* FAQ Section */
.faq-container {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: var(--transition);
}

.faq-question {
  width: 100%;
  padding: 1.35rem 1.5rem;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.faq-icon {
  font-size: 1.25rem;
  transition: var(--transition);
  color: var(--text-muted);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: #ffffff;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding: 0 1.5rem 1.5rem 1.5rem;
}

/* Article Modal / Full Reader Drawer */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #090a0f;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  max-width: 900px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 3rem;
  position: relative;
  box-shadow: 0 0 50px rgba(255, 255, 255, 0.1);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  color: #ffffff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: #ffffff;
  color: #000000;
}

.article-detail-body {
  margin-top: 1.5rem;
  color: var(--moon-silver);
  line-height: 1.8;
  font-size: 1.05rem;
}

.article-detail-body h2 {
  font-size: 1.5rem;
  color: #ffffff;
  margin: 1.75rem 0 1rem 0;
}

.article-detail-body h3 {
  font-size: 1.25rem;
  color: #ffffff;
  margin: 1.25rem 0 0.75rem 0;
}

.article-detail-body p {
  margin-bottom: 1.25rem;
}

.article-detail-body ul, .article-detail-body ol {
  margin-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.article-detail-body code {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9rem;
}

.article-cta-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 2.5rem;
  text-align: center;
}

/* Footer & Keyword Links */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem 0;
  background: rgba(4, 4, 7, 0.95);
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 1rem;
  max-width: 320px;
}

.footer-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: #ffffff;
}

.seo-keywords-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1.5rem 0;
  font-size: 0.85rem;
  color: var(--text-dim);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Mobile Responsive */
@media (max-width: 992px) {
  .hero-title {
    font-size: 2.75rem;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(9, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-150%);
    transition: var(--transition);
  }
  .nav-links.active {
    transform: translateY(0);
  }
  .mobile-toggle {
    display: block;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .section-title {
    font-size: 2rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .modal-content {
    padding: 1.5rem;
  }
}
