/* ==========================================
   Anime Archive Terminal
   极简 · 光柱 · 档案检索
   ========================================== */

:root {
  --abyss: #08080C;
  --pillar: rgba(180, 200, 240, 0.35);
  --pillar-bright: rgba(200, 215, 250, 0.60);
  --surface: rgba(16, 16, 24, 0.70);
  --surface-hover: rgba(22, 22, 32, 0.85);
  --border: rgba(255, 255, 255, 0.05);
  --border-hover: rgba(255, 255, 255, 0.10);
  --text: #E8E8F0;
  --text-dim: rgba(255, 255, 255, 0.35);
  --text-faint: rgba(255, 255, 255, 0.16);
  --accent: rgba(160, 180, 220, 0.7);
}

.lab-body {
  background: var(--abyss);
  color: var(--text);
  font-family: var(--font);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ===== Central Pillar ===== */
.pillar-bg {
  position: fixed;
  top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 1px; z-index: 0; pointer-events: none;
  animation: pillarBreathe 6s ease-in-out infinite;
}
@keyframes pillarBreathe {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}
.pillar-bg::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg,
    transparent 0%, var(--pillar) 8%, var(--pillar-bright) 40%,
    var(--pillar-bright) 60%, var(--pillar) 92%, transparent 100%);
  box-shadow: 0 0 6px rgba(180, 200, 240, 0.10), 0 0 20px rgba(180, 200, 240, 0.03);
}
.pillar-bg::after {
  content: ''; position: absolute; top: 5%; bottom: 5%;
  left: -120px; width: 240px;
  background: radial-gradient(ellipse at center,
    rgba(180, 200, 240, 0.012) 0%, transparent 70%);
}

.pillar-particles {
  position: fixed; top: 0; bottom: 0; left: 50%;
  transform: translateX(-50%); width: 4px;
  z-index: 0; pointer-events: none; overflow: hidden;
}
.pillar-particle {
  position: absolute; width: 1px; left: 1.5px;
  background: rgba(200, 215, 250, 0.45); border-radius: 1px;
  animation: flowUp var(--dur) linear infinite;
  animation-delay: var(--delay); opacity: 0;
}
@keyframes flowUp {
  0% { top: 105%; opacity: 0; }
  10% { opacity: 0.5; }
  80% { opacity: 0.2; }
  100% { top: -5%; opacity: 0; }
}

/* ===== Startup ===== */
.startup-overlay {
  position: fixed; inset: 0; z-index: 100; background: var(--abyss);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.8s ease;
}
.startup-overlay.done { opacity: 0; pointer-events: none; }
.startup-dot {
  width: 4px; height: 4px; background: rgba(200, 220, 255, 0.9);
  border-radius: 50%; box-shadow: 0 0 12px rgba(200, 220, 255, 0.5);
}

/* ===== Nav ===== */
.lab-body .nav-bar {
  background: rgba(8, 8, 12, 0.72);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.lab-body .nav-title { color: var(--text); }
.lab-body .nav-lab { color: var(--text-dim); }
.lab-body .nav-lab:hover { color: var(--text); }

/* ===== Hero ===== */
.lab-hero {
  position: relative; z-index: 2;
  padding: var(--spacing-2xl) 0 var(--spacing-lg);
  text-align: center;
}
.lab-hero-label { font-size: 10px; letter-spacing: 5px; text-transform: uppercase; color: var(--text-faint); margin-bottom: var(--spacing-md); }
.lab-hero-title { font-size: 38px; font-weight: 300; letter-spacing: 8px; color: var(--text); margin-bottom: var(--spacing-sm); }
.lab-hero-sub { font-size: var(--text-xs); color: var(--text-faint); letter-spacing: 4px; }

.lab-stats { display: flex; justify-content: center; gap: var(--spacing-2xl); margin-top: var(--spacing-lg); }
.lab-stat { text-align: center; }
.lab-stat-num { font-size: 26px; font-weight: 300; color: var(--text); letter-spacing: 2px; }
.lab-stat-label { font-size: 9px; color: var(--text-faint); letter-spacing: 3px; text-transform: uppercase; margin-top: 4px; }

/* Scroll prompt */
.scroll-prompt {
  margin-top: var(--spacing-lg);
  font-size: 9px; color: var(--text-faint);
  letter-spacing: 3px;
  animation: promptPulse 3s ease-in-out infinite;
}
@keyframes promptPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

/* ===== Search ===== */
.search-section {
  position: relative; z-index: 2;
  padding: 0 var(--spacing-lg) var(--spacing-sm);
  display: flex; justify-content: center;
}
.search-box {
  width: 100%; max-width: 420px;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  transition: border-color 0.6s ease, background 0.6s ease;
}
.search-box:focus-within {
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
}
.search-icon { font-size: 14px; color: var(--text-faint); flex-shrink: 0; }
.search-input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-size: var(--text-sm); font-family: var(--font);
  letter-spacing: 0.5px;
}
.search-input::placeholder { color: var(--text-faint); }

