/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #1a1a2e;
  --bg2:        #16213e;
  --bg3:        #0f3460;
  --accent:     #e94560;
  --accent2:    #f5a623;
  --text:       #e0e0e0;
  --text2:      #aaa;
  --card-bg:    #1e2a45;
  --card-hover: #253358;
  --border:     #2a3a5c;
  --sidebar-w:  240px;
  --topbar-h:   60px;
  --radius:     10px;
  --shadow:     0 4px 24px rgba(0,0,0,.5);
}

html { font-size: 15px; }
body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; color: inherit; font: inherit; }
input, select { font: inherit; }
img { max-width: 100%; display: block; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 3px; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg2);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  border-right: 1px solid var(--border);
  transition: transform .3s;
}

.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 18px;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
}
.logo-icon {
  background: var(--accent);
  color: #fff;
  width: 34px; height: 34px;
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 1rem;
}
.logo-text { letter-spacing: -.5px; }

.sidebar-nav { flex: 1; padding: 14px 0; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px;
  border-radius: 0;
  font-size: .93rem;
  transition: background .2s, color .2s;
  position: relative;
}
.nav-item:hover { background: var(--card-bg); }
.nav-item.active {
  background: var(--card-bg);
  color: var(--accent);
}
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}
.nav-icon { font-size: 1.1rem; }
.nav-divider { height: 1px; background: var(--border); margin: 10px 16px; }

.sidebar-footer { padding: 16px; font-size: .78rem; color: var(--text2); }
#stats-mini { line-height: 1.8; }

/* ===== MAIN ===== */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== TOPBAR ===== */
.topbar {
  position: sticky; top: 0; z-index: 90;
  height: var(--topbar-h);
  background: rgba(26,26,46,.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px; gap: 16px;
}
.burger-btn { font-size: 1.3rem; display: none; }
.search-wrap { position: relative; flex: 1; max-width: 500px; }
.search-input {
  width: 100%;
  padding: 8px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 24px;
  color: var(--text);
  outline: none;
  transition: border-color .2s;
}
.search-input:focus { border-color: var(--accent); }
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-height: 400px; overflow-y: auto;
  z-index: 200;
}
.search-section-title { padding: 10px 16px 4px; font-size: .78rem; color: var(--text2); text-transform: uppercase; letter-spacing: 1px; }
.search-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background .15s;
}
.search-item:hover { background: var(--card-hover); }
.search-item-thumb {
  width: 40px; height: 56px; object-fit: cover;
  border-radius: 4px;
  background: var(--bg3);
  flex-shrink: 0;
}
.search-item-info { flex: 1; min-width: 0; }
.search-item-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-item-sub   { font-size: .8rem; color: var(--text2); }
.hidden { display: none !important; }

/* ===== PÁGINAS ===== */
.page { display: none; padding: 28px 32px 80px; }
.page.active { display: block; }

.page-title {
  font-size: 1.6rem; font-weight: 700;
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 12px;
}

