:root{
  --bg:#0b1020;
  --surface:#111827;
  --surface2:#0f172a;
  --border:#1f2937;
  --text:#e5e7eb;
  --muted:#94a3b8;
  --brand:#7c3aed;
  --brand2:#6d28d9;
  --danger:#ef4444;
  --success:#22c55e;
  --shadow: 0 14px 40px rgba(0,0,0,.45);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: radial-gradient(1000px 600px at 20% -10%, rgba(124,58,237,.22), transparent 60%),
              radial-gradient(900px 520px at 100% 0%, rgba(59,130,246,.12), transparent 55%),
              var(--bg);
  color:var(--text);
}

a{color:inherit;text-decoration:none}
.muted{color:var(--muted)}
.link{color:var(--text);opacity:.9}
.link:hover{opacity:1;text-decoration:underline}

.topbar{
  position:sticky; top:0; z-index:50;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px;
  background: rgba(17,24,39,.78);
  border-bottom:1px solid rgba(31,41,55,.7);
  backdrop-filter: blur(10px);
}
.topbar-left{display:flex;gap:12px;align-items:center}
.brand{font-weight:800;letter-spacing:.2px}
.topbar-right{display:flex;align-items:center;gap:10px}
.logo{width:34px;height:34px;opacity:.95}

.container{
  max-width:1100px;
  margin:0 auto;
  padding:22px 16px 80px;
}

.panel{
  background: linear-gradient(180deg, rgba(17,24,39,.92), rgba(15,23,42,.92));
  border:1px solid rgba(31,41,55,.8);
  border-radius:16px;
  padding:18px;
  box-shadow: var(--shadow);
}

h1{margin:0 0 10px; font-size:22px}
.title{margin:0; font-size:22px}
.meta{margin-top:10px; color:var(--muted); display:flex; gap:8px; flex-wrap:wrap}

.empty{
  padding:46px 18px;
  text-align:center;
  border:1px dashed rgba(148,163,184,.25);
  border-radius:16px;
  background: rgba(15,23,42,.35);
}
.empty-title{font-weight:800; font-size:18px}
.empty-sub{color:var(--muted); margin-top:8px}

.grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:14px;
}
@media (max-width: 980px){ .grid{grid-template-columns: repeat(2, minmax(0, 1fr));} }
@media (max-width: 640px){ .grid{grid-template-columns: 1fr;} }

