@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/JetBrainsMono-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/JetBrainsMono-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/JetBrainsMono-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/JetBrainsMono-MediumItalic.ttf') format('truetype');
  font-weight: 500;
  font-style: italic;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/JetBrainsMono-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/JetBrainsMono-BoldItalic.ttf') format('truetype');
  font-weight: 700;
  font-style: italic;
}

:root {
  --bg: #0b0f17;
  --bg-2: #111725;
  --panel: #151c2c;
  --panel-2: #1b2436;
  --border: #243049;
  --text: #e6ebf5;
  --text-dim: #8b97ad;
  --text-mute: #5d6981;
  --primary: #4f8cff;
  --green: #2ecc71;
  --red: #ff5466;
  --amber: #ffb13b;
}

* { box-sizing: border-box; }
*, *::before, *::after { border-radius: 0 !important; }

html, body { height: 100%; margin: 0; }
body {
  font-family: 'JetBrains Mono', "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ---------- layout general ---------- */
.layout {
  height: 100%;
  display: grid;
  grid-template-columns: 260px 1fr;
}

/* =================== BARRA LATERAL =================== */
.sidebar {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent), var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}

.brand {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.brand-logo {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  font-size: 18px;
  background: linear-gradient(135deg, var(--primary), #7a5cff);
  box-shadow: 0 4px 14px rgba(79,140,255,.35);
}
.brand-name { font-size: 17px; font-weight: 700; }

/* ---------- búsqueda ---------- */
.search-box {
  position: relative;
}
.search-box input {
  width: 100%;
  font: inherit; font-size: 13px;
  padding: 9px 32px 9px 11px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  outline: none;
  transition: border-color .12s ease;
}
.search-box input:focus { border-color: var(--primary); }
.search-box input::placeholder { color: var(--text-mute); }
.search-clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: transparent; border: none; cursor: pointer;
  color: var(--text-mute); font-size: 13px; line-height: 1;
  padding: 4px;
}
.search-clear:hover { color: var(--red); }

/* ---------- ordenación ---------- */
.sort-box select {
  width: 100%;
  font: inherit; font-size: 13px;
  padding: 9px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  outline: none;
  cursor: pointer;
  transition: border-color .12s ease;
}
.sort-box select:focus { border-color: var(--primary); }
.sort-box select option { background: var(--panel); color: var(--text); }

/* ---------- filtros ---------- */
.filters {
  display: flex; flex-direction: column; gap: 10px;
}
.filter-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--text-mute); margin-bottom: 4px;
}
.filter-row {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px;
  background: var(--panel);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.filter-row:hover { background: var(--panel-2); border-color: #33415e; }
.filter-row input { accent-color: var(--primary); width: 15px; height: 15px; cursor: pointer; }
.filter-text { font-size: 13px; font-weight: 500; }
.filter-hint {
  font-size: 11px; color: var(--text-mute);
  padding: 0 4px; line-height: 1.4;
}

/* grupo de filtro con select (formato) */
.filter-group {
  display: flex; flex-direction: column; gap: 6px;
}
.filter-sublabel {
  font-size: 11px; color: var(--text-mute);
  padding: 0 2px; text-transform: uppercase; letter-spacing: .8px;
}
.select-format {
  width: 100%;
  font: inherit; font-size: 13px; font-weight: 500;
  padding: 9px 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  outline: none;
  transition: border-color .12s ease;
}
.select-format:focus { border-color: var(--primary); }
.select-format option { background: var(--panel); color: var(--text); }

.sidebar-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-dim);
  font-family: "SFMono-Regular", Consolas, monospace;
}