/* ===== HERO BANNER ===== */
.hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 340px;
  margin-bottom: 36px;
  cursor: pointer;
}
.hero-bg {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(.55);
}
.hero-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 24px 28px;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
}
.hero-badge { font-size: .75rem; background: var(--accent); color: #fff; padding: 2px 8px; border-radius: 4px; display: inline-block; margin-bottom: 8px; }
.hero-title { font-size: 2rem; font-weight: 800; line-height: 1.1; margin-bottom: 8px; }
.hero-meta  { font-size: .87rem; color: var(--text2); margin-bottom: 16px; }
.hero-desc  { font-size: .9rem; color: #ccc; max-width: 600px; line-height: 1.5; margin-bottom: 20px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-btns  { display: flex; gap: 12px; }

/* ===== BOTONES ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px;
  border-radius: 6px;
  font-weight: 600;
  font-size: .92rem;
  transition: all .2s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #c73650; }
.btn-secondary { background: rgba(255,255,255,.15); backdrop-filter: blur(4px); }
.btn-secondary:hover { background: rgba(255,255,255,.25); }
.btn-small { padding: 6px 14px; font-size: .82rem; border-radius: 5px; background: rgba(255,255,255,.1); }
.btn-small:hover { background: rgba(255,255,255,.2); }
.btn-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.1); }
.btn-danger { background: #c0392b; color: #fff; }
.btn-danger:hover { background: #a93226; }

/* ===== SECCIONES / CARRUSEL ===== */
.section { margin-bottom: 40px; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.section-title { font-size: 1.1rem; font-weight: 700; }
.section-link  { font-size: .85rem; color: var(--accent); }

.cards-row {
  display: flex; gap: 14px;
  overflow-x: auto; padding-bottom: 8px;
  scroll-snap-type: x mandatory;
}
.cards-row::-webkit-scrollbar { height: 4px; }

/* ===== TARJETAS ===== */
.card {
  flex-shrink: 0;
  width: 150px;
  scroll-snap-align: start;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  position: relative;
}
.card:hover { transform: translateY(-4px) scale(1.02); box-shadow: var(--shadow); }
.card-poster {
  width: 100%; aspect-ratio: 2/3;
  object-fit: cover;
  background: var(--bg3);
}
.card-info { padding: 8px 10px 10px; }
.card-title { font-size: .83rem; font-weight: 600; line-height: 1.3; margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta  { font-size: .75rem; color: var(--text2); }
.card-rating {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,.75);
  color: var(--accent2);
  font-size: .72rem; font-weight: 700;
  padding: 2px 6px; border-radius: 4px;
}
.card-badge {
  position: absolute; top: 8px; left: 8px;
  background: var(--accent);
  color: #fff; font-size: .65rem;
  padding: 2px 6px; border-radius: 4px;
}
.card-progress {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: rgba(255,255,255,.2);
}
.card-progress-bar { height: 100%; background: var(--accent); }

/* Tarjeta de álbum (cuadrada) */
.card-album { width: 140px; }
.card-album .card-poster { aspect-ratio: 1/1; }

/* ===== GRID ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}
.grid .card { width: auto; }

/* ===== DETALLE MODAL ===== */
/* ===== DETAIL PANEL (sustituye al modal) ===== */
.detail-panel {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 300;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.12) transparent;
}
.detail-panel.open {
  transform: translateY(0);
}
/* Backdrop no se usa en pantalla completa pero se mantiene por compatibilidad */
.detail-panel-backdrop {
  display: none;
}
.detail-panel-backdrop.open {
  display: none;
}
.modal-backdrop {
  width: 100%; height: 340px;
  object-fit: cover; object-position: center top;
  filter: brightness(.55);
  display: block;
}
.modal-body { padding: 0 clamp(16px, 5vw, 80px) 40px; max-width: 1100px; margin: 0 auto; }
.modal-poster-row {
  display: flex; gap: 20px; align-items: flex-end;
  margin-top: -60px; margin-bottom: 20px;
}
.modal-poster {
  width: 120px; flex-shrink: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
  border: 3px solid var(--bg2);
}
.modal-title-block { flex: 1; padding-bottom: 4px; }
.modal-title { font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.modal-meta  { font-size: .85rem; color: var(--text2); margin-top: 6px; }
.modal-rating { color: var(--accent2); font-weight: 700; }
.modal-tagline { font-size: .9rem; color: var(--accent2); font-style: italic; margin: 8px 0 4px; }
.modal-overview { font-size: .9rem; line-height: 1.65; color: #ccc; margin-bottom: 16px; }

/* Géneros chips */
.genres-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.genre-chip {
  padding: 4px 12px; border-radius: 20px;
  background: var(--bg3); color: var(--text);
  font-size: .78rem; font-weight: 600;
}

/* Info grid (director, país, idioma…) */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px 20px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--card-bg);
  border-radius: 10px;
}
.info-item-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .8px; color: var(--text2); margin-bottom: 3px; }
.info-item-value { font-size: .88rem; font-weight: 600; }

/* Reparto */
.cast-section { margin-bottom: 20px; }
.cast-title { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--text2); margin-bottom: 12px; }
.cast-row {
  display: flex; gap: 12px;
  overflow-x: auto; padding-bottom: 6px;
}
.cast-row::-webkit-scrollbar { height: 3px; }
.cast-card {
  flex-shrink: 0; width: 82px; text-align: center;
  cursor: default;
}
.cast-photo {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg3);
  margin: 0 auto 6px;
  display: block;
}
.cast-name      { font-size: .72rem; font-weight: 700; line-height: 1.2; }
.cast-character { font-size: .68rem; color: var(--text2); }

