@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --bg:       #0A0A0F;
  --surface:  #111118;
  --card:     #16161F;
  --border:   #252535;
  --accent:   #E94560;
  --accent2:  #0F3460;
  --neon:     #39FF14;
  --neon-dim: rgba(57,255,20,0.15);
  --hevc:     #A855F7;
  --hevc-dim: rgba(168,85,247,0.15);
  --blue:     #38BDF8;
  --text:     #EAEAEA;
  --muted:    #888899;
  --danger:   #E94560;
}

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

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

a { color: inherit; text-decoration: none; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── HEADER ── */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  width: 100%;
  max-width: 1400px;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: .02em;
  white-space: nowrap;
}
.logo span { color: var(--accent); }
.header-right { display:flex; gap:.75rem; align-items:center; }

.header-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  flex: 1;
  padding: 0 1.5rem;
}
.nav-link {
  color: var(--muted);
  font-size: .88rem;
  font-weight: 500;
  padding: .4rem .75rem;
  border-radius: 6px;
  transition: all .15s;
  text-decoration: none;
}
.nav-link:hover { color: var(--text); background: var(--card); }
.nav-link.active { color: var(--text); background: var(--card); }

.btn-ver-mais {
  margin-left: auto;
  color: var(--accent);
  font-size: .8rem;
  font-weight: 600;
  text-decoration: none;
  padding: .25rem .6rem;
  border-radius: 5px;
  border: 1px solid rgba(233,69,96,.3);
  transition: all .15s;
}
.btn-ver-mais:hover { background: rgba(233,69,96,.1); }

/* LIST PAGE */
.list-page-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.list-status-tabs { display: flex; gap: .4rem; flex-wrap: wrap; }
.tab-link {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 500;
  padding: .35rem .8rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card);
  text-decoration: none;
  transition: all .15s;
}
.tab-link:hover { color: var(--text); border-color: var(--text); }
.tab-link.active { color: var(--text); border-color: var(--accent); background: rgba(233,69,96,.08); }

/* PAGINATION */
.pagination {
  display: flex;
  justify-content: center;
  gap: .4rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.page-btn {
  color: var(--muted);
  font-size: .82rem;
  padding: .4rem .75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card);
  text-decoration: none;
  transition: all .15s;
}
.page-btn:hover { color: var(--text); border-color: var(--text); }
.page-btn.active { color: var(--text); border-color: var(--accent); background: rgba(233,69,96,.08); }

/* SEARCH PAGE */
.search-page-wrap { max-width: 860px; }
.search-form { display: flex; gap: .75rem; }
.search-input-page {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .7rem 1.1rem;
  color: var(--text);
  font-size: .95rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color .2s;
}
.search-input-page:focus { border-color: var(--accent); }

.stats-pill {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: .3rem .9rem;
  font-size: .75rem;
  color: var(--muted);
}
.stats-pill b { color: var(--text); }

.btn-add-anime {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: .55rem 1.1rem;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .03em;
  cursor: pointer;
  transition: opacity .2s;
}
.btn-add-anime:hover { opacity:.85; }

/* ── BADGES ── */
.badge {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: .65rem;
  letter-spacing: .1em;
  padding: .15rem .4rem;
  border-radius: 4px;
  border: 1px solid;
  display: inline-block;
}
.badge-1080 { background: var(--neon-dim); color: var(--neon); border-color: var(--neon); }
.badge-hevc { background: var(--hevc-dim); color: var(--hevc); border-color: var(--hevc); }
.badge-score { background: rgba(233,69,96,.15); color: var(--accent); border-color: var(--accent); }
.badge-genre { background: rgba(56,189,248,.1); color: var(--blue); border-color: var(--blue); }
.badge-batch { background: rgba(251,191,36,.12); color: #FBBF24; border-color: #FBBF24; }

/* ── HOME: SECTIONS ── */
.home-wrap { max-width: 1400px; margin: 0 auto; padding: 1.75rem 2rem 4rem; }

.section { margin-bottom: 2.75rem; }
.section-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1rem;
}
.section-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.section-dot.ongoing  { background: var(--neon); animation: pulse 2s ease-in-out infinite; }
.section-dot.upcoming { background: var(--accent); }
.section-dot.complete { background: var(--blue); }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:.4;} }