/* =================== CONTENIDO =================== */
.content {
  background: radial-gradient(1200px 600px at 80% -10%, #16223a 0%, transparent 60%), var(--bg);
  overflow-y: auto;
  padding: 22px;
}

/* ---------- grid de cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

/* ---------- card ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
}

.cover {
  position: relative;
  aspect-ratio: 2 / 3;
  background: var(--bg-2);
  overflow: hidden;
}
.cover img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .25s ease;
}
.card:hover .cover img { transform: scale(1.05); }

/* Local DB cover — full quality, no dimming */
.cover-local {
  opacity: 1;
  filter: none;
}

/* AniList fallback cover — dimmed and slightly desaturated */
.cover-anilist {
  opacity: 0.55;
  filter: saturate(0.65);
  transition: transform .25s ease, opacity .2s ease;
}
.card:hover .cover-anilist {
  opacity: 0.7;
}

/* "AL" badge shown on AniList fallback covers */
.cover-anilist-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  padding: 2px 5px;
  font-size: 9px;
  font-weight: 800;
  font-family: "SFMono-Regular", Consolas, monospace;
  letter-spacing: .3px;
  background: rgba(250, 204, 21, 0.25);
  border: 1px solid rgba(250, 204, 21, 0.55);
  color: #facc15;
  border-radius: 3px;
  backdrop-filter: blur(6px);
  pointer-events: none;
  z-index: 5;
}