/* Tráiler */
.trailer-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 20px; border-radius: 6px;
  background: #c0392b; color: #fff;
  font-weight: 600; font-size: .9rem;
  transition: background .2s;
}
.trailer-btn:hover { background: #a93226; }

/* Modal trailer iframe */
.trailer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 600;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.trailer-wrap {
  position: relative;
  width: 100%; max-width: 900px;
  aspect-ratio: 16/9;
}
.trailer-wrap iframe { width: 100%; height: 100%; border: none; border-radius: 8px; }
.trailer-close {
  position: absolute; top: -44px; right: 0;
  width: 36px; height: 36px;
  background: rgba(255,255,255,.15);
  border-radius: 50%; font-size: 1.1rem;
  display: grid; place-items: center;
}
.trailer-close:hover { background: var(--accent); }
.modal-close {
  position: fixed; top: 16px; right: 20px;
  width: 38px; height: 38px;
  background: rgba(0,0,0,.7);
  border-radius: 50%; font-size: 1.2rem;
  display: grid; place-items: center;
  z-index: 400;
  cursor: pointer;
  border: 1.5px solid rgba(255,255,255,.15);
}
.modal-close:hover { background: var(--accent); }

/* Episodios */
.season-header {
  font-size: 1rem; font-weight: 700;
  padding: 12px 0 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.episode-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.episode-item {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px;
  background: var(--card-bg);
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s;
}
.episode-item:hover { background: var(--card-hover); }
.episode-still {
  width: 100px; aspect-ratio: 16/9;
  object-fit: cover; border-radius: 6px;
  background: var(--bg3); flex-shrink: 0;
}
.episode-info { flex: 1; min-width: 0; }
.episode-num  { font-size: .75rem; color: var(--text2); }
.episode-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.episode-watched { color: var(--accent); font-size: .8rem; }

/* ===== REPRODUCTOR ===== */
.player-overlay {
  position: fixed; inset: 0;
  background: #000;
  z-index: 500;
  display: flex; flex-direction: column;
}
.player-container { display: flex; flex-direction: column; height: 100%; }
.player-header {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 20px;
  background: rgba(0,0,0,.8);
  position: absolute; top: 0; left: 0; right: 0;
  z-index: 10;
}
.player-close { font-size: 1.3rem; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.1); display: grid; place-items: center; }
.player-close:hover { background: var(--accent); }
.player-title { font-size: 1rem; font-weight: 600; }
.player-time  { font-size: .82rem; color: var(--text2); }
#videoPlayer {
  flex: 1; width: 100%; height: 100%;
  background: #000;
  outline: none;
}
/* Subtítulos: mejorar fuente por defecto del navegador */
#videoPlayer::cue {
  background: rgba(0,0,0,.75);
  color: #fff;
  font-size: 1.1em;
  font-family: inherit;
}
.player-controls-extra {
  position: absolute; bottom: 60px; right: 20px;
  display: flex; align-items: center; gap: 12px;
  z-index: 10;
}
#btnSub {
  transition: background .2s, opacity .2s;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: .82rem;
  cursor: pointer;
}
#subMenu {
  background: rgba(20,20,40,.92);
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: .8rem;
  cursor: pointer;
  max-width: 200px;
}

