/* ====================================================================
   Split Canvas · main.css
   Single-column scrolling layout with fixed topnav
   ==================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  --ink-green: #1E3D2F;
  --gold: #D4AF37;
  --gold-soft: rgba(212,175,55,0.06);
  --gold-warm: #B8952E;

  --dark-bg: #1A1D20;
  --dark-text: #FFFFFF;
  --dark-muted: #B0B8C0;

  --warm-bg: #F8F5F0;
  --warm-text: #2C2A28;
  --warm-muted: #8A8580;
  --warm-line: #E4DFD8;

  --font-display: "DM Serif Display", Georgia, serif;
  --font-ui: "Inter", system-ui, sans-serif;

  --ease: cubic-bezier(0.65, 0, 0.35, 1);
  --nav-h: 56px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-ui);
  background: var(--warm-bg);
  color: var(--warm-text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-y: auto;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

/* ---------- Top Navigation ---------- */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 24px;
  background: linear-gradient(180deg, rgba(26,29,32,0.7) 0%, rgba(26,29,32,0.95) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.logo {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.6rem;
  color: var(--dark-text);
  letter-spacing: -0.5px;
  flex-shrink: 0;
  position: relative;
}
.logo-accent {
  color: var(--gold);
  display: inline-block;
  margin-left: 4px;
}
.logo::after {
  content: "";
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.logo:hover::after { transform: scaleX(1); }

/* Category nav */
.cat-nav { display: flex; gap: 4px; }
.cat-btn {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 999px;
  color: rgba(255,255,255,0.55);
  transition: all 0.25s var(--ease);
}
.cat-btn:hover { color: #fff; }
.cat-btn.active {
  background: var(--gold);
  color: var(--ink-green);
}

/* Search capsule */
.search-capsule {
  position: relative;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 0 14px;
  transition: border-color 0.3s, background 0.3s;
}
.search-capsule:focus-within {
  border-color: var(--gold);
  background: rgba(255,255,255,0.14);
}
.search-capsule svg { width: 16px; height: 16px; color: rgba(255,255,255,0.45); flex-shrink: 0; }
.search-capsule input {
  background: none; border: none; outline: none;
  font-family: var(--font-ui); font-size: 13px;
  color: #fff; width: 160px;
  padding: 7px 0;
}
.search-capsule input::placeholder { color: rgba(255,255,255,0.35); }

.search-suggestions {
  position: absolute;
  top: calc(100% + 8px); left: 0; right: 0;
  background: var(--warm-bg);
  border: 1px solid var(--warm-line);
  border-radius: 8px;
  max-height: 220px;
  overflow-y: auto;
  display: none;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}
.search-suggestions.show { display: block; }
.search-suggestions .sug-item {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--warm-text);
  cursor: pointer;
  transition: background 0.15s;
}
.search-suggestions .sug-item:hover { background: var(--gold-soft); }

/* ---------- Split Layout (单列滚动) ---------- */
.split-layout {
  display: flex;
  flex-direction: column;
  padding-top: var(--nav-h);
  min-height: 100vh;
}

/* ---------- Hero Section（首篇文章大图） ---------- */
.hero-section {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 400px;
  overflow: hidden;
  background: var(--dark-bg);
}

.hero-section img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  cursor: pointer;
  transition: transform 0.6s var(--ease);
}
.hero-section img:hover { transform: scale(1.02); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(26,29,32,0.95) 100%);
  pointer-events: none;
}

.hero-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 48px 40px;
  color: var(--dark-text);
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  cursor: pointer;
}

.hero-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  margin-bottom: 12px;
}

.hero-content h1 {
  font-family: var(--font-display);
  font-size: 2.8rem;
  line-height: 1.1;
  margin-bottom: 14px;
  max-width: 90%;
  transition: color 0.3s;
}
.hero-content:hover h1 { color: var(--gold); }

.hero-content p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--dark-muted);
  max-width: 70%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

.hero-content time {
  font-size: 12px;
  color: var(--gold-warm);
  letter-spacing: 0.5px;
}

/* ---------- List Pane（新闻列表） ---------- */
.list-pane {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  background: var(--warm-bg);
  padding: 0 40px 60px;
}

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 16px;
  border-bottom: 1px solid var(--warm-line);
  flex-shrink: 0;
}
.list-count {
  font-size: 13px;
  color: var(--warm-muted);
}
.list-count strong { color: var(--warm-text); font-weight: 700; }

.list-scroll {
  width: 100%;
}

/* List item */
.list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 0;
  border-bottom: 1px solid var(--warm-line);
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s, border-color 0.3s, opacity 0.3s;
  position: relative;
  overflow: hidden;
}
.list-item:hover {
  transform: translateX(-6px);
  background: var(--gold-soft);
}
.list-item:hover .li-title { color: var(--gold-warm); }
.list-item:hover .li-thumb { transform: scale(1.1); }

