:root {
  color-scheme: dark;
  --bg: #12161c; --panel: #1b212a; --line: #2f3845; --text: #eceff4; --muted: #a3adbb;
  --accent: #f0b454; --on-accent: #1d1505; --danger: #ff8d84; --ok: #86d6a4;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 "Segoe UI", system-ui, sans-serif; }
main { width: min(1080px, 100%); margin: 0 auto; padding: 28px 20px 64px; }
h1 { font-size: 1.7rem; line-height: 1.2; margin: 0 0 18px; overflow-wrap: anywhere; }
h2 { font-size: 1.15rem; margin: 32px 0 12px; }
a { color: var(--accent); }
.muted, small { color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.top { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; color: var(--text); text-decoration: none; }
.top nav { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--text); }

button, .button { display: inline-block; font: inherit; line-height: 1.4; padding: 7px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--text); cursor: pointer; text-decoration: none; }
button:hover, .button:hover { border-color: var(--muted); }
.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.danger { color: var(--danger); }
button.link { border: 0; background: none; padding: 0; color: var(--muted); }
button.link:hover { color: var(--text); }

.stack { display: grid; gap: 16px; max-width: 420px; }
.stack.wide { max-width: 720px; }
.stack .primary { justify-self: start; }
label { display: grid; gap: 5px; }
label.check { display: flex; gap: 10px; align-items: center; }
label.check input { width: auto; }
input, textarea, select { font: inherit; width: 100%; padding: 9px 11px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 6px; }
textarea { resize: vertical; }

.login { max-width: 380px; margin: 10vh auto 0; }
.login .primary { justify-self: stretch; }
.alert { border-left: 3px solid; padding: 10px 14px; margin: 0 0 18px; background: var(--panel); }
.alert p { margin: 2px 0; }
.alert.error { border-color: var(--danger); }
.alert.ok { border-color: var(--ok); }

.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px 24px; grid-template-columns: repeat(auto-fill, minmax(min(180px, 42%), 1fr)); }
.card { display: grid; gap: 8px; justify-items: start; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
/* Frente de um estojo de DVD: 130 x 184 mm, com a dobra da lombada à esquerda. */
.cover { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 130 / 184; overflow: hidden; border-radius: 3px 6px 6px 3px; background: var(--panel); box-shadow: 0 0 0 1px var(--line), 0 8px 18px rgb(0 0 0 / .45); }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(255 255 255 / .16) 0 1.5%, rgb(0 0 0 / .38) 3%, rgb(255 255 255 / .08) 5%, transparent 8%); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-title { padding: 0 14% 0 18%; color: var(--accent); font-size: 1.15rem; font-weight: 700; line-height: 1.25; text-align: center; text-wrap: balance; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.card:hover .cover, .card:focus-visible .cover { box-shadow: 0 0 0 2px var(--accent), 0 8px 18px rgb(0 0 0 / .45); }
.tag { font-size: .8rem; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 7px; }
.empty { color: var(--muted); padding: 32px 0; }

.player { aspect-ratio: 16 / 9; background: #000; border-radius: 8px; overflow: hidden; }
.player iframe { display: block; width: 100%; height: 100%; border: 0; }
.status { color: var(--muted); margin: 12px 0; }
.status.error { color: var(--danger); }
.desc { white-space: pre-line; max-width: 70ch; }

.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: start; justify-content: space-between; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: start; }
.inline { display: flex; gap: 8px; margin-top: 8px; }
summary.button { list-style: none; }
[hidden] { display: none !important; }