.section-title {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: .03em;
}
.section-count {
  color: var(--muted);
  font-size: .85rem;
  margin-left: .25rem;
}

.anime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .9rem;
}

.empty-section {
  color: var(--muted);
  font-size: .85rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 10px;
  text-align: center;
}

/* ── CARD ── */
.anime-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  cursor: pointer;
  position: relative;
  display: block;
}
.anime-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}

.card-poster-wrap { position: relative; }

.card-poster {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
  background: var(--surface);
}
.card-poster-placeholder {
  width: 100%;
  aspect-ratio: 2/3;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--border);
  font-size: 2rem;
}

/* Sombra sutil no rodapé do poster pra dar profundidade aos badges */
.card-poster-wrap::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.65));
  pointer-events: none;
}

/* Rating chip — canto superior direito, destaque dourado tipo MAL/IMDb */
.card-rating {
  position: absolute;
  top: .45rem;
  right: .45rem;
  z-index: 2;
  background: rgba(10,10,15,.85);
  backdrop-filter: blur(2px);
  border: 1px solid #FBBF24;
  color: #FBBF24;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: .7rem;
  padding: .15rem .4rem;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: .15rem;
  line-height: 1;
}

/* Badges de qualidade — canto superior esquerdo, compactos */
.card-badges {
  position: absolute;
  top: .45rem;
  left: .45rem;
  z-index: 2;
  display: flex;
  gap: .25rem;
}
.card-badges .badge {
  font-size: .58rem;
  padding: .1rem .32rem;
  background: rgba(10,10,15,.85);
  backdrop-filter: blur(2px);
}

.card-new-badge {
  position: absolute;
  bottom: .5rem;
  right: .5rem;
  z-index: 2;
  background: var(--blue);
  color: #06141F;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: .62rem;
  padding: .15rem .4rem;
  border-radius: 4px;
}

.card-body { padding: .65rem .7rem .7rem; }
.card-title {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: .87rem;
  line-height: 1.28;
  margin-bottom: .25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.3em;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .4rem;
}
.card-season { font-size: .68rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.eps-pill {
  flex-shrink: 0;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: .65rem;
  padding: .1rem .45rem;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
}
.eps-pill.complete { color: var(--neon); border-color: var(--neon); background: var(--neon-dim); }
.eps-pill.partial { color: var(--blue); border-color: var(--blue); background: rgba(56,189,248,.1); }

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--muted);
}
.empty-state .empty-ico { font-size: 4rem; margin-bottom: 1rem; opacity:.4; }
.empty-state h2 { font-family:'Rajdhani',sans-serif; font-size:1.5rem; color:var(--text); margin-bottom:.5rem; }

/* ── ANIME PAGE ── */
.anime-page-wrap { max-width: 1100px; margin: 0 auto; padding: 1.75rem 2rem 4rem; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--muted);
  font-size: .85rem;
  margin-bottom: 1.25rem;
  transition: color .15s;
}
.back-link:hover { color: var(--text); }

.anime-hero {
  display: flex;
  gap: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.75rem;
}
.hero-poster {
  width: 220px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.hero-poster img { width: 100%; display: block; object-fit: cover; }
.hero-poster-ph {
  width: 100%; aspect-ratio: 2/3;
  background: var(--card);
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem; color: var(--border);
}

.hero-info { flex: 1; min-width: 0; }
.hero-title {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1.85rem;
  line-height: 1.25;
  margin-bottom: .15rem;
}
.hero-title-alt {
  font-size: .95rem;
  color: var(--muted);
  font-weight: 400;
  margin-bottom: .8rem;
}
.hero-badges { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .9rem; }
.hero-desc { font-size: .9rem; color: var(--muted); line-height: 1.65; margin-bottom: 1.1rem; max-width: 680px; }

.hero-stats { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.stat { display:flex; flex-direction:column; gap:.15rem; }
.stat-val { font-family:'Rajdhani',sans-serif; font-weight:700; font-size:1.15rem; }
.stat-lbl { font-size:.7rem; color:var(--muted); text-transform:uppercase; letter-spacing:.08em; }

.hero-actions { display: flex; gap: .6rem; flex-wrap: wrap; }

.btn-action {
  border-radius: 8px;
  padding: .6rem 1.1rem;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  transition: all .15s;
}
.btn-action:hover { border-color: var(--accent); }
.btn-action.danger { color: var(--danger); }
.btn-action.danger:hover { background: rgba(233,69,96,.1); }
.btn-action.primary { background: var(--accent); border-color: var(--accent); color: #fff; }

.trailer-section { margin-bottom: 1.75rem; }
.section-label {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .85rem;
}
.trailer-embed {
  aspect-ratio: 16/9;
  max-width: 640px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--card);
}
.trailer-embed iframe { width:100%; height:100%; border:none; display:block; }

.eps-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.eps-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding-right: .35rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .6rem;
  background: var(--surface);
}

.ep-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color .15s;
}
.ep-card.expanded { border-color: var(--accent); }

