/* Copyright (c) 2024–2026 Deimos.TV. All rights reserved. Proprietary. */
:root, html[data-theme="void"] {
  --bg: #0f0f0f;
  --bg-elev: #1a1a1a;
  --bg-header: #212121;
  --bg-card: #181818;
  --border: #2c2c2c;
  --text: #f1f1f1;
  --muted: #aaaaaa;
  --green: #00a01d;
  --green-hover: #00c224;
  --danger: #e53935;
  --radius: 8px;
}
html[data-theme="sky"] {
  --green: #38bdf8;
  --green-hover: #7dd3fc;
}
html[data-theme="violet"] {
  --green: #a78bfa;
  --green-hover: #c4b5fd;
}
html[data-theme="amber"] {
  --green: #fbbf24;
  --green-hover: #fde68a;
}
html[data-theme="rose"] {
  --green: #fb7185;
  --green-hover: #fda4af;
}
html[data-theme="aqua"] {
  --green: #2dd4bf;
  --green-hover: #5eead4;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.header {
  position: sticky; top: 0; z-index: 20;
  height: 56px; display: flex; align-items: center; gap: 16px;
  padding: 0 16px; background: var(--bg-header); border-bottom: 1px solid #111;
}
.icon-btn {
  width: 40px; height: 40px; border: 0; background: transparent; color: #ddd;
  border-radius: 50%; cursor: pointer; display: grid; place-items: center;
}
.icon-btn:hover { background: #333; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .3px; }
.logo {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
  background: #111; display: block;
}
.ver { font-size: 11px; color: #888; font-weight: 600; margin-left: 4px; }
.site-foot { text-align: center; color: #666; font-size: 12px; padding: 16px; }
.search-wrap { flex: 1; display: flex; justify-content: center; }
.search {
  display: flex; width: min(560px, 100%);
  border: 1px solid #3a3a3a; border-radius: 4px; overflow: hidden; background: #121212;
}
.search input {
  flex: 1; border: 0; background: transparent; color: var(--text); padding: 8px 12px; outline: none;
}
.search button { width: 52px; border: 0; background: #2b2b2b; color: #ccc; cursor: pointer; }
.search button:hover { background: #3a3a3a; }
.header-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  padding: 9px 14px; border-radius: 4px; font-weight: 650;
}
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-hover); }
.btn-ghost { background: transparent; color: var(--green); font-weight: 700; }
.btn-ghost:hover { background: rgba(0,160,29,.12); }
.btn-outline { background: transparent; color: #ddd; border: 1px solid #444; }

.layout { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 56px); }
.sidebar {
  background: var(--bg); border-right: 1px solid #151515; padding: 12px 8px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: #e6e6e6;
}
.nav-item:hover, .nav-item.active { background: #272727; }
.nav-label { font-size: 12px; color: var(--muted); padding: 16px 12px 6px; text-transform: uppercase; letter-spacing: .08em; }

.main { padding: 24px; }
.hero-empty {
  min-height: 52vh; display: grid; place-items: center; text-align: center; gap: 16px;
}
.hero-empty p { color: #ddd; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.card { display: block; }
.thumb {
  aspect-ratio: 16/9; background: #111; border-radius: 8px; overflow: hidden; position: relative;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.duration {
  position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.82); color: #fff;
  font-size: 12px; padding: 2px 6px; border-radius: 3px;
}
.card h3 { margin: 10px 0 4px; font-size: 15px; font-weight: 650; line-height: 1.3; }
.meta { color: var(--muted); font-size: 13px; }

.player-page { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 1fr 340px; gap: 24px; }
video.player { width: 100%; background: #000; border-radius: 10px; max-height: 72vh; }
.video-info h1 { font-size: 20px; margin: 14px 0 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.chip { background: #2a2a2a; color: #ddd; padding: 4px 10px; border-radius: 999px; font-size: 12px; }
.desc { color: #cfcfcf; background: #1b1b1b; padding: 14px; border-radius: 8px; margin-top: 14px; line-height: 1.5; }

.form-card {
  max-width: 480px; margin: 40px auto; background: var(--bg-elev); padding: 28px;
  border-radius: 12px; border: 1px solid var(--border);
}
.form-card h1 { margin-top: 0; }
label { display: block; margin: 14px 0 6px; color: #ccc; font-size: 13px; }
input[type=text], input[type=password], input[type=file], input[type=url], input[type=date], input[type=number], select, textarea {
  width: 100%; background: #121212; border: 1px solid #333; color: #fff;
  padding: 10px 12px; border-radius: 6px;
}
.player-wrap { position: relative; }
.unmute-pop {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(1);
  z-index: 5; border: 0; cursor: pointer;
  background: rgba(0,0,0,.78); color: #fff;
  font-weight: 800; letter-spacing: .04em;
  padding: 14px 22px; border-radius: 999px;
  box-shadow: 0 8px 32px rgba(0,0,0,.45);
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease, color .18s ease;
}
.unmute-pop:hover {
  background: var(--green);
  color: #04140a;
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 12px 40px rgba(0, 160, 29, .45);
}
.unmute-pop:active {
  transform: translate(-50%, -50%) scale(.96);
}
.wm {
  position: absolute; left: 12px; bottom: 48px; pointer-events: none;
  background: rgba(0,0,0,.55); color: #fff; font-size: 13px; font-weight: 700;
  padding: 4px 8px; border-radius: 4px;
}
.alert { background: #3a1515; color: #ffb4b4; padding: 10px 12px; border-radius: 6px; margin-bottom: 12px; }
.ok { background: #143318; color: #b6f5c0; padding: 10px 12px; border-radius: 6px; margin-bottom: 12px; }

.storage-page { max-width: 880px; margin: 0 auto; }
.storage-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 22px; }
.storage-hero h1 { margin: 4px 0 8px; font-size: 28px; }
.kicker { color: var(--green); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin: 0; }
.lead { color: var(--muted); max-width: 52ch; line-height: 1.5; margin: 0; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  background: #161616; border: 1px solid #2a2a2a; border-radius: 999px;
  padding: 8px 14px; font-size: 13px; color: #cfcfcf;
}
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(0,160,29,.2); }
.lock-card {
  background: linear-gradient(180deg, #1c241c, #151515);
  border: 1px solid #2a4a2a; border-radius: 16px; padding: 22px; margin-bottom: 22px;
}
.lock-card h2 { margin: 0 0 8px; }
.lock-card p { color: #c8c8c8; line-height: 1.5; }
.storage-form h2 { font-size: 16px; margin: 8px 0 6px; }
.kind-block { margin-bottom: 22px; }
.kind-blurb { color: #888; font-size: 13px; margin: 0 0 12px; }
.kind-s3 .prov { border-color: #2a3344; }
.kind-decentralized .prov { border-color: #2a442a; }
.prov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-bottom: 22px; }
.prov {
  display: block; padding: 14px 14px 16px; border-radius: 12px;
  border: 1px solid #2a2a2a; background: #141414; cursor: pointer; min-height: 108px;
}
.prov input { position: absolute; opacity: 0; pointer-events: none; }
.prov strong { display: block; margin-bottom: 6px; }
.prov span { color: #9a9a9a; font-size: 13px; line-height: 1.4; }
.prov:hover { border-color: #3d3d3d; }
.prov.on { border-color: var(--green); background: #102010; box-shadow: inset 0 0 0 1px rgba(0,160,29,.35); }
.fields { background: #161616; border: 1px solid #2a2a2a; border-radius: 16px; padding: 8px 18px 20px; }
.field { margin-top: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hint { color: #777; font-size: 12px; margin: 6px 0 0; }
.opt { color: #777; font-weight: 400; }
.actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
code { font-size: 12px; color: #cde; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .player-page { grid-template-columns: 1fr; }
  .storage-hero, .field-row { display: block; }
}
.live-dot { display:inline-block; background:#e11; color:#fff; font-size:11px; font-weight:700; padding:2px 6px; border-radius:3px; letter-spacing:.04em; }
.live-thumb { min-height:140px; background:#1a0000; display:flex; align-items:flex-start; padding:8px; }
.toolbar { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:16px; }
.player-wrap iframe.player { width:100%; aspect-ratio:16/9; border:0; background:#000; }
.hp { position:absolute; left:-9999px; height:0; overflow:hidden; }
.theme-row { display:flex; gap:8px; padding:4px 12px 12px; }
.swatch { width:22px; height:22px; border-radius:50%; border:2px solid #555; display:inline-block; }
.swatch.void { background:#00a01d; }
.swatch.sky { background:#38bdf8; }
.swatch.violet { background:#a78bfa; }
.swatch.amber { background:#fbbf24; }
.swatch.rose { background:#fb7185; }
.swatch.aqua { background:#2dd4bf; }
.sync-bar { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin:12px 0; padding:10px 12px; background:var(--bg-elev,#1a1a1a); border-radius:8px; }
.admin { max-width: 1100px; margin: 0 auto; }
.admin h1 { margin: 4px 0 8px; font-size: 28px; }
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px; margin: 20px 0 28px;
}
.stat {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px 14px;
}
.stat b { display: block; font-size: 22px; font-weight: 750; }
.stat span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.admin-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; }
@media (max-width: 900px) { .admin-grid { grid-template-columns: 1fr; } }
.admin-card {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px;
  padding: 20px 22px; margin-bottom: 16px;
}
.admin-card h2 { margin: 0 0 8px; font-size: 18px; }
.admin-card h3 { margin: 22px 0 8px; font-size: 14px; color: var(--muted); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px 6px; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 10px 6px; border-bottom: 1px solid #222; vertical-align: middle; }
