:root {
  --bg: #0f1115; --panel: #161a21; --row: #1b2029; --line: #262c37;
  --text: #e6e8ec; --muted: #8b93a3; --accent: #ff8a3d; --accent2: #ffb17a;
  --dir: #6cb6ff; --hit: rgba(255, 138, 61, .28);
  --radius: 10px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f6f8; --panel: #ffffff; --row: #ffffff; --line: #e3e6eb;
    --text: #1d222b; --muted: #687083; --accent: #e0661c; --accent2: #b84e0f;
    --dir: #1f6feb; --hit: rgba(224, 102, 28, .2);
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
main.wrap { flex: 1; }

.top { background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; gap: 18px; height: 58px; overflow: hidden; }
.brand { font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand small { font-weight: 400; color: var(--muted); font-size: 12px; }
.logo { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 15px; }
.crumbs { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 14px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.crumbs a { padding: 3px 8px; border-radius: 6px; }
.crumbs a:hover { background: var(--row); color: var(--text); }
.crumbs a:last-child { color: var(--text); font-weight: 600; }
.crumbs .sep { opacity: .5; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 22px 0 10px; }
.toolbar[hidden] { display: none; }
.search { flex: 1 1 320px; position: relative; }
.search svg { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); fill: var(--muted); }
.search input { width: 100%; padding: 11px 14px 11px 40px; font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); outline: none; transition: border-color .15s, box-shadow .15s; }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--hit); }
.toggle { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 14px; cursor: pointer; user-select: none; }
.toggle input { accent-color: var(--accent); width: 16px; height: 16px; }
.types { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.chip { font: inherit; font-size: 12.5px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; }
.chip:hover { color: var(--text); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.status { color: var(--muted); font-size: 13px; min-height: 20px; margin-bottom: 8px; }

.tbl { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; user-select: none; white-space: nowrap; }
.tbl th:hover { color: var(--text); }
.tbl th .arr { color: var(--accent); margin-left: 4px; }
.tbl td { padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--row); }
.tbl .size, .tbl .date { color: var(--muted); font-size: 13.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl .size { text-align: right; }
.tbl th.size { text-align: right; }
.tbl .act { width: 1%; white-space: nowrap; text-align: right; }

.name { display: flex; align-items: center; gap: 11px; min-width: 0; }
.name a { overflow-wrap: anywhere; }
.name a:hover { color: var(--accent2); text-decoration: underline; }
.name .path { color: var(--muted); font-size: 12.5px; display: block; }
.ic { flex: none; width: 34px; height: 24px; border-radius: 6px; display: grid; place-items: center; font-size: 10px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: #fff; background: #5b6474; }
.ic.dir { background: transparent; color: var(--dir); font-size: 19px; }
.ic.up { background: transparent; color: var(--muted); font-size: 17px; }
.is-dir a { color: var(--dir); font-weight: 500; }
.ic.t-bsp { background: #d9534f; } .ic.t-nav { background: #a14b8f; }
.ic.t-bz2, .ic.t-zip, .ic.t-7z, .ic.t-rar, .ic.t-gz { background: #b7791f; }
.ic.t-vpk { background: #2f855a; }
.ic.t-vtf, .ic.t-vmt, .ic.t-png, .ic.t-jpg, .ic.t-tga { background: #3182ce; }
.ic.t-mdl, .ic.t-vvd, .ic.t-vtx, .ic.t-phy { background: #6b46c1; }
.ic.t-wav, .ic.t-mp3, .ic.t-ogg { background: #c05621; }
.ic.t-txt, .ic.t-cfg, .ic.t-res, .ic.t-json, .ic.t-smx, .ic.t-sp { background: #4a5568; }
mark { background: var(--hit); color: inherit; border-radius: 3px; padding: 0 1px; }

.copy { font: inherit; font-size: 12px; color: var(--muted); background: none; border: 1px solid transparent; border-radius: 6px; padding: 3px 8px; cursor: pointer; opacity: 0; transition: opacity .15s; }
tr:hover .copy, .copy:focus { opacity: 1; border-color: var(--line); }
.copy:hover { color: var(--text); }
.copy.ok { color: var(--accent); opacity: 1; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

#raw table { width: 100%; }
#raw.js-on { display: none; }
.foot { color: var(--muted); font-size: 12.5px; padding: 26px 20px 30px; text-align: center; }

@media (max-width: 640px) {
  .brand small, .tbl .date, .tbl th.date { display: none; }
  .tbl td, .tbl th { padding: 9px 10px; }
  .copy { opacity: 1; }
}
