:root { color-scheme: dark; }
* { box-sizing: border-box; }
body {
  margin: 0; font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #0f1115; color: #e5e7eb;
}
.hidden { display: none !important; }
.login { max-width: 340px; margin: 18vh auto; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.login h1 { margin: 0; text-align: center; letter-spacing: .2em; }
.hint { color: #9ca3af; font-size: 13px; margin: 0; }
.error { color: #f87171; font-size: 13px; min-height: 18px; margin: 0; }
input, select, button {
  background: #171a21; color: #e5e7eb; border: 1px solid #2b303b;
  border-radius: 8px; padding: 10px 12px; font: inherit;
}
button { cursor: pointer; background: #2563eb; border-color: #2563eb; }
button:hover { filter: brightness(1.1); }
button.ghost { background: transparent; border-color: #2b303b; }
button.close { border: none; font-size: 20px; padding: 0 8px; }
header {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  border-bottom: 1px solid #1f242d; position: sticky; top: 0; background: #0f1115; z-index: 10;
}
header strong { letter-spacing: .15em; }
header .ghost { margin-left: auto; }
.badge { font-size: 12px; color: #9ca3af; border: 1px solid #2b303b; padding: 2px 8px; border-radius: 999px; }
.panel { padding: 18px; max-width: 1200px; margin: 0 auto; }
.panel h2 { font-size: 15px; color: #9ca3af; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip { padding: 6px 12px; border-radius: 999px; background: #171a21; border: 1px solid #2b303b; cursor: pointer; font-size: 13px; }
.chip.active { background: #1d4ed8; border-color: #1d4ed8; }
.form-row { display: flex; flex-wrap: wrap; gap: 8px; }
.form-row input { flex: 1 1 160px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-top: 12px; }
.card { cursor: pointer; }
.card img, .poster-fallback {
  width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 10px; background: #171a21; display: flex;
  align-items: center; justify-content: center; color: #4b5563; font-size: 12px;
}
.card .name { font-size: 13px; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .sub { font-size: 11px; color: #6b7280; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal-box { background: #12151b; border: 1px solid #2b303b; border-radius: 14px; max-width: 720px; width: 100%; max-height: 85vh; overflow: auto; padding: 20px; position: relative; }
.modal-box h2 { margin-top: 0; }
.detail-actions { display: flex; gap: 8px; margin: 14px 0; }
video { width: 100%; border-radius: 10px; background: #000; }
.dir { padding: 8px 10px; border-bottom: 1px solid #1f242d; cursor: pointer; display: flex; gap: 8px; }
.dir:hover { background: #171a21; }
