/* ============================================================
   MANGA SEO SITE — Stylesheet
   Inspiré de Nautiljon : dark theme, cards compactes, grille
   ============================================================ */

/* ===== CSS VARIABLES ===== */
:root {
  --color-bg:          #0f0f14;
  --color-bg-surface:  #18181f;
  --color-bg-card:     #1e1e28;
  --color-bg-hover:    #26263a;
  --color-border:      #2a2a3a;
  --color-accent:      #e64c4c;
  --color-accent-dark: #b33a3a;
  --color-accent-soft: rgba(230, 76, 76, 0.15);
  --color-text:        #e8e8f0;
  --color-text-muted:  #9090aa;
  --color-text-faint:  #5a5a7a;
  --color-score:       #f5c518;
  --color-link:        #7db8e8;
  --color-link-hover:  #aad4f5;
  --color-status-ongoing:   #4caf82;
  --color-status-completed: #7db8e8;
  --color-status-hiatus:    #f5a623;

  --font-main:   'Inter', system-ui, -apple-system, sans-serif;
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --shadow-card: 0 2px 8px rgba(0,0,0,0.4);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.6);

  --container-width: 1200px;
  --header-height:   60px;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a  { color: var(--color-link); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-link-hover); text-decoration: underline; }

/* ===== CONTAINER ===== */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 15, 20, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
}

.site-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-accent);
  text-decoration: none;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}
.site-logo:hover { color: var(--color-accent); opacity: 0.85; text-decoration: none; }

.site-nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
}
.site-nav a {
  display: block;
  padding: 6px 12px;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s;
}
.site-nav a:hover,
.site-nav a.active {
  color: var(--color-text);
  background: var(--color-bg-hover);
  text-decoration: none;
}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-search {
  display: flex;
  align-items: center;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.site-search:focus-within { border-color: var(--color-accent); }
.site-search input {
  background: none;
  border: none;
  outline: none;
  color: var(--color-text);
  padding: 6px 14px;
  font-size: 0.85rem;
  width: 200px;
}
.site-search button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 12px;
  font-size: 0.9rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.site-search button:hover { opacity: 1; }

.lang-switcher {
  display: flex;
  gap: 4px;
}
.lang-option {
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s;
}
.lang-option:hover,
.lang-option.active {
  color: var(--color-text);
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
  text-decoration: none;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  background: var(--color-bg-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 10px 0;
  font-size: 0.8rem;
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  color: var(--color-text-muted);
}
.breadcrumb li:not(:last-child)::after { content: '›'; margin-left: 4px; color: var(--color-text-faint); }
.breadcrumb a { color: var(--color-text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--color-text); text-decoration: underline; }
.breadcrumb li:last-child { color: var(--color-text); }

/* ===== HERO SECTION (homepage) ===== */
.hero-section {
  background: linear-gradient(135deg, #1a0a0a 0%, #0f0f14 100%);
  padding: 64px 0;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-accent), #ff8a80);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-bottom: 32px;
}
.hero-search {
  display: flex;
  max-width: 500px;
  margin: 0 auto 24px;
  background: var(--color-bg-surface);
  border: 2px solid var(--color-border);
  border-radius: 32px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.hero-search:focus-within { border-color: var(--color-accent); }
.hero-search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--color-text);
  padding: 12px 20px;
  font-size: 1rem;
}
.hero-search button {
  background: var(--color-accent);
  border: none;
  color: #fff;
  padding: 12px 24px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.2s;
}
.hero-search button:hover { background: var(--color-accent-dark); }
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}
.hero-stats span { font-weight: 500; }

