:root {
  --bg: #0a0a0f;
  --card: #111118;
  --border: #1e1e2e;
  --text: #e8e8f0;
  --text-muted: #7a7a90;
  --accent: #00e5ff;
  --accent2: #7c4dff;
  --accent-glow: rgba(0, 229, 255, 0.15);
  --radius: 12px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(0, 229, 255, 0.04) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 100%, rgba(124, 77, 255, 0.03) 0%, transparent 50%);
  z-index: -1;
  pointer-events: none;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; flex: 1; width: 100%; }

/* Navigation */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,15,0.85); backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  display: flex; justify-content: space-between; align-items: center; height: 60px;
}
.nav-brand {
  font-size: 22px; font-weight: 700; color: var(--accent); text-decoration: none;
  letter-spacing: 2px;
  text-shadow: 0 0 20px var(--accent-glow);
}
.nav-links a {
  color: var(--text-muted); text-decoration: none; padding: 8px 16px;
  border-radius: 8px; font-size: 14px; transition: all 0.2s;
}
.nav-links a:hover,.nav-links a.active { color: var(--accent); background: var(--card); }

/* Hero */
.hero {
  text-align: center; padding: 60px 20px 40px;
}
.hero h1 {
  font-size: 48px; font-weight: 800; letter-spacing: 4px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}
.hero p { color: var(--text-muted); font-size: 16px; max-width: 600px; margin: 0 auto; }

/* Categories */
.categories {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 32px;
}
.cat-btn {
  padding: 8px 18px; border-radius: 20px; border: 1px solid var(--border);
  background: transparent; color: var(--text-muted); font-size: 13px; cursor: pointer;
  transition: all 0.2s;
}
.cat-btn:hover,.cat-btn.active {
  color: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* Article Grid */
.article-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px; padding-bottom: 40px;
}
.article-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; text-decoration: none;
  color: var(--text); transition: all 0.3s;
  position: relative; overflow: hidden;
}
.article-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity: 0; transition: opacity 0.3s;
}
.article-card:hover {
  border-color: var(--accent); transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}
.article-card:hover::before { opacity: 1; }
.article-card h3 { font-size: 17px; margin: 12px 0 8px; line-height: 1.4; }
.article-card .excerpt { color: var(--text-muted); font-size: 13px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-card .meta { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 12px; color: var(--text-muted); }
.article-card .price { color: var(--accent); font-weight: 600; }

.cat-tag {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  background: rgba(0,229,255,0.1); color: var(--accent); font-size: 11px; font-weight: 500;
}

/* Article Detail */
.article-detail { max-width: 860px; margin: 0 auto; padding: 40px 20px 60px; }
.article-detail h1 { font-size: 32px; margin: 16px 0 8px; line-height: 1.35; }
.article-detail .meta { color: var(--text-muted); font-size: 14px; margin-bottom: 32px; }
.article-content { font-size: 16px; line-height: 1.9; }
.article-content h2 { font-size: 22px; margin: 32px 0 12px; color: var(--accent); }
.article-content h3 { font-size: 18px; margin: 24px 0 8px; color: var(--text); }
.article-content p { margin-bottom: 16px; }
.article-content ul,.article-content ol { margin: 12px 0 16px 20px; }
.article-content li { margin-bottom: 6px; }
.article-content strong { color: var(--accent); }
.article-content blockquote {
  border-left: 3px solid var(--accent); padding: 12px 20px; margin: 20px 0;
  background: var(--card); border-radius: 0 8px 8px 0; color: var(--text-muted);
}

/* Paywall */
.paywall { margin-top: 32px; position: relative; }
.paywall-blur {
  filter: blur(6px); opacity: 0.4; user-select: none;
  padding: 30px; background: var(--card); border-radius: var(--radius); border: 1px solid var(--border);
}
.paywall-content { display: none; }
#paywall-btn-section { text-align: center; padding: 30px 0; }
.paywall-btn {
  padding: 16px 40px; font-size: 17px; font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #000; border: none; border-radius: 12px; cursor: pointer;
  transition: all 0.3s; display: inline-flex; flex-direction: column; align-items: center; gap: 4px;
}
.paywall-btn:hover { transform: scale(1.05); box-shadow: 0 0 30px var(--accent-glow); }
.price-tag { font-size: 12px; font-weight: 400; opacity: 0.8; }

/* QR Overlay */
.qr-overlay {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85); z-index: 9999;
  justify-content: center; align-items: center; backdrop-filter: blur(4px);
}
.qr-dialog {
  background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  padding: 40px; text-align: center; max-width: 380px;
}
.qr-dialog h2 { font-size: 20px; margin-bottom: 8px; }
.qr-price { font-size: 36px; font-weight: 800; color: var(--accent); margin: 12px 0; }
.qr-tip { color: var(--text-muted); font-size: 13px; margin: 10px 0 16px; }
.qr-close {
  padding: 8px 24px; border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); border-radius: 8px; cursor: pointer; font-size: 14px;
}

/* Page sections */
.page-section { max-width: 860px; margin: 0 auto; padding: 40px 20px 60px; }
.page-section h1 { font-size: 28px; margin-bottom: 24px; color: var(--accent); }
.page-content { font-size: 16px; line-height: 1.9; }
.page-content p { margin-bottom: 14px; }

/* Footer */
.footer {
  text-align: center; padding: 30px 20px;
  color: var(--text-muted); font-size: 13px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* Animations */
@keyframes fadeUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
.article-card { animation: fadeUp 0.4s ease both; }
.article-card:nth-child(1){animation-delay:0.05s} .article-card:nth-child(2){animation-delay:0.1s}
.article-card:nth-child(3){animation-delay:0.15s} .article-card:nth-child(4){animation-delay:0.2s}
.article-card:nth-child(5){animation-delay:0.25s} .article-card:nth-child(6){animation-delay:0.3s}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 32px; letter-spacing: 2px; }
  .article-grid { grid-template-columns: 1fr; }
  .article-detail h1 { font-size: 24px; }
  .nav-inner { flex-direction: column; height: auto; padding: 12px 20px; }
  .nav-links { margin-top: 8px; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
