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

:root {
  --bg: #0a0a0a;
  --bg-card: #16181c;
  --bg-alt: #1d1f23;
  --text: #e7e9ea;
  --text-muted: #71767b;
  --accent: #1d9bf0;
  --accent-hover: #1a8cd8;
  --border: #2f3336;
  --gold: #ffd700;
  --silver: #c0c0c0;
  --bronze: #cd7f32;
  --radius: 12px;
  --shadow: 0 2px 8px rgba(0,0,0,0.3);
}

html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

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

.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* === Header === */
.site-header {
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
}
.logo-icon { font-size: 1.4rem; }
.nav-link {
  color: var(--text-muted);
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.2s;
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: var(--bg-alt);
}


/* === Buttons === */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 24px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-secondary {
  background: var(--bg-alt);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--border); color: var(--text); }
.btn-full { width: 100%; text-align: center; }
.btn-lg {
  padding: 14px 32px;
  font-size: 1.05rem;
}
.btn-ghost {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 24px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  transition: all 0.2s;
  cursor: pointer;
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--text-muted);
  background: rgba(255,255,255,0.05);
}

/* === Hero === */
.hero {
  padding: 100px 0 80px;
  text-align: center;
  background: linear-gradient(180deg, rgba(29,155,240,0.10) 0%, rgba(29,155,240,0.02) 50%, transparent 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(29,155,240,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.3;
  color: var(--text);
  position: relative;
}
.hero-accent {
  background: linear-gradient(135deg, #1d9bf0, #60c0ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  color: var(--text-muted);
  font-size: 1.15rem;
  margin-bottom: 36px;
  line-height: 1.8;
  position: relative;
}
.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  position: relative;
}
.hero-trust {
  color: var(--text-muted);
  font-size: 0.85rem;
  position: relative;
}

/* === Stats Bar === */
.stats-bar {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
  gap: 20px;
  align-items: center;
}
.stat-value { display: block; font-size: 1.6rem; font-weight: 700; color: var(--accent); }
.stat-label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }

/* === Sections === */
.section { padding: 60px 0; }
.section-alt { background: var(--bg-card); }
.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 12px;
  text-align: center;
}
.section-desc {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* === Categories === */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
  color: var(--text);
}
.category-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  color: var(--text);
}
.category-icon { font-size: 2rem; }
.category-name { font-weight: 600; font-size: 0.95rem; }

/* === Rankings === */
.rankings-page { padding: 40px 0; }
.rankings-header { margin-bottom: 24px; }
.rankings-header h1 { font-size: 1.8rem; font-weight: 700; }
.period-info { color: var(--text-muted); font-size: 0.9rem; margin-top: 4px; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.filter-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-group label {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
}
.filter-btn {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid transparent;
  transition: all 0.2s;
}
.filter-btn:hover {
  color: var(--text);
  border-color: var(--border);
}
.filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ranking-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s;
  display: flex;
  gap: 16px;
}
.ranking-card:hover { border-color: var(--accent); }

.ranking-rank {
  flex-shrink: 0;
  padding-top: 4px;
}

.ranking-content {
  flex: 1;
  min-width: 0;
}