/* ===== SECTION BLOCKS ===== */
.section-block {
  padding: 48px 0;
}
.section-block--alt {
  background: var(--color-bg-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.section-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
}
.view-all {
  font-size: 0.875rem;
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
}
.view-all:hover { color: var(--color-accent-dark); text-decoration: underline; }

/* ===== MANGA GRID (cartes) ===== */
.manga-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.manga-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.manga-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent);
}
.manga-card a { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.manga-card img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
}
.card-img-placeholder {
  width: 100%;
  aspect-ratio: 2/3;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -1px;
}
.card-info {
  padding: 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.card-title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-genres { font-size: 0.72rem; color: var(--color-text-muted); }
.card-score  { font-size: 0.8rem; color: var(--color-score); font-weight: 600; margin-top: auto; }
.card-series { font-size: 0.78rem; font-weight: 600; color: var(--color-text); }
.card-episode { font-size: 0.75rem; color: var(--color-accent); }
.card-date   { font-size: 0.72rem; color: var(--color-text-muted); margin-top: auto; }

/* ===== GENRES GRID ===== */
.genres-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.genre-tile {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
  text-decoration: none;
  color: var(--color-text);
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.genre-tile:hover {
  border-color: var(--color-accent);
  background: var(--color-bg-hover);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--color-text);
}
.genre-icon  { font-size: 1.8rem; }
.genre-name  { font-size: 0.85rem; font-weight: 600; }
.genre-count { font-size: 0.72rem; color: var(--color-text-muted); }

/* ===== PAGE SÉRIE : HERO ===== */
.series-hero {
  background: var(--color-bg-surface);
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--color-border);
  position: relative;
}
.series-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(10,10,15,0.97) 40%, rgba(10,10,15,0.6));
}
.series-hero .container { position: relative; }

.series-hero-inner {
  display: flex;
  gap: 32px;
  padding: 40px 0;
  align-items: flex-start;
}

.series-cover {
  flex-shrink: 0;
  position: relative;
  width: 220px;
}
.series-cover img {
  width: 220px;
  height: 310px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}
.cover-placeholder {
  width: 220px;
  height: 310px;
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}
.series-score {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.85);
  border: 2px solid var(--color-score);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  text-align: center;
}
.score-value { font-size: 1.2rem; font-weight: 800; color: var(--color-score); }
.score-label { font-size: 0.7rem; color: var(--color-text-muted); }

.series-info { flex: 1; min-width: 0; }
.series-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 6px;
}
.series-original-title {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.series-genres { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.genre-tag {
  padding: 4px 10px;
  background: var(--color-accent-soft);
  border: 1px solid var(--color-accent);
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-accent);
  text-decoration: none;
  transition: all 0.2s;
}
.genre-tag:hover {
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
}

.series-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.meta-item { display: flex; flex-direction: column; gap: 2px; }
.meta-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-faint);
  font-weight: 600;
}
.meta-value { font-size: 0.9rem; color: var(--color-text); font-weight: 500; }

.status-ongoing   { color: var(--color-status-ongoing); }
.status-completed { color: var(--color-status-completed); }
.status-hiatus    { color: var(--color-status-hiatus); }

/* ===== SÉRIE : BODY ===== */
.series-body { padding: 32px 0 64px; }

.series-section { margin-bottom: 40px; }
.series-section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-border);
}
.count-badge {
  background: var(--color-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

.synopsis-text p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--color-text-muted);
}

/* ===== SEASONS LIST ===== */
.seasons-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.season-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
}
.season-card:hover { border-color: var(--color-accent); background: var(--color-bg-hover); }
.season-card-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  text-decoration: none;
  color: inherit;
}
.season-card img { width: 60px; height: 84px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.season-cover-placeholder {
  width: 60px;
  height: 84px;
  background: var(--color-bg-hover);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text-faint);
  flex-shrink: 0;
}
.season-card-info { flex: 1; min-width: 0; }
.season-title { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.season-episodes { font-size: 0.8rem; color: var(--color-text-muted); }
.season-date { display: block; font-size: 0.75rem; color: var(--color-text-faint); margin-top: 2px; }

/* ===== CHARACTERS GRID ===== */
.characters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
}
.character-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.2s;
}
.character-card:hover { border-color: var(--color-accent); transform: translateY(-2px); }
.character-card a { text-decoration: none; color: inherit; display: block; }
.character-card img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.char-image-placeholder {
  width: 100%;
  aspect-ratio: 2/3;
  background: var(--color-bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}
.char-info { padding: 8px; }
.char-name { font-size: 0.78rem; font-weight: 600; line-height: 1.3; margin-bottom: 4px; }
.char-role {
  display: inline-block;
  font-size: 0.65rem;
  padding: 2px 6px;
  background: var(--color-accent-soft);
  border-radius: 4px;
  color: var(--color-accent);
  font-weight: 500;
}

/* ===== PAGE SAISON ===== */
.season-page { padding: 32px 0 64px; }

.season-header {
  display: flex;
  gap: 24px;
  margin-bottom: 40px;
  align-items: flex-start;
}
.season-cover { width: 140px; height: 200px; object-fit: cover; border-radius: var(--radius-md); flex-shrink: 0; }
.season-parent-link { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 8px; }
.season-parent-link a { color: var(--color-link); }
.season-title { font-size: 2rem; font-weight: 800; margin-bottom: 12px; }
.season-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 12px; }
.season-desc { color: var(--color-text-muted); line-height: 1.8; }

