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

:root {
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --surface2: #242424;
  --border: #2e2e2e;
  --accent: #f47521;
  --accent2: #e85d04;
  --text: #e8e8e8;
  --text-muted: #888;
  --radius: 10px;
}

body { background: var(--bg); color: var(--text); font-family: 'Segoe UI', system-ui, sans-serif; min-height: 100vh; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: 1400px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 20px; }
.site-logo { text-decoration: none; color: var(--text); font-size: 1.2rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.site-logo span { color: var(--accent); }

/* Search & Filter */
.anime-main { max-width: 1400px; margin: 0 auto; padding: 24px 20px; }
.search-bar { margin-bottom: 28px; }
.search-bar input { width: 100%; padding: 14px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: 1rem; outline: none; transition: border-color .2s; }
.search-bar input:focus { border-color: var(--accent); }
.filters { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.filters select { padding: 8px 14px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: .9rem; cursor: pointer; outline: none; }
.filters select:focus { border-color: var(--accent); }
.stats { margin-top: 10px; color: var(--text-muted); font-size: .85rem; }

/* Grid */
.anime-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
@media (max-width: 600px) { .anime-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; } }

/* Card */
.anime-card { background: var(--surface); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: transform .2s, box-shadow .2s; border: 1px solid var(--border); position: relative; }
.anime-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.5); border-color: var(--accent); }
.anime-card.unavailable { opacity: .45; }
.anime-card img { width: 100%; aspect-ratio: 2/3; object-fit: cover; display: block; background: var(--surface2); }
.anime-card .card-info { padding: 8px 10px; }
.anime-card .card-title { font-size: .8rem; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.anime-card .card-meta { font-size: .72rem; color: var(--text-muted); margin-top: 4px; }
.badge { position: absolute; top: 6px; left: 6px; padding: 2px 7px; border-radius: 4px; font-size: .68rem; font-weight: 700; }
.badge.new { background: var(--accent); color: #fff; }
.badge.removed { background: #555; color: #ccc; }
.badge.simulcast { background: #1a6e3c; color: #5efa9a; }

/* Load more */
.load-more { text-align: center; margin-top: 32px; }
.load-more button { padding: 12px 32px; background: var(--accent); border: none; border-radius: var(--radius); color: #fff; font-size: 1rem; font-weight: 600; cursor: pointer; }
.load-more button:hover { background: var(--accent2); }
.load-more.hidden { display: none; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 999; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal.hidden { display: none; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.8); }
.modal-content { position: relative; background: var(--surface); border-radius: 14px; max-width: 680px; width: 100%; max-height: 90vh; overflow-y: auto; z-index: 1; }
.modal-close { position: absolute; top: 14px; right: 14px; background: var(--surface2); border: none; color: var(--text); width: 32px; height: 32px; border-radius: 50%; font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.modal-body { display: grid; grid-template-columns: 200px 1fr; gap: 24px; padding: 24px; }
@media (max-width: 500px) { .modal-body { grid-template-columns: 1fr; } }
.modal-poster img { width: 100%; border-radius: var(--radius); }
.modal-info h2 { font-size: 1.2rem; line-height: 1.3; margin-bottom: 6px; }
.modal-info .original-title { color: var(--text-muted); font-size: .85rem; margin-bottom: 12px; }
.modal-info .description { font-size: .88rem; line-height: 1.6; color: #ccc; margin-bottom: 16px; }
.modal-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.modal-tags span { padding: 3px 10px; background: var(--surface2); border-radius: 20px; font-size: .75rem; color: var(--text-muted); }
.modal-seasons { margin-bottom: 16px; }
.modal-seasons h3 { font-size: .9rem; margin-bottom: 8px; color: var(--text-muted); }
.season-item { background: var(--surface2); border-radius: 6px; padding: 8px 12px; margin-bottom: 6px; font-size: .85rem; display: flex; justify-content: space-between; align-items: center; }
.season-item .ep-count { color: var(--text-muted); font-size: .78rem; }
.modal-link { display: inline-block; padding: 10px 24px; background: var(--accent); border-radius: var(--radius); color: #fff; text-decoration: none; font-weight: 600; font-size: .9rem; }
.modal-link:hover { background: var(--accent2); }
.removed-notice { background: #2a1a1a; border: 1px solid #5a2020; border-radius: 8px; padding: 10px 14px; font-size: .82rem; color: #e07070; margin-bottom: 14px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); text-align: center; padding: 20px; color: var(--text-muted); font-size: .82rem; margin-top: 40px; }
.site-footer a { color: var(--accent); text-decoration: none; }

/* Loading */
.skeleton { background: linear-gradient(90deg, var(--surface2) 25%, var(--surface) 50%, var(--surface2) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-card { height: 260px; }

/* Stats Bar */
.stats-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
@media (max-width: 700px) { .stats-bar { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 400px) { .stats-bar { grid-template-columns: 1fr 1fr; } }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; text-align: center; }
.stat-card.stat-new { border-color: #1a6e3c; }
.stat-card.stat-removed { border-color: #5a2020; }
.stat-card.stat-sync { border-color: #1a3a5a; }
.stat-val { font-size: 1.5rem; font-weight: 700; color: var(--accent); line-height: 1.2; }
.stat-card.stat-new .stat-val { color: #5efa9a; }
.stat-card.stat-removed .stat-val { color: #e07070; }
.stat-card.stat-sync .stat-val { font-size: 0.78rem; color: #6aabdc; padding-top: 8px; }
.stat-label { font-size: .72rem; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: .05em; }

/* Results Info */
.results-info { color: var(--text-muted); font-size: .85rem; margin-bottom: 14px; min-height: 1.2em; }

/* Error / No Results */
.grid-error { grid-column: 1/-1; text-align: center; padding: 60px 20px; color: var(--text-muted); }
.grid-error .error-icon { font-size: 2.5rem; margin-bottom: 12px; }
.grid-error p { font-size: .9rem; }

/* Hero Sektionen */
.hero-sections { margin-bottom: 32px; }
.hero-row { margin-bottom: 28px; }
.row-title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.row-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.row-scroll::-webkit-scrollbar { height: 4px; }
.row-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.row-scroll .anime-card { flex: 0 0 140px; min-width: 140px; }
@media (max-width: 600px) { .row-scroll .anime-card { flex: 0 0 120px; min-width: 120px; } }
.refresh-btn { align-self: center; padding: 8px 16px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-muted); font-size: .85rem; cursor: pointer; flex-shrink: 0; }
.refresh-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Englische Beschreibung Hinweis */
.desc-lang { display: block; font-size: .75rem; color: var(--text-muted); margin-top: 8px; font-style: italic; }

/* Season Badges */
.card-season {
  display: inline-block;
  font-size: .65rem;
  color: var(--text-muted);
  margin-top: 2px;
  opacity: .8;
}
.modal-season-badge {
  display: inline-block;
  background: rgba(249,115,22,.15);
  color: #f97316;
  font-size: .75rem;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
  font-weight: 500;
}

/* Kompaktere Hero-Sektionen */
.hero-sections { margin-bottom: 12px; }
.hero-row { margin-bottom: 16px; }
.hero-row .row-title { font-size: 1rem; margin-bottom: 8px; padding: 0 4px; }
.row-scroll { gap: 10px; padding: 0 4px 8px; }
.row-scroll .anime-card { font-size: .8rem; }
.row-scroll .card-info { padding: 6px 8px; }
.row-scroll .card-title { font-size: .82rem; line-height: 1.2; }
.row-scroll .card-meta { font-size: .7rem; }
.stats-bar { margin-bottom: 12px; padding: 10px 0; gap: 8px; }
.stat-card { padding: 10px 14px; }
.stat-val { font-size: 1.4rem; }
.stat-label { font-size: .65rem; }