/* ===== AUDIO PLAYER ===== */
.audio-player {
  position: fixed;
  bottom: 0; left: var(--sidebar-w); right: 0;
  height: 74px;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  z-index: 400;
  display: flex; align-items: center; gap: 20px;
  padding: 0 20px;
}
.audio-cover { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; background: var(--bg3); }
.audio-info   { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.audio-title  { font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.audio-artist { font-size: .78rem; color: var(--text2); }
.audio-controls { display: flex; gap: 10px; align-items: center; font-size: 1.2rem; }
.audio-controls button:hover { color: var(--accent); }
.audio-progress-wrap { flex: 1; display: flex; align-items: center; gap: 10px; }
.audio-progress-wrap span { font-size: .75rem; color: var(--text2); white-space: nowrap; }
#audioSeek, #audioVol {
  accent-color: var(--accent);
  cursor: pointer;
}
#audioSeek { flex: 1; }
.audio-vol-wrap { display: flex; align-items: center; gap: 6px; font-size: .9rem; width: 110px; }
.audio-close { font-size: 1.1rem; opacity: .5; }
.audio-close:hover { opacity: 1; }

/* ===== SETTINGS ===== */
.settings-section { margin-bottom: 36px; }
.settings-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.form-row { display: flex; gap: 10px; margin-bottom: 12px; align-items: flex-end; flex-wrap: wrap; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: .82rem; color: var(--text2); }
.form-input, .form-select {
  padding: 9px 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  outline: none;
  transition: border-color .2s;
}
.form-input:focus, .form-select:focus { border-color: var(--accent); }
.form-input { min-width: 280px; }
.library-list { display: flex; flex-direction: column; gap: 10px; }
.library-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px;
  background: var(--card-bg);
  border-radius: 8px;
}
.library-info { flex: 1; min-width: 0; }
.library-name { font-weight: 600; }
.library-path { font-size: .78rem; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.library-meta  { font-size: .78rem; color: var(--text2); }
.library-actions { display: flex; gap: 8px; flex-shrink: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.stat-card { background: var(--card-bg); border-radius: 10px; padding: 18px; text-align: center; }
.stat-num  { font-size: 2rem; font-weight: 800; color: var(--accent); }
.stat-label { font-size: .8rem; color: var(--text2); margin-top: 4px; }

/* ===== MUSIC PAGE (YouTube Music style) ===== */
.music-header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
  padding: 32px 32px 28px;
  border-radius: 12px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}
.music-header::after {
  content: '';
  position: absolute; top: -60%; right: -20%;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233,69,96,.15) 0%, transparent 70%);
  pointer-events: none;
}
.music-header-title {
  font-size: 2rem; font-weight: 800;
  margin-bottom: 4px;
  position: relative; z-index: 1;
}
.music-header-sub {
  font-size: .88rem; color: var(--text2);
  position: relative; z-index: 1;
}
.music-search-row {
  display: flex; gap: 8px; margin-top: 16px;
  position: relative; z-index: 1;
}
.music-search-row input { flex: 1; background: rgba(255,255,255,.08); border: none; color: #fff; padding: 10px 16px; border-radius: 24px; font-size: .9rem; }
.music-search-row input::placeholder { color: rgba(255,255,255,.4); }
.music-search-row input:focus { background: rgba(255,255,255,.14); outline: none; }
.music-search-row button {
  background: var(--accent); color: #fff; border: none;
  padding: 10px 22px; border-radius: 24px; font-weight: 600; cursor: pointer;
  transition: opacity .2s;
}
.music-search-row button:hover { opacity: .85; }

.music-section { margin-bottom: 32px; }
.music-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.music-section-title { font-size: 1.2rem; font-weight: 700; }
.music-section-link { font-size: .82rem; color: var(--accent); cursor: pointer; opacity: .7; }
.music-section-link:hover { opacity: 1; }

.music-scroll {
  display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.music-scroll::-webkit-scrollbar { height: 6px; }
.music-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.music-card {
  flex-shrink: 0; width: 160px;
  cursor: pointer; transition: transform .2s;
}
.music-card:hover { transform: translateY(-4px); }
.music-card-img {
  width: 160px; height: 160px;
  border-radius: 10px;
  object-fit: cover; background: var(--bg3);
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
}
.music-card-img.round { border-radius: 50%; }
.music-card-title {
  margin-top: 10px; font-weight: 600; font-size: .88rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.music-card-sub {
  font-size: .78rem; color: var(--text2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.music-list-item {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px; border-radius: 8px;
  cursor: pointer; transition: background .2s;
}
.music-list-item:hover { background: rgba(255,255,255,.06); }
.music-list-item-img {
  width: 44px; height: 44px; border-radius: 6px;
  object-fit: cover; background: var(--bg3); flex-shrink: 0;
}
.music-list-item-info { flex: 1; min-width: 0; }
.music-list-item-title { font-weight: 500; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-list-item-sub { font-size: .8rem; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-list-item-action { flex-shrink: 0; }

.music-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

/* ===== YOUTUBE-STYLE SEARCH RESULTS ===== */
.ytdl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.ytdl-card {
  background: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  cursor: default;
}
.ytdl-card:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,.4); }
.ytdl-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg3);
}
.ytdl-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ytdl-dur {
  position: absolute;
  bottom: 6px; right: 6px;
  background: rgba(0,0,0,.8);
  color: #fff;
  font-size: .78rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}
.ytdl-card-body {
  padding: 10px 12px 12px;
}
.ytdl-card-title {
  font-weight: 600;
  font-size: .88rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ytdl-card-channel {
  font-size: .78rem;
  color: var(--text2);
  margin: 4px 0 10px;
}
.ytdl-dl-btn { width: 100%; text-align: center; }

.ytdl-card.clickable { cursor: pointer; }
.ytdl-play-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: #fff;
  background: rgba(0,0,0,.35);
  opacity: 0; transition: opacity .2s;
  pointer-events: none;
}
.ytdl-card.clickable:hover .ytdl-play-overlay { opacity: 1; }

/* ===== AUDIO PLAYER: cola "A continuación" ===== */
.audio-queue-btn { font-size: 1.1rem; opacity: .6; background: none; border: none; color: inherit; cursor: pointer; }
.audio-queue-btn:hover { opacity: 1; }
.audio-queue-panel {
  position: absolute; bottom: 100%; right: 16px;
  width: 300px; max-height: 340px; overflow-y: auto;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px;
  box-shadow: 0 -8px 32px rgba(0,0,0,.5);
  margin-bottom: 8px;
}
.audio-queue-title { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text2); padding: 6px 8px; }
.audio-queue-empty { padding: 12px 8px; font-size: .85rem; color: var(--text2); }
.audio-queue-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.audio-queue-item:hover { background: rgba(255,255,255,.06); }
.audio-queue-item-img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; background: var(--bg3); flex-shrink: 0; }
.audio-queue-item-info { flex: 1; min-width: 0; }
.audio-queue-item-title { font-weight: 500; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.audio-queue-item-sub { font-size: .76rem; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== TOAST ===== */
.toast-container { position: fixed; bottom: 90px; right: 20px; z-index: 600; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 12px 20px;
  background: var(--card-bg);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: .88rem;
  animation: slideIn .3s ease;
}
.toast.success { border-color: #27ae60; }
.toast.error   { border-color: var(--accent); }
@keyframes slideIn { from { opacity:0; transform: translateX(40px); } to { opacity:1; transform: none; } }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .main-content { margin-left: 0; }
  .burger-btn { display: block; }
  .audio-player { left: 0; }
  .page { padding: 20px 16px 80px; }
  .hero { height: 240px; }
  .hero-title { font-size: 1.4rem; }
  /* .detail-panel ya es 100vw por defecto */
  .modal-poster-row { flex-direction: column; align-items: flex-start; margin-top: -40px; }
  .modal-poster { width: 90px; }
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center; padding: 60px 20px; color: var(--text2);
}
.empty-icon { font-size: 4rem; margin-bottom: 16px; }
.empty-text { font-size: 1rem; margin-bottom: 20px; }

/* ===== LOADING ===== */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== WATCHED INDICATOR ===== */
.card.watched .card-poster { opacity: .55; }
.card.watched::after {
  content: '✓';
  position: absolute; top: 8px; left: 8px;
  background: #27ae60; color: #fff;
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: .8rem;
}

/* ===== IPTV ===== */
.iptv-layout {
  display: flex;
  height: calc(100vh - var(--topbar-h));
  overflow: hidden;
}
.iptv-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.iptv-sidebar-head {
  padding: 14px 14px 8px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: .06em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.iptv-groups {
  overflow-y: auto;
  flex: 1;
  padding: 4px 0;
}
.iptv-group-item {
  padding: 8px 16px;
  cursor: pointer;
  font-size: .88rem;
  border-left: 3px solid transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text2);
}
.iptv-group-item:hover { background: var(--bg3); color: var(--text); }
.iptv-group-item.active {
  border-left-color: var(--accent);
  background: var(--card-bg);
  color: var(--text);
  font-weight: 600;
}

.iptv-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.iptv-toolbar {
  padding: 10px 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.iptv-search {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 7px 14px;
  font-size: .88rem;
  outline: none;
}
.iptv-search:focus { border-color: var(--accent); }
.iptv-channel-count {
  font-size: .8rem;
  color: var(--text2);
  white-space: nowrap;
}

.iptv-channels {
  overflow-y: auto;
  flex: 1;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  align-content: start;
}
.iptv-card {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 12px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  transition: background .18s, transform .18s;
  border: 1px solid var(--border);
  position: relative;
}
.iptv-card:hover { background: var(--card-hover); transform: translateY(-2px); }
.iptv-card:hover .iptv-card-edit,
.iptv-card:hover .iptv-card-del { opacity: 1; }
.iptv-card-edit {
  position: absolute;
  top: 6px; right: 6px;
  background: rgba(0,0,0,.55);
  border: none;
  border-radius: 4px;
  color: #e6edf3;
  font-size: .75rem;
  padding: 2px 5px;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
  line-height: 1.4;
}
.iptv-card-edit:hover { background: #238636; }
.iptv-card-del {
  position: absolute;
  top: 6px; right: 30px;
  background: rgba(0,0,0,.55);
  border: none;
  border-radius: 4px;
  color: #e6edf3;
  font-size: .75rem;
  padding: 2px 5px;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
  line-height: 1.4;
}
.iptv-card-del:hover { background: #da3633; }
.iptv-card .drag-handle {
  position: absolute;
  top: 6px; left: 6px;
  background: rgba(0,0,0,.55);
  border: none;
  border-radius: 4px;
  color: #e6edf3;
  font-size: .78rem;
  padding: 2px 6px;
  cursor: grab;
  opacity: 0;
  transition: opacity .15s;
}
.iptv-card:hover .drag-handle { opacity: 1; }
.iptv-card .iptv-move-btns {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity .15s;
}
.iptv-card:hover .iptv-move-btns { opacity: 1; }
.iptv-move-btns button {
  background: rgba(0,0,0,.55);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: #e6edf3;
  font-size: .7rem;
  width: 22px; height: 22px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}
.iptv-move-btns button:hover { background: #238636; }
.iptv-card.dragging { opacity: .45; transform: scale(.97); }
.iptv-card.drag-over { box-shadow: 0 0 0 2px var(--accent); }
.iptv-card img {
  width: 72px; height: 44px;
  object-fit: contain;
  border-radius: 4px;
  background: var(--bg3);
  flex-shrink: 0;
}
.iptv-card-name {
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.iptv-card-group {
  font-size: .7rem;
  color: var(--text2);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  width: 100%;
}

/* Player IPTV */
.iptv-player-overlay {
  position: fixed; inset: 0;
  background: #000;
  z-index: 500;
  display: flex;
  flex-direction: column;
}
.iptv-player-overlay.hidden { display: none; }
.iptv-player-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(0,0,0,.7);
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 1;
}
.iptv-player-title {
  flex: 1;
  font-weight: 700;
  font-size: 1rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.iptv-player-logo {
  height: 32px;
  object-fit: contain;
  border-radius: 4px;
}
.iptv-player-close {
  width: 34px; height: 34px;
  background: rgba(255,255,255,.1);
  border-radius: 50%;
  font-size: 1.1rem;
  display: grid; place-items: center;
  cursor: pointer;
}
.iptv-player-close:hover { background: var(--accent); }
.iptv-player-overlay video {
  width: 100%; height: 100%;
  object-fit: contain;
}

/* Lista IPTV vacía / no configurada */
.iptv-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 100%;
  color: var(--text2);
  padding: 40px;
  text-align: center;
}
.iptv-empty .icon { font-size: 4rem; }
.iptv-empty h2 { color: var(--text); font-size: 1.3rem; }
.iptv-empty p  { font-size: .9rem; max-width: 400px; line-height: 1.6; }
.iptv-add-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}
.iptv-add-form input {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 8px 14px;
  font-size: .88rem;
  width: 320px;
  outline: none;
}
.iptv-add-form input:focus { border-color: var(--accent); }
.iptv-lists-bar {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.iptv-list-chip {
  display: flex; align-items: center; gap: 6px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 10px 4px 12px;
  font-size: .82rem;
  cursor: pointer;
}
.iptv-list-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.iptv-list-chip:hover:not(.active) { background: var(--card-hover); }
.iptv-list-chip-del {
  font-size: .9rem;
  opacity: .6;
  padding: 0 2px;
}
.iptv-list-chip-del:hover { opacity: 1; color: var(--accent); }
.iptv-list-chip-edit {
  font-size: .85rem;
  opacity: .6;
  padding: 0 2px;
}
.iptv-list-chip-edit:hover { opacity: 1; color: #238636; }

/* ── Modal importar URL ──────────────────────── */
.import-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 700;
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
}
.import-modal.open { display: flex; }
.import-modal-box {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 28px;
  width: 100%; max-width: 480px;
  box-shadow: var(--shadow);
}
.import-modal-title {
  font-size: 1.1rem; font-weight: 700; margin-bottom: 16px;
}
.import-modal .form-group { margin-bottom: 12px; }
.import-modal .form-label { display: block; font-size: .8rem; color: var(--text2); margin-bottom: 4px; }
.import-modal .form-input { width: 100%; padding: 10px 12px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg2); color: var(--text); font-size: .9rem; }
.import-modal .form-input:focus { outline: none; border-color: var(--accent); }
.import-modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.import-modal-status { margin-top: 12px; font-size: .85rem; color: var(--text2); }
.import-modal-progress-wrap { margin-top: 12px; height: 6px; background: var(--bg2); border-radius: 3px; overflow: hidden; }
.import-modal-progress-bar { height: 100%; width: 0%; background: var(--accent); border-radius: 3px; transition: width .3s ease; }

/* ── Convert page ──────────────────────────────────── */
.convert-table-wrap { overflow-x: auto; margin-top: 12px; }
.convert-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.convert-table th { text-align: left; padding: 8px 12px; background: var(--bg3); color: var(--text2); font-weight: 600; white-space: nowrap; }
.convert-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); }
.convert-table tr:hover td { background: var(--card-hover); }
.convert-title { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.convert-ext { text-align: center; font-weight: 600; color: var(--accent2); }
.convert-size { text-align: right; color: var(--text2); white-space: nowrap; }
.convert-video, .convert-audio { text-align: center; font-size: .85rem; white-space: nowrap; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.badge-ok { background: #1b4332; color: #95d5b2; }
.badge-proc { background: #3a2a0a; color: #ffd166; }
.badge-pend { background: #3a1a1a; color: #ff6b6b; }

/* ── Informes (catálogo por unidad de almacenamiento) ─────────────── */
.informes-hint { font-size: .85rem; color: var(--text2); padding: 8px 2px; }
.informes-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.informes-table-block { margin-bottom: 28px; }
.informes-table-block:last-child { margin-bottom: 0; }
.informes-table-title { font-weight: 600; margin-bottom: 4px; }
.informes-table-count { font-weight: 400; color: var(--text2); font-size: .85rem; }
.badge-unit-local  { background: #1b3a4a; color: #8ecae6; }
.badge-unit-gdrive { background: #1b4332; color: #95d5b2; }
.badge-unit-proton { background: #3a1b45; color: #d0a6f0; }
.badge-unit-none   { background: var(--bg3); color: var(--text2); }

@media (max-width: 600px) {
  .iptv-layout { flex-direction: column; }
  .iptv-sidebar { width: 100%; height: 120px; flex-direction: row; }
  .iptv-groups { display: flex; flex-direction: row; overflow-x: auto; overflow-y: hidden; padding: 0; }
  .iptv-group-item { white-space: nowrap; border-left: none; border-bottom: 3px solid transparent; }
  .iptv-group-item.active { border-bottom-color: var(--accent); border-left-color: transparent; }
}

/* ===== CUENTAS EN LA NUBE (Google Drive / Proton Drive) =====
   Antes esto se armaba con estilos sueltos "inline" en app.js (colores a
   mano, la tabla de <convert-table> prestada de la pagina de conversion) y
   quedaba sin separacion visual clara entre "cuentas vinculadas" y "agregar
   contenido". Estas clases arman cada bloque como una tarjeta propia
   (mismo lenguaje visual que .settings-section/.library-item/.form-input
   de mas arriba), para que ambas paginas se vean como una sola pieza en
   vez de piezas sueltas pegadas una debajo de la otra. */

.cloud-intro, .cloud-warn, .cloud-banner {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: .85rem;
  line-height: 1.55;
  margin-bottom: 16px;
}
.cloud-intro {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent2);
  color: var(--text2);
}
.cloud-intro code { background: var(--bg3); padding: 1px 6px; border-radius: 4px; font-size: .85em; color: var(--text); }
.cloud-warn {
  background: rgba(233, 69, 96, .08);
  border: 1px solid rgba(233, 69, 96, .3);
  color: #f3b7c0;
}
.cloud-warn code { background: rgba(0, 0, 0, .25); padding: 1px 6px; border-radius: 4px; font-size: .85em; }
.cloud-banner { background: var(--bg2); border: 1px solid var(--border); color: var(--text2); }
.cloud-banner-error { background: rgba(233, 69, 96, .1); border-color: rgba(233, 69, 96, .35); color: #f3b7c0; }

/* Tarjeta contenedora -- una para "Cuentas vinculadas", otra para "Agregar
   contenido": la separacion entre ambas es justamente el gap entre tarjetas
   (24px) mas el borde/fondo propio de cada una. */
.cloud-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 24px;
}
.cloud-section-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.cloud-section-title { font-size: 1.02rem; font-weight: 700; }
.cloud-section-sub   { font-size: .78rem; color: var(--text2); font-weight: 400; margin-top: 3px; }
.cloud-section-sub-sep { margin: 0 6px; opacity: .5; }
.cloud-section-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cloud-form-status { font-size: .78rem; color: var(--text2); margin-top: 8px; }

/* Filas de cuentas: reemplaza la tabla generica por filas tipo "chip",
   mismo patron que .library-item de la pagina de Ajustes. */
.cloud-accounts-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
/* Mas de 5 cuentas: se vuelve una lista con scroll propio (altura fija) en
   vez de seguir empujando el resto de la pagina hacia abajo -- a partir de
   ahi la tarjeta deja de crecer y cuesta lo mismo mantener 6 cuentas que 30. */
.cloud-accounts-list.is-scrollable {
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.cloud-accounts-list.is-scrollable::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.cloud-account-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.cloud-account-label {
  flex-shrink: 0;
  font-family: 'Consolas', 'SFMono-Regular', Menlo, monospace;
  font-size: .78rem; font-weight: 700;
  color: var(--accent2);
  background: var(--bg3);
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: .3px;
}
.cloud-account-email {
  flex: 1 1 160px; min-width: 120px;
  font-size: .87rem; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cloud-account-email.is-missing { color: var(--text2); font-style: italic; }
.cloud-account-quota { flex: 0 0 150px; font-size: .76rem; color: var(--text2); }
.cloud-account-quota .quota-line { white-space: nowrap; margin-bottom: 3px; }
.quota-unlimited { color: var(--text2); }
.quota-bar-track { width: 100%; height: 5px; border-radius: 3px; background: var(--bg3); overflow: hidden; }
.quota-bar-fill { height: 100%; border-radius: 3px; background: #5b8def; transition: width .3s ease; }
.quota-bar-fill.is-high { background: var(--accent2); }
.quota-bar-fill.is-full { background: var(--accent); }
.cloud-account-actions { flex-shrink: 0; display: flex; gap: 6px; margin-left: auto; }

.cloud-add-account-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Barra de filtros para agregar contenido -- reusa .form-row/.form-group/
   .form-select ya definidos arriba (misma pinta que la pagina de Ajustes),
   solo que los inputs quedan un toque mas oscuros para notarse contra el
   fondo de la tarjeta .cloud-section (que ya usa --card-bg). */
.cloud-toolbar { margin-bottom: 6px; }
.cloud-section .form-select, .cloud-section .form-input { background: var(--bg2); }

.cloud-browser-header {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0 12px;
}
.cloud-breadcrumb { font-size: .82rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cloud-breadcrumb-item { color: var(--text2); cursor: pointer; }
.cloud-breadcrumb-item:hover { color: var(--accent); text-decoration: underline; }
.cloud-breadcrumb-item.is-current { color: var(--text); font-weight: 600; cursor: default; }
.cloud-breadcrumb-item.is-current:hover { text-decoration: none; }
.cloud-breadcrumb-sep { color: var(--border); }

.cloud-file-list { list-style: none; padding: 0; margin: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.cloud-file-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}
.cloud-file-row:hover { background: var(--card-hover); }
.cloud-file-name {
  flex: 1; min-width: 0; cursor: default;
  display: flex; gap: 8px; align-items: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: .88rem;
}
.cloud-file-name.is-folder { cursor: pointer; }
.cloud-file-name.is-folder:hover { color: var(--accent); }
.cloud-file-size { color: var(--text2); font-size: .76rem; white-space: nowrap; flex-shrink: 0; }
.cloud-file-msg { padding: 16px; color: var(--text2); font-size: .88rem; text-align: center; }

/* Fila del formulario "confirmar agregar" que aparece bajo un archivo --
   los inputs se estilizan chicos a proposito (no usan .form-input, que
   fuerza min-width:280px, muy ancho para campos como "Temp."/"Ep."). */
.cloud-add-form-row {
  padding: 12px 14px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.cloud-add-form-row input, .cloud-add-form-row select {
  padding: 7px 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text);
  font-size: .85rem;
  outline: none;
}
.cloud-add-form-row input:focus, .cloud-add-form-row select:focus { border-color: var(--accent); }

.cloud-upload-progress-head { display: flex; justify-content: space-between; font-size: .8rem; color: var(--text2); margin-bottom: 5px; }
.cloud-upload-progress-track { height: 7px; background: var(--bg3); border-radius: 4px; overflow: hidden; }
.cloud-upload-progress-fill { height: 100%; width: 0%; background: var(--accent); transition: width .15s; }