/* ===== ÉPISODES TABLE ===== */
.episodes-section { margin-bottom: 40px; }
.episodes-section h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 16px; }

.episodes-table-wrapper { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--color-border); }
.episodes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.episodes-table thead { background: var(--color-bg-hover); }
.episodes-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--color-border);
}
.episodes-table tbody tr {
  border-bottom: 1px solid var(--color-border);
  transition: background 0.15s;
}
.episodes-table tbody tr:last-child { border-bottom: none; }
.episodes-table tbody tr:hover { background: var(--color-bg-hover); }
.episodes-table td { padding: 12px 16px; }
.ep-number { color: var(--color-text-muted); font-weight: 600; font-size: 0.8rem; width: 50px; }
.ep-title a { color: var(--color-text); font-weight: 500; text-decoration: none; }
.ep-title a:hover { color: var(--color-link-hover); text-decoration: underline; }
.ep-date  { color: var(--color-text-muted); font-size: 0.8rem; white-space: nowrap; }
.ep-pages { color: var(--color-text-faint); font-size: 0.8rem; }

/* ===== NAVIGATION ===== */
.season-navigation,
.episode-navigation {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 32px 0;
}

.nav-prev, .nav-next, .nav-season-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}
.nav-prev:hover, .nav-next:hover, .nav-season-btn:hover {
  border-color: var(--color-accent);
  background: var(--color-bg-hover);
  color: var(--color-text);
  text-decoration: none;
}
.ep-nav-btn { flex: 1; max-width: 340px; }
.nav-prev { justify-content: flex-start; }
.nav-next { justify-content: flex-end; margin-left: auto; }

/* ===== PAGE ÉPISODE ===== */
.episode-page { padding: 32px 0 64px; }
.episode-header { display: flex; gap: 24px; margin-bottom: 32px; align-items: flex-start; }
.episode-cover { width: 140px; height: 200px; object-fit: cover; border-radius: var(--radius-md); flex-shrink: 0; }
.episode-breadcrumb-inline { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 8px; }
.episode-breadcrumb-inline a { color: var(--color-link); }
.episode-breadcrumb-inline span { margin: 0 4px; }
.episode-title { font-size: 1.8rem; font-weight: 800; margin-bottom: 12px; line-height: 1.3; }
.ep-num { display: block; font-size: 1rem; color: var(--color-accent); font-weight: 600; margin-bottom: 4px; }
.episode-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 12px; }
.episode-desc { color: var(--color-text-muted); line-height: 1.8; }

.other-episodes h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; }
.chapters-mini-list { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.chapters-mini-list li a {
  display: block;
  padding: 5px 12px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: all 0.2s;
}
.chapters-mini-list li a:hover,
.chapters-mini-list li.current a {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-soft);
  text-decoration: none;
}

/* ===== EMPTY STATE ===== */
.empty-state { color: var(--color-text-faint); font-style: italic; padding: 24px; text-align: center; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--color-bg-surface);
  border-top: 1px solid var(--color-border);
  padding: 48px 0 24px;
  margin-top: 64px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-col h3 { font-size: 1.2rem; font-weight: 700; color: var(--color-accent); margin-bottom: 12px; }