.batch-card {
  border-color: rgba(251,191,36,.4);
  background: linear-gradient(180deg, rgba(251,191,36,.05), var(--card) 40%);
}
.batch-card.expanded { border-color: #FBBF24; }
.batch-card .ep-card-num { color: #FBBF24; }
.batch-card .ep-card-versions-summary:not(.muted) { color: #FBBF24; }

.ep-card-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem .85rem;
  cursor: pointer;
  transition: background .15s;
}
.ep-card-header:hover { background: rgba(255,255,255,.02); }

.ep-card-num {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: .8rem;
  color: var(--muted);
  width: 46px;
  flex-shrink: 0;
}
.ep-card-title-wrap { flex: 1; min-width: 0; }
.ep-card-title { font-size: .85rem; font-weight: 500; }
.ep-card-versions-summary { font-size: .72rem; color: var(--neon); margin-top: .1rem; }
.ep-card-versions-summary.muted { color: var(--muted); }
.ep-card-badges { display: flex; gap: .3rem; flex-shrink: 0; }
.ep-expand-arrow { color: var(--muted); font-size: .7rem; flex-shrink: 0; }

.ep-status {
  font-size: .7rem;
  padding: .15rem .45rem;
  border-radius: 4px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  border: 1px solid;
  flex-shrink: 0;
}
.ep-status.done { background: rgba(57,255,20,.1); color: var(--neon); border-color: var(--neon); }
.ep-status.none { background: transparent; color: var(--muted); border-color: var(--border); }

.btn-delete {
  background: none;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--danger);
  padding: .25rem .5rem;
  cursor: pointer;
  font-size: .72rem;
  transition: all .15s;
  flex-shrink: 0;
}
.btn-delete:hover { background: rgba(233,69,96,.15); border-color: var(--danger); }

.ep-card-body { padding: 0 .85rem .85rem; border-top: 1px solid var(--border); display:none; }
.ep-card-body.show { display: block; }

.ep-versions-list { display: flex; flex-direction: column; gap: .4rem; margin-top: .75rem; }
.ep-search-row { margin-top: .75rem; }
.ep-search-input-row { display: flex; gap: .5rem; }
.ep-search-input {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .55rem .8rem;
  color: var(--text);
  font-size: .85rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color .2s;
}
.ep-search-input:focus { border-color: var(--accent); }

.version-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .65rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.version-row-selectable {
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.version-row-selectable:hover { border-color: var(--accent); }
.version-row-selectable:has(.version-checkbox:checked),
.version-row-selectable.checked {
  border-color: var(--neon);
  background: var(--neon-dim);
}
.version-checkbox {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--neon);
  cursor: pointer;
}

.search-results-list { display: flex; flex-direction: column; gap: .4rem; margin-top: .75rem; }
.search-bulk-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: .85rem;
  padding-top: .85rem;
  border-top: 1px solid var(--border);
}
.selected-count { font-size: .8rem; color: var(--muted); }

.version-info { flex: 1; min-width: 0; }
.version-title { font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: .15rem; }
.version-meta { font-size: .68rem; color: var(--muted); display: flex; gap: .6rem; flex-wrap: wrap; }
.version-badges { display: flex; gap: .3rem; flex-shrink: 0; }

.btn-ep-magnet {
  background: none;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--muted);
  padding: .3rem .6rem;
  cursor: pointer;
  font-size: .78rem;
  transition: all .15s;
  flex-shrink: 0;
}
.btn-ep-magnet:hover { border-color: var(--accent); color: var(--accent); }
.btn-ep-magnet.has-link { border-color: var(--neon); color: var(--neon); background: var(--neon-dim); }

