@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Hebrew:wght@300;400;500;700&display=swap');

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

:root {
  --bg: #000000;
  --bg2: #121212;
  --bg3: #1a1a2e;
  --surface: rgba(255,255,255,0.04);
  --surface-hover: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.10);
  --border-glow: rgba(80,160,255,0.30);
  --text: #e8e8e8;
  --text-dim: #888;
  --text-muted: #555;
  --accent: #3a7fff;
  --accent2: #7c3aed;
  --accent-gold: #d4a017;
  --accent-neon: #00d4ff;
  --neon-glow: 0 0 10px rgba(0,212,255,0.5);
  --radius: 4px;
  --nav-h: 110px;
  --font: 'Noto Sans Hebrew', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color-scheme: dark;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

body.oled-dark {
  background: #000000;
}

a {
  color: var(--accent-neon);
  text-decoration: none;
  transition: color 0.2s, opacity 0.2s;
}

a:hover {
  color: #fff;
  opacity: 0.9;
}

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

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }

/* ── ASIDE NAV (品牌行 + 菜单行) ── */
.site-nav-aside {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.brand-row {
  display: flex;
  align-items: center;
  padding: 10px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  min-height: 40px;
  text-shadow: var(--neon-glow);
}

.brand-link:hover {
  color: var(--accent-neon);
  opacity: 1;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
}

.brand-name {
  font-size: 1.1rem;
}

.main-nav {
  padding: 0 24px;
}

.main-nav ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: 0;
  align-items: center;
}

.main-nav ul li a {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  min-height: 44px;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-dim);
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
  border-bottom: 2px solid transparent;
}

.main-nav ul li a:hover,
.main-nav ul li a[aria-current="page"] {
  color: var(--accent-neon);
  border-bottom-color: var(--accent-neon);
  text-shadow: var(--neon-glow);
  opacity: 1;
}

/* ── PAGE WRAP ── */
.page-wrap {
  padding-top: var(--nav-h);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── HERO ── */
.hero {
  position: relative;
  width: 100%;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #000000 0%, #0a0a1a 50%, #000d1a 100%);
}

.hero-bg-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(80px, 22vw, 300px);
  font-weight: 700;
  color: rgba(255,255,255,0.02);
  letter-spacing: 0.15em;
  user-select: none;
  pointer-events: none;
  line-height: 1;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.35);
}

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.3) 0%,
    rgba(0,5,20,0.6) 50%,
    rgba(0,0,0,0.85) 100%
  );
}

.hero-mask-only {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0,0,40,0.7) 0%,
    rgba(0,0,0,0.4) 40%,
    rgba(0,10,30,0.7) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 40px 24px;
  max-width: 860px;
}

.hero-h1 {
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 16px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.8);
}

.hero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 28px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
}

.eyebrow-tag {
  display: inline-block;
  padding: 4px 14px;
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 500;
  border-radius: var(--radius);
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.meta-date {
  font-size: 0.85rem;
  color: var(--accent-neon);
}

.meta-sep {
  color: var(--text-muted);
}

.meta-update {
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  min-height: 48px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent2) 100%);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 0 20px rgba(58,127,255,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 30px rgba(58,127,255,0.5);
  color: #fff;
  opacity: 1;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 0;
  min-height: 40px;
  font-size: 0.875rem;
  color: var(--accent-neon);
  font-weight: 500;
  transition: text-shadow 0.2s;
}

.btn-link:hover {
  text-shadow: var(--neon-glow);
  color: #fff;
  opacity: 1;
}

/* ── MAIN CONTENT ── */
.main-content {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px;
}

.main-with-aside {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

/* ── SECTIONS ── */
.prose-section {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.section-deco {
  display: flex;
  align-items: center;
  gap: 14px;
}

.deco-line {
  display: block;
  height: 2px;
  width: 48px;
  background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
  border-radius: 2px;
}

.deco-vs {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.1em;
}

.section-label {
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: block;
  margin-bottom: 6px;
}

.prose-section h2,
.ranking-list-section h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prose-section h2 > span:last-child,
.ranking-list-section h2 > span:last-child {
  font-size: 1.4rem;
}

/* ── PROSE BODY ── */
.prose-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
}

.prose-body h2,
.prose-body h3,
.prose-body h4 {
  color: #fff;
  margin: 24px 0 12px;
  line-height: 1.4;
}

.prose-body h2 { font-size: 1.25rem; font-weight: 700; }
.prose-body h3 { font-size: 1.1rem; font-weight: 600; }
.prose-body h4 { font-size: 1rem; font-weight: 600; color: var(--accent-neon); }

.prose-body p {
  margin-bottom: 16px;
}

.prose-body ul,
.prose-body ol {
  margin: 0 0 16px 20px;
}

.prose-body li {
  margin-bottom: 8px;
}

.prose-body strong {
  color: #fff;
  font-weight: 600;
}

.prose-body a {
  color: var(--accent-neon);
  border-bottom: 1px solid rgba(0,212,255,0.3);
}

.prose-body a:hover {
  border-bottom-color: var(--accent-neon);
  color: #fff;
  opacity: 1;
}

.prose-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.prose-body th,
.prose-body td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
}