.footer-col h4 { font-size: 0.9rem; font-weight: 700; color: var(--color-text); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-col p  { font-size: 0.85rem; color: var(--color-text-muted); line-height: 1.7; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col ul li a { font-size: 0.85rem; color: var(--color-text-muted); text-decoration: none; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--color-text); text-decoration: underline; }
.footer-bottom { border-top: 1px solid var(--color-border); padding-top: 20px; text-align: center; }
.footer-bottom p { font-size: 0.78rem; color: var(--color-text-faint); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  :root { --header-height: 56px; }

  .site-nav { display: none; }
  .site-search input { width: 140px; }
  .lang-switcher { display: none; }

  .series-hero-inner { flex-direction: column; }
  .series-cover { width: 160px; }
  .series-cover img { width: 160px; height: 225px; }
  .series-meta-grid { grid-template-columns: repeat(2, 1fr); }

  .season-header, .episode-header { flex-direction: column; }
  .season-cover, .episode-cover { width: 110px; height: 155px; }
  .season-title, .episode-title { font-size: 1.4rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 24px; }

  .manga-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }

  .episode-navigation { flex-direction: column; }
  .ep-nav-btn { max-width: 100%; }
}

@media (max-width: 480px) {
  .manga-grid { grid-template-columns: repeat(3, 1fr); }
  .genres-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-section { padding: 40px 0; }
  .hero-title { font-size: 1.8rem; }
}

/* ===== FOOTER GENRE TAGS (no links) ===== */
.footer-genre-tag {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ===== PAGE HERO (manga-list, search) ===== */
.page-hero {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 32px;
}
.page-hero h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}
.page-hero-sub {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* ===== MANGA LIST PAGE ===== */
.manga-list-page { padding-bottom: 64px; }

.list-filter-bar {
  margin-bottom: 28px;
}
.list-filter-bar input {
  width: 100%;
  max-width: 480px;
  padding: 10px 16px;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: 0.95rem;
  font-family: var(--font-main);
  outline: none;
  transition: border-color 0.2s;
}
.list-filter-bar input:focus { border-color: var(--color-accent); }

.series-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.catalog-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.catalog-card:hover { border-color: var(--color-accent); transform: translateY(-2px); }

.catalog-card-link {
  display: flex;
  gap: 16px;
  padding: 16px;
  color: inherit;
  text-decoration: none;
}
.catalog-card-link:hover { text-decoration: none; color: inherit; }

.catalog-cover-placeholder {
  flex-shrink: 0;
  width: 56px;
  height: 80px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
}
.catalog-cover-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.catalog-info { flex: 1; min-width: 0; }
.catalog-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.catalog-original {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 8px;
  font-style: italic;
}
.catalog-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.catalog-count,
.catalog-seasons {
  font-size: 0.78rem;
  color: var(--color-text-faint);
  background: var(--color-bg-surface);
  padding: 2px 8px;
  border-radius: 20px;
}
.catalog-synopsis {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== SEARCH PAGE ===== */
.search-page { padding-bottom: 64px; }

.search-page-form { margin-bottom: 32px; }

.search-input-wrap {
  display: flex;
  max-width: 600px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s;
  background: var(--color-bg-surface);
}
.search-input-wrap:focus-within { border-color: var(--color-accent); }

.search-input-wrap input {
  flex: 1;
  padding: 14px 18px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--color-text);
  font-size: 1rem;
  font-family: var(--font-main);
}
.search-input-wrap button {
  padding: 0 20px;
  background: var(--color-accent);
  border: none;
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
  transition: background 0.2s;
}
.search-input-wrap button:hover { background: var(--color-accent-dark); }

.search-status {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 16px;
  min-height: 1.4em;
}

.search-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.search-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.search-card:hover { border-color: var(--color-accent); transform: translateY(-2px); }

.search-card-link {
  display: flex;
  gap: 16px;
  padding: 16px;
  color: inherit;
  text-decoration: none;
}
.search-card-link:hover { text-decoration: none; color: inherit; }

.search-card-cover {
  flex-shrink: 0;
  width: 56px;
  height: 80px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
}
.search-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.search-card-body { flex: 1; min-width: 0; }
.search-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-card-alt {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 6px;
  font-style: italic;
}
.search-card-synopsis {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}
.search-card-count {
  font-size: 0.78rem;
  color: var(--color-text-faint);
  background: var(--color-bg-surface);
  padding: 2px 8px;
  border-radius: 20px;
}

@media (max-width: 600px) {
  .search-results,
  .series-catalog { grid-template-columns: 1fr; }
  .list-filter-bar input { max-width: 100%; }
  .page-hero h1 { font-size: 1.5rem; }
}