.btn-search-mal {
  background: var(--accent2);
  border: 1px solid #1e4a8a;
  border-radius: 8px;
  color: var(--blue);
  padding: .55rem 1.1rem;
  cursor: pointer;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .04em;
  transition: opacity .2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: .4rem;
  justify-content: center;
}
.btn-search-mal:hover { opacity:.85; }
.btn-search-mal:disabled { opacity: .5; cursor: progress; }

.nyaa-empty, .nyaa-loading {
  padding: 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: .82rem;
}

.add-ep-row { margin-top: .75rem; }
.btn-add-ep {
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: 6px;
  color: var(--muted);
  padding: .55rem 1rem;
  cursor: pointer;
  font-size: .82rem;
  width: 100%;
  transition: all .15s;
}
.btn-add-ep:hover { border-color: var(--accent); color: var(--accent); }

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--neon);
  border-radius: 8px;
  padding: .75rem 1.25rem;
  font-size: .875rem;
  z-index: 999;
  transform: translateY(100px);
  opacity: 0;
  transition: all .3s;
  max-width: 320px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { border-left-color: var(--accent); }

/* ── MODAL (Add Anime) ── */
.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.8);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.modal-title { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 1.25rem; }
.modal-title span { color: var(--accent); }
.btn-close {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 1.4rem; line-height: 1; padding: .2rem .4rem; border-radius: 4px;
  transition: color .15s;
}
.btn-close:hover { color: var(--text); }
.modal-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 1.25rem; }
.modal-footer {
  display: flex; gap: .75rem; justify-content: flex-end;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  position: sticky; bottom: 0; background: var(--surface);
}

.mal-search-row { display: flex; gap: .75rem; }
.mal-search-row input {
  flex:1; background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  padding: .65rem 1rem; color: var(--text); font-size: .9rem; font-family: 'Inter', sans-serif;
  outline: none; transition: border-color .2s;
}
.mal-search-row input:focus { border-color: var(--accent); }