.ranking-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.ranking-author {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.ranking-title {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.4;
}
.ranking-title a {
  color: var(--text);
  text-decoration: none;
}
.ranking-title a:hover {
  color: var(--accent);
}

.ranking-preview {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 12px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ranking-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
}
.ranking-stats .stat {
  color: var(--text-muted);
}
.ranking-stats .score {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.x-link-btn {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
.x-link-btn:hover {
  text-decoration: underline;
}
.x-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: none;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}
.x-share-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
  background: var(--bg-alt);
}
.x-share-btn svg {
  flex-shrink: 0;
}

.rank {
  font-weight: 800;
  font-size: 1.1rem;
  min-width: 48px;
}
.rank-1 { color: var(--gold); }
.rank-2 { color: var(--silver); }
.rank-3 { color: var(--bronze); }

.category-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
}
.badge-ai { background: #1a2a3a; color: #5ba3e6; }
.badge-pop-culture { background: #2a1a3a; color: #a55be6; }
.badge-life { background: #2a3a1a; color: #a5e65b; }
.badge-work { background: #3a2a1a; color: #e6a55b; }
.badge-health { background: #1a3a2a; color: #5be68a; }
.badge-politics { background: #3a1a2a; color: #e65b8a; }
.badge-other { background: #2a2a2a; color: #999; }

.score { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; }

/* === X Embed === */
.embed-area {
  margin-top: 12px;
}
.embed-toggle {
  background: var(--bg-alt);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}
.embed-toggle:hover {
  color: var(--text);
  border-color: var(--accent);
}
.embed-toggle:disabled {
  opacity: 0.6;
  cursor: wait;
}
.embed-container {
  margin-top: 12px;
  max-width: 550px;
}
.embed-fallback {
  padding: 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: center;
}
.embed-fallback p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.x-link {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.2s;
}
.x-link:hover { color: var(--accent); }

/* Top articles on landing page */
.top-articles {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.top-article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  gap: 20px;
  transition: border-color 0.2s;
}
.top-article-card:hover { border-color: var(--accent); }
.top-article-rank { flex-shrink: 0; padding-top: 4px; }
.top-article-body { flex: 1; min-width: 0; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* === Pagination === */
.pagination {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}

/* === CTA === */
.cta-box {
  text-align: center;
  margin-top: 40px;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.cta-box p { color: var(--text-muted); margin-bottom: 16px; }

/* === Paywall Teaser === */
.paywall-teaser {
  position: relative;
  margin-top: 24px;
  border-radius: var(--radius);
  overflow: hidden;
}
.paywall-blur {
  display: flex;
  flex-direction: column;
  gap: 16px;
  filter: blur(6px);
  opacity: 0.35;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}
.paywall-fake-card {
  min-height: 110px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.paywall-fake-card::before {
  content: '';
  display: block;
  width: 60%;
  height: 16px;
  background: var(--border);
  border-radius: 4px;
  margin-bottom: 12px;
}
.paywall-fake-card::after {
  content: '';
  display: block;
  width: 80%;
  height: 12px;
  background: var(--border);
  border-radius: 4px;
}
.paywall-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(10,10,10,0.3) 0%, rgba(10,10,10,0.8) 100%);
  z-index: 2;
}
.paywall-count {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

/* === Benefits Grid (Pro features) === */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 32px;
}
.benefit-card {
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s;
}
.benefit-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.benefit-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}
.benefit-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.benefit-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* === Pricing enhancements === */
.section-pricing {
  background: linear-gradient(180deg, var(--bg) 0%, rgba(29,155,240,0.04) 50%, var(--bg) 100%);
}
.pricing-anchor {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 16px;
  margin-top: -12px;
}
.pricing-guarantee {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 12px;
}
.pricing-card-free {
  opacity: 0.8;
}

/* === Stats bar enhancements === */
.stat-badge-daily {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(29,155,240,0.15);
  color: var(--accent);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}
.stat-value-date {
  font-size: 1.2rem;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* === Final CTA === */
.final-cta {
  padding: 60px 0;
  text-align: center;
  background: linear-gradient(180deg, transparent 0%, rgba(29,155,240,0.08) 50%, transparent 100%);
}
.final-cta h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.final-cta p {
  color: var(--text-muted);
  margin-bottom: 8px;
  font-size: 1rem;
}

/* === Features === */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-top: 32px;
}
.feature-card {
  padding: 32px 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}
.feature-icon { font-size: 2.4rem; margin-bottom: 16px; }
.feature-card h3 { margin-bottom: 8px; font-size: 1.1rem; }
.feature-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }

/* === Pricing === */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.pricing-card {
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
}
.pricing-featured {
  border-color: var(--accent);
  box-shadow: 0 0 24px rgba(29,155,240,0.15);
}
.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 12px;
}
.pricing-card h3 { font-size: 1.3rem; margin-bottom: 8px; }
.price {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 20px;
}
.price span { font-size: 0.9rem; font-weight: 400; color: var(--text-muted); }
.pricing-card ul {
  list-style: none;
  margin-bottom: 24px;
}
.pricing-card li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.pricing-card li:last-child { border-bottom: none; }

/* === Footer === */
.site-footer {
  padding: 32px 0;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer-note { margin-top: 8px; font-size: 0.75rem; }
.footer-links {
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--text);
}

/* === Legal Pages === */
.legal-content {
  max-width: 720px;
  padding: 48px 20px 64px;
}
.legal-content h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}
.legal-content h2 {
  font-size: 1.2rem;
  margin-top: 32px;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.legal-content h3 {
  font-size: 1rem;
  margin-top: 20px;
  margin-bottom: 8px;
}
.legal-content p,
.legal-content li {
  line-height: 1.8;
  color: var(--text-muted);
}
.legal-content ul {
  padding-left: 24px;
  margin: 8px 0;
}
.legal-content a {
  color: var(--primary);
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}
.legal-table th,
.legal-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  line-height: 1.7;
}
.legal-table th {
  width: 180px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.legal-table td {
  color: var(--text-muted);
}
.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}
.legal-content table th,
.legal-content table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 0.9rem;
}
.legal-content table th {
  color: var(--text);
  font-weight: 600;
}
.legal-content table td {
  color: var(--text-muted);
}

/* === Auth Pages === */
.auth-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 180px);
  padding: 40px 20px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
}
.auth-card h1 {
  font-size: 1.6rem;
  margin-bottom: 24px;
  text-align: center;
}
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}
.form-group input {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus { border-color: var(--accent); }
.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.auth-note {
  text-align: center;
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.alert-error {
  background: rgba(220, 53, 69, 0.15);
  color: #f07;
  border: 1px solid rgba(220, 53, 69, 0.3);
}

/* === Upgrade Prompt === */
.upgrade-prompt {
  text-align: center;
  padding: 48px 24px;
  margin-top: 24px;
  background: linear-gradient(180deg, var(--bg-card), rgba(29,155,240,0.08));
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.upgrade-icon { font-size: 2.4rem; margin-bottom: 12px; }
.upgrade-prompt h3 { font-size: 1.2rem; margin-bottom: 8px; }
.upgrade-prompt p { color: var(--text-muted); margin-bottom: 20px; font-size: 0.95rem; line-height: 1.7; }

/* === Pricing Page === */
.pricing-page { padding: 60px 0; }
.pricing-current { border-color: #5be68a !important; }
.feature-disabled { color: var(--text-muted); }
.pricing-faq {
  max-width: 700px;
  margin: 60px auto 0;
}
.pricing-faq h2 {
  font-size: 1.4rem;
  margin-bottom: 24px;
  text-align: center;
}
.faq-item {
  padding: 20px;
  margin-bottom: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.faq-item h3 { font-size: 1rem; margin-bottom: 8px; }
.faq-item p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }

/* === Plan Badge === */
.plan-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.plan-pro {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}

/* === Account Page === */
.account-page { padding: 40px 0 60px; }
.account-page h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: 24px; }

.account-section {
  margin-bottom: 36px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.account-section h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.info-card { display: flex; flex-direction: column; gap: 12px; }
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text-muted); font-size: 0.9rem; }
.info-value { font-weight: 600; }

.plan-free {
  background: var(--bg-alt);
  color: var(--text-muted);
}

.action-row { margin-top: 16px; }

.account-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 400px;
}
.account-form .btn { align-self: flex-start; }

.form-inline {
  flex-direction: row !important;
  align-items: center;
  gap: 12px;
  max-width: 600px;
}
.form-inline input { flex: 1; }
.form-inline .btn { white-space: nowrap; }

.section-note {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
  line-height: 1.6;
}
.empty-note {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.token-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.token-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.token-info { display: flex; flex-direction: column; gap: 2px; }
.token-name { font-weight: 600; font-size: 0.95rem; }
.token-meta { font-size: 0.8rem; color: var(--text-muted); }

.token-form { margin-top: 16px; }

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-danger {
  background: rgba(220, 53, 69, 0.15);
  color: #f07;
  border: 1px solid rgba(220, 53, 69, 0.3);
}
.btn-danger:hover {
  background: rgba(220, 53, 69, 0.3);
  color: #f07;
}

.alert-success {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.alert-token {
  background: rgba(29, 155, 240, 0.1);
  color: var(--text);
  border: 1px solid rgba(29, 155, 240, 0.3);
}
.alert-token p { margin-bottom: 8px; }
.token-display {
  display: block;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 0.85rem;
  word-break: break-all;
  margin-bottom: 8px;
}

.api-usage {
  margin-top: 24px;
  padding: 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.api-usage h3 { font-size: 1rem; margin-bottom: 12px; }
.api-usage pre {
  background: var(--bg);
  padding: 12px 16px;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 8px;
}
.api-usage code {
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 0.85rem;
  color: var(--accent);
}

/* API Documentation */
.api-endpoint { margin-bottom: 20px; }
.api-endpoint h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.api-method {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 8px;
  vertical-align: middle;
}
.api-url {
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 0.85rem;
  color: var(--text);
  vertical-align: middle;
}
.api-params { margin-bottom: 20px; }
.api-params h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 8px; }
.api-params-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-bottom: 8px;
}
.api-params-table th {
  text-align: left;
  padding: 8px 12px;
  background: var(--bg);
  border-bottom: 2px solid var(--border);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.api-params-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.api-params-table code {
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 0.8rem;
  background: var(--bg);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--accent);
}
.api-response-example { margin-bottom: 20px; }
.api-response-example h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 8px; }
.api-response-example pre {
  background: var(--bg);
  padding: 12px 16px;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.8rem;
  line-height: 1.5;
}
.api-auth-note { margin-bottom: 20px; }
.api-auth-note h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 8px; }
.api-auth-note p { font-size: 0.9rem; margin-bottom: 4px; }
.api-auth-note code {
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 0.8rem;
  background: var(--bg);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--accent);
}
.api-categories-ref { margin-bottom: 8px; }
.api-categories-ref h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 8px; }
.api-categories-ref p { font-size: 0.9rem; margin-bottom: 8px; }
.api-categories-ref code {
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 0.8rem;
  background: var(--bg);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--accent);
}
.category-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.category-chip {
  display: inline-block;
  font-size: 0.8rem;
  padding: 4px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
}

.upgrade-box {
  padding: 24px;
  text-align: center;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.upgrade-box p { color: var(--text-muted); margin-bottom: 16px; }

/* === Responsive === */
@media (max-width: 640px) {
  .site-header .container { flex-wrap: wrap; height: auto; padding: 8px 20px; gap: 4px; }
  .header-nav { gap: 4px; }
  .nav-link { padding: 6px 10px; font-size: 0.85rem; }
  .logo { font-size: 0.95rem; }
  .logo-icon { font-size: 1.1rem; }
  .hero { padding: 60px 0 50px; }
  .hero h1 { font-size: 1.8rem; }
  .hero-sub { font-size: 0.95rem; }
  .hero-ctas { flex-direction: column; gap: 12px; }
  .hero-ctas .btn { width: 100%; text-align: center; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .filters { flex-direction: column; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .ranking-meta { font-size: 0.85rem; }
  .pricing-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 28px 20px; }
  .ranking-card { flex-direction: column; }
  .top-article-card { flex-direction: column; }
  .benefits-grid { grid-template-columns: 1fr; }
  .final-cta h2 { font-size: 1.4rem; }
}