.list-item.active {
  border-left-color: var(--gold);
  background: var(--gold-soft);
}
.list-item.active .li-title { color: var(--ink-green); font-weight: 600; }

.list-item.hidden {
  display: none;
}

.li-time {
  flex-shrink: 0;
  width: 44px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gold-warm);
  text-align: right;
}
.li-title {
  flex: 1;
  font-size: 14px;
  line-height: 1.3;
  color: var(--warm-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s;
}
.li-thumb {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease);
  border: 2px solid var(--warm-line);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--warm-muted);
  display: none;
}
.empty-state.show { display: block; }

/* ---------- Fullscreen Overlay ---------- */
.fs-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.95);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 40px;
}
.fs-overlay.open { display: flex; }
.fs-overlay img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
}
.fs-caption {
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: 20px;
  color: #fff;
  text-align: center;
  max-width: 600px;
}
.fs-close {
  position: absolute;
  top: 20px; right: 24px;
  font-size: 32px;
  color: #fff;
  transition: color 0.2s;
}
.fs-close:hover { color: var(--gold); }

/* ---------- Footer ---------- */
.footer {
  display: none;
}
.split-layout ~ .footer { display: none; }

/* ---------- Page Load Animation ---------- */
@keyframes canvasReveal {
  from { opacity: 0; transform: scale(1.2); filter: blur(12px); }
  to   { opacity: 1; transform: scale(1);   filter: blur(0); }
}
.hero-section img.initial-load {
  animation: canvasReveal 1s var(--ease) forwards;
}

@keyframes listSlideIn {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
.list-item.slide-in {
  animation: listSlideIn 0.5s var(--ease) forwards;
  animation-delay: var(--d, 0ms);
  opacity: 0;
}

/* Search highlight pulse */
@keyframes pulseBorder {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 0 2px var(--gold); }
}
.list-item.pulse { animation: pulseBorder 0.6s ease 2; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-section { height: 60vh; min-height: 350px; }
  .hero-content { padding: 40px 32px; }
  .hero-content h1 { font-size: 2.4rem; }
  .list-pane { padding: 0 32px 50px; }
}

@media (max-width: 768px) {
  :root { --nav-h: 56px; }
  .topnav {
    padding: 0 12px;
    gap: 8px;
    flex-wrap: wrap;
    height: auto;
    min-height: 56px;
    align-content: flex-start;
  }
  .logo { font-size: 1.1rem; flex-shrink: 0; }
  .cat-nav {
    display: flex;
    width: 100%;
    order: 3;
    gap: 4px;
    padding: 8px 0 0 0;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .cat-btn {
    font-size: 11px;
    padding: 5px 10px;
    flex-shrink: 0;
  }
  .search-capsule {
    margin-left: auto;
    flex-shrink: 0;
  }
  .search-capsule input { width: 90px; font-size: 12px; }
  .hero-section { height: 50vh; min-height: 280px; }
  .hero-content {
    padding: 24px 16px;
  }
  .hero-content h1 {
    font-size: 1.8rem;
    max-width: 100%;
    margin-bottom: 10px;
  }
  .hero-content p {
    max-width: 100%;
    font-size: 13px;
    line-height: 1.5;
  }
  .hero-content time { font-size: 11px; }
  .hero-tag { font-size: 10px; margin-bottom: 8px; }
  .list-pane { padding: 0 16px 40px; }
  .list-header { padding: 20px 0 14px; }
  .list-item {
    padding: 16px 0;
    gap: 12px;
  }
  .li-time { width: 40px; font-size: 11px; }
  .li-title { font-size: 13px; line-height: 1.4; }
  .li-thumb { width: 40px; height: 40px; }
  .fs-overlay { padding: 20px; }
  .fs-caption { font-size: 16px; margin-top: 12px; }
  .fs-close { top: 12px; right: 16px; font-size: 28px; }
}

@media (max-width: 480px) {
  :root { --nav-h: 52px; }
  .topnav { padding: 0 10px; }
  .logo { font-size: 1rem; }
  .cat-btn { font-size: 10px; padding: 4px 8px; }
  .search-capsule input { width: 70px; }
  .hero-section { height: 45vh; min-height: 250px; }
  .hero-content { padding: 20px 12px; }
  .hero-content h1 { font-size: 1.5rem; }
  .hero-content p { font-size: 12px; display: none; }
  .hero-tag { font-size: 9px; }
  .list-pane { padding: 0 12px 30px; }
  .list-item { padding: 14px 0; gap: 10px; }
  .li-time { width: 36px; font-size: 10px; }
  .li-title { font-size: 12px; }
  .li-thumb { width: 36px; height: 36px; }
}