/* overlays */
.ov {
  position: absolute;
  padding: 2px 6px;
  font-size: 9px; font-weight: 700;
  font-family: "SFMono-Regular", Consolas, monospace;
  letter-spacing: .2px;
  backdrop-filter: blur(6px);
}
.ov-format {
  top: 5px; left: 5px;
  background: rgba(79,140,255,.85); color: #fff;
}
.ov-episodes {
  top: 5px; right: 5px;
  background: rgba(11,15,23,.78); color: #fff;
}
.ov-status {
  bottom: 5px; left: 50%; transform: translateX(-50%);
  background: rgba(11,15,23,.82); color: #fff;
  white-space: nowrap;
}
.ov-status.RELEASING { background: rgba(46,204,113,.88); color: #061a0e; }
.ov-status.FINISHED { background: rgba(91,143,255,.88); color: #06122a; }
.ov-status.NOT_YET_RELEASED { background: rgba(255,177,59,.88); color: #2a1c00; }
.ov-status.CANCELLED { background: rgba(255,84,102,.88); color: #2a0a0e; }
.ov-status.HIATUS { background: rgba(139,151,173,.88); color: #0a0e16; }

.ov-release {
  bottom: 24px; left: 50%; transform: translateX(-50%);
  background: rgba(36, 48, 73, 0.95); color: #fff;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

.ov-episodes.warning-diff {
  background: rgba(217, 119, 6, 0.9);
  color: #fff;
  border: 1px solid rgba(251, 191, 36, 0.7);
  box-shadow: 0 0 6px rgba(217, 119, 6, 0.4);
}


/* titulo */
.title-container {
  padding: 4px 6px 6px 6px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 54px;
  justify-content: space-between;
  background: var(--panel);
}

.title-main-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}

.title-main-text {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: left;
  word-break: break-word;
}

.title-season-text {
  font-size: 9.5px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-mute);
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
  height: 12px;
}

/* ---------- overlay de acciones (5 botones) ---------- */
.card-actions {
  position: absolute;
  inset: 0;
  background: rgba(8,12,20,.86);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
}
.card:hover .card-actions {
  opacity: 1;
  pointer-events: auto;
}
.card:hover .ov-format,
.card:hover .ov-episodes,
.card:hover .ov-status,
.card:hover .ov-release { display: none; }

.ca-btn {
  font: inherit; font-size: 10.5px; font-weight: 700;
  padding: 6px 4px;
  border: 1px solid transparent;
  background: var(--panel-2);
  color: #fff;
  cursor: pointer;
  transition: background .1s ease, transform .05s ease;
  text-align: center;
}
.ca-btn:hover:not(:disabled) { transform: translateY(-1px); }
.ca-btn:active:not(:disabled) { transform: translateY(0); }
.ca-btn:disabled { opacity: .5; cursor: wait; }
.ca-btn.loading { background: var(--panel) !important; color: var(--text-dim); }

.ca-anilist { background: #3b5bdb; }
.ca-anilist:hover { background: #4263eb; }
.ca-anime { background: #2b8a3e; }
.ca-anime:hover { background: #2f9e44; }
.ca-hentai { background: #a61e4d; }
.ca-hentai:hover { background: #c2255c; }
.ca-movie { background: #5f3dc4; }
.ca-movie:hover { background: #7048e8; }
.ca-delete { background: #c92a2a; }
.ca-delete:hover { background: #e03131; }

/* animacion al eliminar */
.card.removing {
  transform: scale(.85);
  opacity: 0;
  transition: transform .3s ease, opacity .3s ease;
}

/* ---------- loading / error ---------- */
.status {
  padding: 50px 20px;
  text-align: center;
  color: var(--text-dim);
  font-size: 15px;
}
.status.error { color: var(--red); }
.hidden { display: none !important; }

/* ---------- paginacion ---------- */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.btn {
  font: inherit; font-size: 13px; font-weight: 600;
  padding: 8px 14px;
  background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text); cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.btn:hover:not(:disabled) { background: var(--panel); border-color: var(--primary); }
.btn-danger {
  background: var(--red) !important;
  border-color: var(--red) !important;
  color: #fff !important;
}
.btn-danger:hover:not(:disabled) {
  background: #ff6b7c !important;
  border-color: #ff6b7c !important;
}
.btn-ghost.active {
  background: rgba(79, 140, 255, 0.15) !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}
.btn:disabled { opacity: .4; cursor: not-allowed; }
.page-text {
  font-size: 13px; color: var(--text-dim);
  font-family: "SFMono-Regular", Consolas, monospace;
  padding: 0 12px;
}

/* ---------- scroll ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2a3550; }
::-webkit-scrollbar-thumb:hover { background: #36446a; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; gap: 12px; padding: 12px; }
  .sidebar .brand { padding-bottom: 0; border-bottom: none; }
  .search-box { flex: 1; min-width: 180px; }
  .filters { flex-direction: row; gap: 8px; }
  .filter-label { display: none; }
  .filter-hint { display: none; }
  .sidebar-foot { display: none; }
}
@media (max-width: 500px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .content { padding: 12px; }
  .title-container { height: 48px; }
  .title-main-text { font-size: 10px; }
  .title-season-text { font-size: 8.5px; height: 11px; }
  .ov { font-size: 8px; padding: 2px 5px; }
}

/* Overrides for interactive cards in downloads list */
.card {
  cursor: pointer;
}
.card:hover .ov-format,
.card:hover .ov-episodes,
.card:hover .ov-status,
.card:hover .ov-release {
  display: inline-flex !important;
}

/* ---------- Modal details styling ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 15, 23, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal-wrapper {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  max-width: 500px;
  width: 100%;
}
.modal-wrapper.large {
  max-width: 1000px;
  width: 95%;
  height: 90vh;
  display: flex;
  flex-direction: column;
}
.modal-content {
  padding: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-body-content {
  flex: 1;
  overflow-y: auto;
  max-height: none !important;
}

/* Inputs & selects inside modal */
.modal-input-title {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  outline: none;
  border-radius: 4px;
  transition: border-color 0.12s ease;
}
.modal-input-title:focus {
  border-color: var(--primary);
}
.modal-select-title {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 8px 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  border-radius: 4px;
  transition: border-color 0.12s ease, color 0.12s ease;
}
.modal-select-title:focus {
  border-color: var(--primary);
  color: var(--text);
}

/* Custom file upload input styling */
input[type="file"] {
  background: var(--bg-2);
  border: 1px dashed var(--border);
  color: var(--text-dim);
  padding: 10px 14px;
  font-family: inherit;
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

input[type="file"]:hover {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
}

input[type="file"]::file-selector-button {
  background: var(--primary);
  border: none;
  color: #fff;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 12px;
  transition: opacity 0.12s ease;
}

input[type="file"]::file-selector-button:hover {
  opacity: 0.9;
}

.btn-close {
  background: none;
  border: none;
  color: var(--text-mute);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.12s ease;
}
.btn-close:hover {
  color: var(--red);
}

/* Torrent search results styling */
.torrent-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.torrent-item {
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.torrent-row-1 {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
}
.torrent-row-2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.torrent-episode-badge {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(79, 140, 255, 0.1);
  padding: 2px 6px;
  border: 1px solid rgba(79, 140, 255, 0.2);
  flex-shrink: 0;
}
.torrent-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.torrent-stats {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: var(--text-dim);
  align-items: center;
  min-width: 0;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.torrent-stat-seeds { color: var(--green); }
.torrent-stat-leechs { color: var(--red); }
.torrent-buttons {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.btn-torrent-action {
  font-size: 11px;
  padding: 4px 10px;
}

/* Sidebar Menu Styles */
.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 15px;
}
.sidebar-menu-btn {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.12s ease;
  width: 100%;
}
.sidebar-menu-btn:hover {
  background: var(--panel);
  color: var(--text);
  border-color: rgba(255,255,255,0.02);
}
.sidebar-menu-btn.active {
  background: var(--panel);
  color: var(--text);
  border-color: var(--border);
  box-shadow: inset 3px 0 0 var(--primary);
  padding-left: 15px;
}

/* Live Queue Styles */
.queue-item {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.queue-row-1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.queue-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.queue-meta-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  background: rgba(79, 140, 255, 0.1);
  color: var(--primary);
  border: 1px solid rgba(79, 140, 255, 0.2);
  flex-shrink: 0;
}
.queue-progress-bar-container {
  width: 100%;
  height: 6px;
  background: var(--bg-2);
  position: relative;
  overflow: hidden;
}
.queue-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #7a5cff);
  width: 0%;
  transition: width 0.3s ease;
}
.queue-progress-bar.paused {
  background: var(--text-mute) !important;
}
.queue-progress-bar.completed {
  background: var(--green) !important;
}
.queue-row-3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.queue-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--text-dim);
  flex-wrap: wrap;
}
.queue-stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.queue-speed-dl { color: var(--green); }
.queue-speed-up { color: var(--primary); }
.queue-status-text {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 10px;
}
.queue-status-text.downloading { color: var(--green); }
.queue-status-text.paused { color: var(--amber); }
.queue-status-text.completed { color: var(--primary); }
.queue-status-text.error { color: var(--red); }
.queue-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.btn-queue-action {
  font-size: 11px;
  padding: 4px 10px;
}/* =================== NEW: View headers =================== */
.view-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}
.view-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: 0.5px;
}
.view-subtitle {
  font-size: 11px;
  color: var(--text-mute);
  margin: 0;
  max-width: 520px;
  line-height: 1.5;
}

/* =================== Sidebar badges =================== */
.sidebar-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  padding: 0 5px;
  margin-left: auto;
  letter-spacing: 0;
}
.sidebar-badge.hidden { display: none; }

/* Live indicator */
.live-indicator {
  font-size: 10px;
  font-weight: 800;
  color: var(--green);
  letter-spacing: 1px;
  animation: pulse 2s infinite;
}

/* =================== AllDebrid Job Cards (Cache view) =================== */
.ad-job-card {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 14px 16px;
  transition: background 0.15s;
}
.ad-job-card:hover { background: var(--panel-2); }

.ad-job-main {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.ad-job-icon {
  font-size: 22px;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}
.ad-job-info {
  flex: 1;
  min-width: 0;
}
.ad-job-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}
.ad-job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.ad-job-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  letter-spacing: .3px;
  white-space: nowrap;
}

/* =================== AllDebrid File Cards (Queue view) =================== */
.ad-file-card {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background 0.15s;
}
.ad-file-card:hover { background: var(--panel-2); }

.ad-file-row1 {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ad-file-name {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ad-file-row3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.ad-file-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--text-dim);
  flex-wrap: wrap;
}

/* Progress bar */
.ad-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.ad-progress-fill {
  height: 100%;
  background: var(--primary);
  transition: width 0.5s ease;
}



.ov-episodes.completed {
  background: rgba(46, 204, 113, 0.85) !important;
  color: #061a0e !important;
  border-color: rgba(46, 204, 113, 0.3) !important;
}

/* ---------- paginacion ---------- */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.btn {
  font: inherit; font-size: 13px; font-weight: 600;
  padding: 8px 14px;
  background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text); cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.btn:hover:not(:disabled) { background: var(--panel); border-color: var(--primary); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.page-text {
  font-size: 13px; color: var(--text-dim);
  font-family: "SFMono-Regular", Consolas, monospace;
  padding: 0 12px;
}