/* ===== Archive Section (month nodes along pillar) ===== */
.archive-section {
  position: relative; z-index: 2;
  padding: var(--spacing-lg) 0 var(--spacing-2xl);
}
.month-list {
  display: flex; flex-direction: column; align-items: center; gap: 42px;
}
.month-node {
  display: flex; align-items: center; gap: var(--spacing-lg);
  cursor: pointer; transition: opacity 0.6s ease;
}
.month-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(200, 220, 255, 0.22);
  box-shadow: 0 0 5px rgba(200, 220, 255, 0.06);
  transition: all 0.8s ease; flex-shrink: 0;
}
.month-node:hover .month-dot,
.month-node.active .month-dot {
  background: rgba(220, 235, 255, 0.65);
  box-shadow: 0 0 12px rgba(200, 220, 255, 0.20), 0 0 32px rgba(200, 220, 255, 0.04);
}
.month-label {
  font-size: var(--text-sm); font-weight: 400; color: var(--text-dim);
  letter-spacing: 3px; font-family: 'SF Mono', monospace;
  transition: color 0.8s ease; min-width: 85px;
}
.month-node:hover .month-label,
.month-node.active .month-label { color: var(--text); }
.month-accessing {
  font-size: 9px; color: var(--text-faint); letter-spacing: 2px;
  font-family: 'SF Mono', monospace; opacity: 0; transition: opacity 0.5s ease;
}
.month-node:hover .month-accessing { opacity: 1; }
.month-count {
  font-size: 9px; color: var(--text-faint); letter-spacing: 1px;
  font-family: 'SF Mono', monospace; margin-left: var(--spacing-sm);
}

/* ===== Cards Zone ===== */
.cards-zone {
  position: relative; z-index: 2;
  max-width: 1050px; margin: 0 auto;
  padding: 0 var(--spacing-lg) var(--spacing-3xl);
  display: flex; flex-wrap: wrap; gap: var(--spacing-lg);
  justify-content: center; min-height: 100px;
}

.status-toast {
  position: fixed; bottom: 60px; left: 50%; transform: translateX(-50%);
  z-index: 50; padding: 10px 28px;
  background: rgba(16, 16, 24, 0.90);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
  font-family: 'SF Mono', monospace; font-size: 11px;
  color: var(--text-dim); letter-spacing: 3px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.status-toast.show { opacity: 1; }

/* ===== Archive Card ===== */
.archive-card {
  width: 200px;
  border-radius: 10px; overflow: hidden;
  background: var(--surface);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.5s ease,
              border-color 0.5s ease;
  cursor: default;
}
.archive-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 20px rgba(140, 160, 220, 0.12), 0 4px 28px rgba(0,0,0,0.5);
  border-color: var(--border-hover);
}

/* Cover with real poster + gradient overlay */
.archive-card-cover {
  width: 100%; aspect-ratio: 3/4;
  position: relative; overflow: hidden;
  background: var(--abyss);
}
.archive-card-cover .cover-gradient {
  position: absolute; inset: 0; z-index: 2;
  opacity: 0.55;
}
.archive-card-cover .cover-poster-img {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(0.3) brightness(0.5);
  transition: filter 0.6s ease, transform 0.6s ease;
}
.archive-card:hover .cover-poster-img {
  filter: grayscale(0) brightness(0.6);
  transform: scale(1.04);
}
.archive-card-cover .cover-text {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  height: 100%;
  font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.40);
  text-align: center; padding: 20px; line-height: 1.4;
  letter-spacing: 0.5px;
}

/* Card info */
.archive-card-info { padding: 12px 14px; border-top: 1px solid rgba(255,255,255,0.03); }
.archive-card-title {
  font-size: var(--text-sm); font-weight: 500; color: var(--text);
  margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.archive-card-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 6px;
}
.archive-card-type {
  font-size: 9px; letter-spacing: 1.5px; color: var(--text-dim);
  padding: 2px 7px; border-radius: 3px;
  border: 1px solid rgba(255,255,255,0.06);
  font-family: 'SF Mono', monospace;
}
.archive-card-status {
  font-size: 9px; letter-spacing: 1px;
  font-family: 'SF Mono', monospace;
}
.archive-card-status.done { color: rgba(255,255,255,0.20); }
.archive-card-status.airing { color: rgba(100, 200, 140, 0.50); }
.archive-card-status.upcoming { color: rgba(160, 180, 220, 0.40); }

.archive-card-score {
  font-family: 'SF Mono', monospace; font-size: 11px; letter-spacing: 1px;
  color: var(--accent);
}
.archive-card-tags {
  display: flex; gap: 4px; flex-wrap: wrap;
}
.archive-card-tag {
  font-size: 8px; letter-spacing: 1px; padding: 2px 7px;
  border-radius: 3px; color: var(--text-faint);
  border: 1px solid rgba(255,255,255,0.04);
  font-family: 'SF Mono', monospace;
}

/* Empty */
.cards-placeholder {
  width: 100%; text-align: center; color: var(--text-faint);
  font-size: var(--text-xs); letter-spacing: 3px;
  padding: var(--spacing-2xl); font-family: 'SF Mono', monospace;
}

/* Back link */
.lab-back-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-faint); font-size: var(--text-xs);
  font-family: 'SF Mono', monospace; letter-spacing: 2px;
  transition: color 0.6s; text-decoration: none;
}
.lab-back-link:hover { color: var(--text-dim); }

/* Footer */
.lab-body .footer {
  border-top: 1px solid rgba(255,255,255,0.03);
  color: var(--text-faint); position: relative; z-index: 2;
}

/* ===== Responsive ===== */
@media (max-width: 700px) {
  .lab-hero-title { font-size: 24px; letter-spacing: 5px; }
  .lab-stats { gap: var(--spacing-xl); }
  .lab-stat-num { font-size: 20px; }
  .archive-card { width: 160px; }
  .month-label { font-size: 12px; letter-spacing: 2px; min-width: 70px; }
}

@media (max-width: 450px) {
  .lab-hero-title { font-size: 19px; letter-spacing: 3px; }
  .archive-card { width: 140px; }
  .month-node { gap: var(--spacing-sm); }
  .month-list { gap: 34px; }
  .search-box { max-width: 100%; }
}