.card{
  overflow:hidden;
  border-radius:14px;
  border:1px solid rgba(31,41,55,.85);
  background: rgba(15,23,42,.55);
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.card:hover{
  transform: translateY(-2px);
  border-color: rgba(124,58,237,.55);
  background: rgba(15,23,42,.75);
}
.card-media{position:relative; aspect-ratio: 16 / 9; background: rgba(2,6,23,.55)}
.card-media img{width:100%;height:100%;object-fit:cover;display:block}
.badge{
  position:absolute; bottom:10px; left:10px;
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  background: rgba(124,58,237,.85);
  border:1px solid rgba(255,255,255,.12);
}
.card-body{padding:12px}
.card-title{font-weight:800; margin-bottom:6px}
.card-desc{color:var(--muted); font-size:13px; line-height:1.25; min-height:32px; overflow:hidden}
.card-meta{margin-top:10px; color:rgba(148,163,184,.7); font-size:12px}

.fab{
  position:fixed;
  left:16px;
  bottom:16px;
  display:flex; align-items:center; gap:10px;
  padding:12px 14px;
  border-radius:999px;
  background: linear-gradient(180deg, var(--brand), var(--brand2));
  border:1px solid rgba(255,255,255,.14);
  box-shadow: 0 14px 40px rgba(124,58,237,.25);
}
.fab:hover{filter:brightness(1.06)}
.fab-plus{
  width:28px;height:28px; border-radius:999px;
  display:grid; place-items:center;
  background: rgba(0,0,0,.20);
  font-weight:900;
}
.fab-label{font-weight:800}

.form{margin-top:14px; display:flex; flex-direction:column; gap:12px}
.field label{display:block; font-size:13px; color:var(--muted); margin-bottom:6px}
.field input,.field textarea,.field select{
  width:100%;
  background: rgba(2,6,23,.35);
  color: var(--text);
  border:1px solid rgba(31,41,55,.85);
  padding:11px 12px;
  border-radius:12px;
  outline:none;
}
.field textarea{min-height:92px; resize:vertical}
.field input:focus,.field textarea:focus,.field select:focus{border-color: rgba(124,58,237,.6)}

.dropzone{
  position:relative;
  border-radius:14px;
  border:1px dashed rgba(148,163,184,.35);
  background: rgba(2,6,23,.22);
  padding:18px;
  cursor:pointer;
}
.dropzone.drag{border-color: rgba(124,58,237,.75); background: rgba(124,58,237,.08)}
.dropzone .file{
  position:absolute; inset:0;
  opacity:0; cursor:pointer;
}
.dz-title{font-weight:900}
.dz-sub{margin-top:6px}
.dz-file{margin-top:10px; color: var(--muted); font-size:13px}

.actions{display:flex; gap:10px; flex-wrap:wrap}
.btn{
  appearance:none;
  border:1px solid rgba(31,41,55,.85);
  background: rgba(15,23,42,.65);
  color: var(--text);
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
  font-weight:800;
}
.btn:hover{border-color: rgba(124,58,237,.45)}
.btn-primary{
  background: linear-gradient(180deg, var(--brand), var(--brand2));
  border-color: rgba(255,255,255,.12);
}
.btn-primary:hover{filter:brightness(1.06)}

.alert{
  border-radius:14px;
  padding:12px;
  border:1px solid rgba(31,41,55,.85);
  margin-top:12px;
}
.alert-danger{background: rgba(239,68,68,.10); border-color: rgba(239,68,68,.25)}
.alert-success{background: rgba(34,197,94,.10); border-color: rgba(34,197,94,.25)}

.copyrow{
  display:grid;
  grid-template-columns: 160px 1fr auto;
  gap:10px;
  align-items:center;
  margin-top:10px;
}
@media (max-width: 640px){
  .copyrow{grid-template-columns: 1fr; }
}
.copylabel{color:var(--muted); font-size:13px}
.copyinput{
  width:100%;
  background: rgba(2,6,23,.35);
  color: var(--text);
  border:1px solid rgba(31,41,55,.85);
  padding:10px 12px;
  border-radius:12px;
}

.mt{margin-top:12px; display:flex; gap:10px; flex-wrap:wrap}
.note{margin-top:10px; font-size:12px; opacity:.9}

.viewer{
  margin-top:14px;
  border-radius:16px;
  border:1px solid rgba(31,41,55,.85);
  overflow:hidden;
  background: rgba(2,6,23,.35);
}
.viewer-img{width:100%; height:auto; display:block; background: rgba(2,6,23,.35)}

.headrow{
  display:flex; justify-content:space-between; gap:14px; flex-wrap:wrap;
}
.head-actions{display:flex; gap:10px; flex-wrap:wrap; align-items:flex-start}

.sharebox{margin-top:14px}

/* Player custom */
.player{position:relative; width:100%; background: rgba(2,6,23,.75)}
.player-video{width:100%; display:block; background:black}
.player-controls{
  position:absolute; left:0; right:0; bottom:0;
  padding:10px;
  display:flex; gap:10px; align-items:center;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.62));
}
.pc-btn{
  border:1px solid rgba(255,255,255,.14);
  background: rgba(17,24,39,.55);
  color: var(--text);
  padding:8px 10px;
  border-radius:12px;
  cursor:pointer;
  font-weight:900;
}
.pc-btn:hover{border-color: rgba(124,58,237,.55)}
.pc-bar{flex:1; display:flex; flex-direction:column; gap:6px}
.pc-track{
  height:10px;
  border-radius:999px;
  background: rgba(255,255,255,.12);
  position:relative;
  cursor:pointer;
}
.pc-fill{
  height:100%;
  width:0%;
  border-radius:999px;
  background: rgba(124,58,237,.9);
}
.pc-knob{
  position:absolute; top:50%;
  width:14px; height:14px;
  border-radius:999px;
  transform: translate(-50%, -50%);
  left:0%;
  background: rgba(255,255,255,.92);
  box-shadow: 0 8px 18px rgba(0,0,0,.35);
}
.pc-time{font-size:12px; color: rgba(229,231,235,.85)}
.pc-right{display:flex; gap:10px; align-items:center}
.pc-vol{width:110px}
