:root {
    --bg: #f6f7f9; --surface: #fff; --text: #1b1f24; --muted: #667085; --border: #e3e6ea;
    --accent: #2563eb; --accent-text: #fff; --danger: #c0362c;
    --audio: #7c3aed; --video: #db2777; --other: #64748b;
    --ok-bg: #e8f5ec; --ok-text: #1e6b3a; --err-bg: #fdecea; --err-text: #9b2c22;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f1216; --surface: #181c22; --text: #e6e8eb; --muted: #98a2b3; --border: #2a3039;
        --accent: #3b82f6; --danger: #ef5b4f; --audio: #a78bfa; --video: #f472b6; --other: #94a3b8;
        --ok-bg: #12301d; --ok-text: #86efac; --err-bg: #3a1714; --err-text: #fca5a5;
    }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); text-decoration: none; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { font-weight: 700; color: var(--text); }
.brand span { color: var(--accent); }
.container { max-width: 960px; margin: 0 auto; padding: 20px 16px 48px; }
.inline { display: inline; margin: 0; }
.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; }
.link:hover { color: var(--text); }
.heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 18px; }
.crumbs span { color: var(--muted); }
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 24px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.card h2 { font-size: 14px; margin: 0 0 10px; }
.card input[type=text], .card input[type=url], .card input[type=file] { width: 100%; padding: 7px 9px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); font: inherit; }
.hint { color: var(--muted); font-size: 12px; margin: 6px 0 10px; }
.button { display: inline-block; padding: 7px 14px; border: 0; border-radius: 6px; background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 600; cursor: pointer; }
.button.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.button-row { display: flex; gap: 8px; margin-top: 16px; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 20px 0 8px; }
.files-header { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 8px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.tabs a { padding: 4px 10px; border-radius: 999px; color: var(--muted); font-size: 13px; }
.tabs a.active { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.list li + li { border-top: 1px solid var(--border); }
.row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: var(--text); }
.row:hover { background: var(--bg); }
.name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta { color: var(--muted); font-size: 12px; white-space: nowrap; }
.badge { display: inline-block; min-width: 50px; text-align: center; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; text-transform: uppercase; color: #fff; }
.badge-audio { background: var(--audio); } .badge-video { background: var(--video); } .badge-other { background: var(--other); }
.empty { color: var(--muted); padding: 16px 0; }
.flash { padding: 10px 14px; border-radius: 8px; margin: 0 0 12px; }
.flash-success { background: var(--ok-bg); color: var(--ok-text); }
.flash-error { background: var(--err-bg); color: var(--err-text); }
.file-detail h1 { font-size: 20px; margin: 0 0 14px; word-break: break-word; }
.file-detail audio, .file-detail video { width: 100%; max-height: 70vh; margin-bottom: 14px; background: #000; border-radius: 8px; }
.file-detail audio { background: none; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
dt { color: var(--muted); }
dd { margin: 0; }
.wrap { word-break: break-all; }
@media (max-width: 560px) { .meta { display: none; } }
.login { max-width: 360px; margin: 48px auto; display: flex; flex-direction: column; gap: 12px; }
.login h1 { font-size: 20px; margin: 0; }
.login label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.login input { padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); font: inherit; }