.prose-body th {
  background: var(--bg2);
  color: var(--accent-neon);
  font-weight: 600;
}

.prose-body tr:nth-child(even) td {
  background: rgba(255,255,255,0.02);
}

/* ── GLASS CARD ── */
.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  transition: border-color 0.2s, background 0.2s, transform 0.18s, box-shadow 0.18s;
}

.glass-card:hover {
  border-color: var(--border-glow);
  background: var(--surface-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(58,127,255,0.15);
}

/* ── INLINE ASIDE ── */
.inline-aside {
  padding: 24px;
  border-left: 2px solid var(--accent);
  background: rgba(58,127,255,0.05);
  border-radius: var(--radius);
}

.inline-aside h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.num-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 10px;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  border-radius: var(--radius);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.related-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.related-link {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  min-height: 44px;
  color: var(--text);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.related-link:hover {
  color: var(--accent-neon);
  opacity: 1;
}

.related-link span {
  flex: 1;
}

/* ── CARDS SECTION (home) ── */
.cards-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 40px 0;
}

.cards-section .section-aside {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cards-section .section-aside h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 14px;
}

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

.card {
  display: flex;
  gap: 20px;
  padding: 24px;
  align-items: flex-start;
}

.card-num {
  font-size: 2.5rem;
  font-weight: 700;
  color: rgba(58,127,255,0.25);
  line-height: 1;
  min-width: 56px;
  font-variant-numeric: tabular-nums;
}

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: var(--accent-gold);
  color: #000;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: var(--radius);
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.card-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── QUICK NAV GRID ── */
.nav-cards-section {
  padding: 40px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.quick-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.quick-nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  min-height: 60px;
  text-align: center;
  color: var(--text);
  font-size: 0.875rem;
}

.quick-nav-item:hover {
  color: var(--accent-neon);
  opacity: 1;
}

.qn-title {
  line-height: 1.4;
}

/* ── RANKING ── */
.ranking-list-section {
  padding: 40px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rank-card {
  display: flex;
  gap: 24px;
  padding: 24px;
  align-items: flex-start;
}

.rank-num {
  font-size: 3rem;
  font-weight: 700;
  color: rgba(0,212,255,0.2);
  line-height: 1;
  min-width: 64px;
  font-variant-numeric: tabular-nums;
  transition: color 0.2s;
}

.rank-card:hover .rank-num {
  color: var(--accent-neon);
  text-shadow: var(--neon-glow);
}

.rank-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rank-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
}

.rank-body p {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ── FOOTER ── */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 48px 24px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer-cta {
  max-width: 480px;
  width: 100%;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-cta-text {
  font-size: 1.1rem;
  font-weight: 500;
  color: #fff;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-note {
  font-size: 0.78rem;
  color: #444;
  line-height: 1.6;
  max-width: 560px;
}

/* ── SCROLL REVEAL ── */
@media (prefers-reduced-motion: no-preference) {
  .glass-card,
  .prose-section,
  .rank-card,
  .nav-cards-section,
  .cards-section {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.2s, background 0.2s, box-shadow 0.18s;
  }

  .glass-card.visible,
  .prose-section.visible,
  .rank-card.visible,
  .nav-cards-section.visible,
  .cards-section.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  :root {
    --nav-h: 96px;
  }

  .main-nav ul {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .main-nav ul li a {
    padding: 10px 10px;
    font-size: 0.8rem;
  }

  .brand-row {
    padding: 8px 16px;
  }

  .hero {
    min-height: 70vh;
  }

  .hero-h1 {
    font-size: clamp(1.4rem, 5vw, 2rem);
  }

  .hero-bg-text {
    font-size: clamp(60px, 28vw, 160px);
  }

  .main-content {
    padding: 32px 16px;
  }

  .card {
    flex-direction: column;
    gap: 12px;
  }

  .card-num {
    font-size: 1.5rem;
    min-width: auto;
  }

  .rank-card {
    gap: 14px;
  }

  .rank-num {
    font-size: 2rem;
    min-width: 48px;
  }

  .quick-nav-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-cta {
    padding: 24px 16px;
  }

  .site-footer {
    padding: 36px 16px 24px;
  }
}

@media (max-width: 480px) {
  .main-nav ul li a {
    padding: 8px 8px;
    font-size: 0.75rem;
  }

  .quick-nav-grid {
    grid-template-columns: 1fr;
  }

  .hero-content {
    padding: 32px 16px;
  }
}
