:root {
  --bg: #0c0e13;
  --side: #11141a;
  --panel: #151922;
  --panel2: #1b202b;
  --line: #232836;
  --line2: #2e3445;
  --text: #e8eaf0;
  --muted: #8a90a2;
  --accent: #f28c1c;
  --accent-h: #ff9d33;
  --danger: #e5534b;
  --r: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 14.5px/1.5 Inter, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1 { font-size: 26px; line-height: 1.2; margin: 0 0 4px; letter-spacing: -.02em; font-weight: 700; }
h2 { font-size: 16px; margin: 0 0 14px; font-weight: 650; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: ui-monospace, "JetBrains Mono", Consolas, monospace; font-size: 13px; word-break: break-all; }
.error { color: #ff7b72; margin: 0; font-size: 13.5px; }
svg.i3d { flex-shrink: 0; overflow: visible; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .45)); }
svg.f3d { overflow: visible; filter: drop-shadow(0 12px 14px rgba(0, 0, 0, .5)); transition: transform .25s ease; }

/* ---------- layout ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px; flex-shrink: 0; position: sticky; top: 0; height: 100vh;
  background: var(--side); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 18px 14px 14px; gap: 14px; overflow-y: auto;
}
.main { flex: 1; min-width: 0; padding: 30px 36px 60px; }
.main > * { max-width: 1320px; }

.brand { display: flex; align-items: center; gap: 12px; padding: 2px 6px 12px; border-bottom: 1px solid var(--line); }
.brand b { display: block; font-size: 17px; letter-spacing: -.01em; }
.brand small { display: block; color: var(--muted); font-size: 12px; }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: #6b7183; margin: 14px 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 7px 10px; border-radius: 10px;
  color: #c3c8d4; font-weight: 500; transition: background .12s, color .12s;
}
.nav-item span { flex: 1; }
.nav-item em { font-style: normal; font-size: 12px; color: var(--muted); background: var(--panel2); border-radius: 99px; padding: 1px 8px; }
.nav-item svg { transition: transform .2s ease; }
.nav-item:hover { background: var(--panel); color: var(--text); }
.nav-item:hover svg { transform: translateY(-1px) scale(1.06); }
.nav-item.on { background: var(--panel2); color: #fff; box-shadow: inset 0 0 0 1px var(--line2); }
.nav-item.on em { background: var(--accent); color: #1b1005; }

.mini-disk { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 12px; }
.mini-disk:hover { border-color: var(--line2); }
.mini-disk-top { display: flex; justify-content: space-between; margin-bottom: 7px; color: var(--muted); }
.mini-disk-top b { color: var(--text); }
.mini-disk small { display: block; color: var(--muted); margin-top: 6px; }

.me { display: flex; align-items: center; gap: 10px; padding: 10px 6px 0; border-top: 1px solid var(--line); }
.me span { flex: 1; min-width: 0; }
.me b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; }
.me small { color: var(--muted); font-size: 12px; }
.me-out { opacity: .75; transition: opacity .15s; }
.me-out:hover { opacity: 1; }

.bar { height: 6px; background: var(--panel2); border-radius: 99px; overflow: hidden; }
.bar.big { height: 10px; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .2s; }

/* ---------- head / toolbar ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head p { margin: 0; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.toolbar { display: flex; gap: 10px; }
.search { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; color: var(--muted); }
.search input { background: none; border: 0; padding: 9px 0; width: 220px; }
input, select, textarea {
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 9px 12px; font: inherit; outline: none; transition: border-color .12s;
}
.search:focus-within, input:focus, select:focus, textarea:focus { border-color: var(--accent); }
.search input:focus { border: 0; }
textarea { resize: vertical; min-height: 120px; line-height: 1.55; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; white-space: nowrap;
  background: var(--panel2); color: var(--text); border: 1px solid var(--line2);
  border-radius: 10px; padding: 8px 14px; font: inherit; font-weight: 600; transition: background .12s, border-color .12s, transform .08s;
}
.btn:hover { background: #222836; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn svg.i3d { filter: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #1b1005; }
.btn-primary:hover { background: var(--accent-h); }
.btn-danger { background: transparent; color: #ff8b84; border-color: rgba(229, 83, 75, .4); }
.btn-danger:hover { background: rgba(229, 83, 75, .1); }
.btn-lg { padding: 11px 18px; font-size: 15px; }
.btn-sm { padding: 6px 11px; font-size: 13px; }

/* ---------- cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  display: flex; flex-direction: column; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.card:hover { border-color: var(--line2); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0, 0, 0, .35); }
.card:hover svg.f3d { transform: translateY(-4px); }
.card-cover, .detail-cover {
  display: flex; align-items: center; justify-content: center; height: 170px; overflow: hidden;
  background: radial-gradient(70% 90% at 50% 100%, var(--tint), transparent 70%), var(--panel2);
  border-bottom: 1px solid var(--line);
}
.tint-zip    { --tint: rgba(233, 162, 26, .22); }
.tint-targz  { --tint: rgba(47, 116, 230, .25); }
.tint-jar    { --tint: rgba(226, 70, 59, .22); }
.tint-rar    { --tint: rgba(123, 82, 230, .25); }
.tint-image  { --tint: rgba(31, 168, 100, .22); }
.tint-other  { --tint: rgba(140, 150, 170, .18); }
.cover-img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 14px 16px 10px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-weight: 650; font-size: 15.5px; line-height: 1.35; }
.card-title:hover { color: var(--accent-h); }
.card-desc { margin: 0; color: var(--muted); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chip { font-size: 12px; font-weight: 600; color: #b9bfcc; background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 8px; }
.chip-zip { color: #f5c04e; border-color: rgba(245, 192, 78, .3); }
.chip-targz { color: #7db8ff; border-color: rgba(125, 184, 255, .3); }
.chip-jar { color: #ff8f85; border-color: rgba(255, 143, 133, .3); }
.chip-rar { color: #b9a0ff; border-color: rgba(185, 160, 255, .3); }
.chip-image { color: #6fe0a2; border-color: rgba(111, 224, 162, .3); }
.card-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px 14px; }

.empty { text-align: center; padding: 70px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty h2 { font-size: 20px; margin: 18px 0 0; }
.empty p { margin: 0 0 14px; }

/* ---------- detail ---------- */
.back { display: inline-block; color: var(--muted); margin-bottom: 16px; font-weight: 500; }
.back:hover { color: var(--text); }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px; margin-bottom: 22px; align-items: start; }
.detail-cover { height: 340px; border-radius: var(--r); border: 1px solid var(--line); }
.detail-info h1 { font-size: 30px; margin: 10px 0 18px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 22px; }
.facts div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.facts dt { color: var(--muted); font-size: 12px; }
.facts dd { margin: 2px 0 0; font-weight: 600; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.detail-actions form { margin: 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; margin-bottom: 18px; }
.description { white-space: pre-wrap; word-wrap: break-word; color: #cdd2dc; line-height: 1.65; }

/* ---------- login ---------- */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: radial-gradient(60% 50% at 50% 0%, rgba(242, 140, 28, .12), transparent 70%), var(--bg); }
.auth-card { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  padding: 30px 28px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.auth-logo { display: flex; justify-content: center; margin-bottom: 2px; }
.auth-card h1 { text-align: center; margin: 0; }
.auth-card > p { text-align: center; margin: -6px 0 6px; }
.auth-card .btn { margin-top: 6px; }

/* ---------- forms ---------- */
.form-grid { display: flex; flex-direction: column; gap: 18px; max-width: 760px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13.5px; }
.field small { font-weight: 400; }
.drop {
  display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; text-align: center;
  border: 1.5px dashed var(--line2); border-radius: var(--r); padding: 28px 20px; background: var(--bg);
  transition: border-color .12s, background .12s; font-weight: 500;
}
.drop.small { flex-direction: row; justify-content: flex-start; padding: 12px 16px; gap: 14px; }
.drop:hover, .drop.over { border-color: var(--accent); background: rgba(242, 140, 28, .05); }
.drop:hover svg.f3d, .drop.over svg.f3d { transform: translateY(-4px); }
.progress-text { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-top: 6px; }
.cover-edit { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.thumb { width: 240px; height: 150px; }
.cover-actions { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }

/* ---------- storage ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { display: flex; align-items: center; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.stat small { display: block; color: var(--muted); }
.stat b { display: block; font-size: 22px; letter-spacing: -.02em; }
.stat span { font-size: 12.5px; }
.disk-bar { display: flex; height: 18px; background: var(--panel2); border-radius: 6px; overflow: hidden; margin-bottom: 12px; }
.disk-bar i { display: block; height: 100%; }
.disk-bar i + i { border-left: 2px solid var(--panel); }
i.other { background: #5b6478; }
i.cloud { background: var(--accent); }
i.free { background: var(--panel2); border: 1px solid var(--line2); }
.legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; margin-bottom: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.kind-list, .rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.kind-list li, .rank-list li { display: flex; align-items: center; gap: 12px; }
.kl-body { flex: 1; }
.kl-top { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 5px; }
.kl-top span { color: var(--muted); }
.rank-list a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-list a:hover { color: var(--accent-h); }
.rank-list span { color: var(--muted); font-size: 13px; }

/* ---------- mobil ---------- */
@media (max-width: 960px) {
  .detail, .two-col { grid-template-columns: 1fr; }
  .detail-cover { height: 240px; }
  .main { padding: 22px 18px 50px; }
}
@media (max-width: 720px) {
  .layout { flex-direction: column; }
  .sidebar { position: sticky; z-index: 5; width: 100%; height: auto; flex-direction: row; align-items: center; padding: 8px 10px; gap: 6px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { border: 0; padding: 0 4px; }
  .brand span, .nav-title, .mini-disk, .me span, .nav-item em { display: none; }
  .nav { flex-direction: row; gap: 2px; }
  .nav-item { flex-direction: column; gap: 3px; padding: 6px 8px; font-size: 11px; white-space: nowrap; }
  .me { border: 0; padding: 0; }
  .me > svg { display: none; }
  .head-actions, .toolbar { width: 100%; }
  .search { flex: 1; }
  .search input { width: 100%; }
  .facts { grid-template-columns: 1fr; }
}