.mal-results {
  display: flex; flex-direction: column; gap: .5rem;
  max-height: 240px; overflow-y: auto; padding-right: .25rem;
}
.mal-result-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem .8rem; background: var(--card); border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer; transition: border-color .15s;
}
.mal-result-item:hover { border-color: var(--accent); }
.mal-result-item.selected { border-color: var(--accent); background: rgba(233,69,96,.08); }
.mal-result-item img { width: 42px; height: 60px; object-fit: cover; border-radius: 4px; flex-shrink: 0; background: var(--border); }
.mal-result-info { flex:1; min-width:0; }
.mal-result-info h4 { font-size: .9rem; font-weight: 600; margin-bottom: .2rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mal-result-info p { font-size: .75rem; color: var(--muted); }
.mal-selected-badge {
  background: var(--accent); color: #fff; border-radius: 4px; padding: .15rem .5rem;
  font-size: .7rem; font-family: 'Rajdhani', sans-serif; font-weight: 700; flex-shrink: 0;
}

.field { display: flex; flex-direction: column; gap: .4rem; }
.field label { font-size: .78rem; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.field input, .field select, .field textarea {
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  padding: .65rem 1rem; color: var(--text); font-size: .9rem; font-family: 'Inter', sans-serif;
  outline: none; transition: border-color .2s; width: 100%;
}
.field input:focus, .field select:focus { border-color: var(--accent); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

.btn-cancel {
  background: none; border: 1px solid var(--border); border-radius: 8px; color: var(--muted);
  padding: .7rem 1.5rem; cursor: pointer; font-family: 'Rajdhani', sans-serif; font-weight: 600;
  font-size: .95rem; letter-spacing: .05em; transition: all .15s;
}
.btn-cancel:hover { border-color: var(--text); color: var(--text); }
.btn-save {
  background: var(--accent); border: none; border-radius: 8px; color: #fff;
  padding: .7rem 1.75rem; cursor: pointer; font-family: 'Rajdhani', sans-serif; font-weight: 700;
  font-size: .95rem; letter-spacing: .05em; transition: opacity .2s;
}
.btn-save:hover { opacity:.85; }
.btn-save:disabled { opacity:.4; cursor: not-allowed; }

@media (max-width: 700px) {
  .anime-hero { flex-direction: column; }
  .hero-poster { width: 160px; }
  header { padding: 0 1rem; }
  .home-wrap, .anime-page-wrap { padding: 1.25rem 1rem 3rem; }
}

/* ══ BOTÃO MANUAL ══ */
.btn-manual {
  background: rgba(168,85,247,.12);
  border: 1px solid var(--hevc);
  border-radius: 8px;
  color: var(--hevc);
  padding: .55rem .9rem;
  cursor: pointer;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .04em;
  transition: opacity .2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-manual:hover { opacity: .8; }

/* ══ MANUAL MODAL ══ */
.manual-tabs {
  display: flex;
  gap: .4rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: .75rem;
}
.manual-tab {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  padding: .4rem .9rem;
  cursor: pointer;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: .85rem;
  transition: all .15s;
}
.manual-tab:hover { border-color: var(--text); color: var(--text); }
.manual-tab.active { border-color: var(--hevc); color: var(--hevc); background: rgba(168,85,247,.1); }

.torrent-drop-zone {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  transition: all .2s;
  cursor: pointer;
}
.torrent-drop-zone.dragover {
  border-color: var(--hevc);
  background: rgba(168,85,247,.07);
}
.torrent-drop-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.torrent-drop-text { font-size: .9rem; color: var(--text); margin-bottom: .35rem; }
.torrent-drop-or { font-size: .78rem; color: var(--muted); margin-bottom: .75rem; }

.manual-preview-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin-top: .5rem;
}
.manual-preview-meta {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin: .5rem 0 0;
}
.preview-tag {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .15rem .5rem;
  font-size: .72rem;
  color: var(--muted);
  font-family: monospace;
}
.manual-error {
  background: rgba(233,69,96,.1);
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  padding: .6rem .9rem;
  font-size: .82rem;
  margin-top: .5rem;
}

/* ── COMENTÁRIOS ── */
.comments-section {
  max-width: 1100px;
  margin: 2.5rem auto 0;
  padding: 0 2rem 4rem;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}

.comment-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  transition: border-color .2s;
}
.comment-form:focus-within { border-color: rgba(233,69,96,.4); }

.comment-form-top {
  display: flex;
  gap: .75rem;
  align-items: center;
}
.comment-avatar-preview {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent2);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--blue);
  flex-shrink: 0;
  transition: background .2s;
}
.comment-input-name {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: .4rem .2rem;
  color: var(--text);
  font-size: .9rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color .2s;
}
.comment-input-name:focus { border-bottom-color: var(--accent); }
.comment-input-name::placeholder { color: var(--muted); }

.comment-textarea {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .75rem 1rem;
  color: var(--text);
  font-size: .88rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  resize: none;
  min-height: 90px;
  transition: border-color .2s;
  width: 100%;
  line-height: 1.55;
}
.comment-textarea:focus { border-color: var(--accent); }
.comment-textarea::placeholder { color: var(--muted); }

.comment-form-footer {
  display: flex;
  justify-content: flex-end;
}
.btn-comment-submit {
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: #fff;
  padding: .6rem 1.5rem;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .03em;
  cursor: pointer;
  transition: opacity .2s;
}
.btn-comment-submit:hover { opacity: .85; }
.btn-comment-submit:disabled { opacity: .4; cursor: not-allowed; }

.comments-list {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.comments-empty {
  color: var(--muted);
  font-size: .85rem;
  padding: 2rem;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 10px;
}

.comment-card {
  display: flex;
  gap: .9rem;
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color .15s;
}
.comment-card:hover { border-color: rgba(233,69,96,.25); }

.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: .9rem;
  color: var(--blue);
  flex-shrink: 0;
}

.comment-content { flex: 1; min-width: 0; }
.comment-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .4rem;
}
.comment-author {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: .9rem;
  color: var(--text);
}
.comment-date {
  font-size: .7rem;
  color: var(--muted);
  flex: 1;
}
.comment-delete {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: .75rem;
  padding: .15rem .35rem;
  border-radius: 4px;
  transition: all .15s;
  opacity: 0;
}
.comment-card:hover .comment-delete { opacity: 1; }
.comment-delete:hover { background: rgba(233,69,96,.15); color: var(--danger); }
.comment-body {
  font-size: .875rem;
  color: #c8c8d8;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

