:root {
  --bg: #071015;
  --panel: rgba(255,255,255,0.06);
  --panel-2: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.12);
  --text: rgba(255,255,255,0.96);
  --muted: rgba(255,255,255,0.64);
  --accent: #2dd4bf;
  --accent-2: #38bdf8;
  --danger: #fb7185;
  --shadow: 0 20px 50px rgba(0,0,0,0.45);
  --radius: 22px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(45,212,191,0.10), transparent 30%),
    radial-gradient(circle at top right, rgba(56,189,248,0.10), transparent 25%),
    linear-gradient(180deg, #071015 0%, #0a1820 100%);
  color: var(--text);
}
button, input { font: inherit; }
button { cursor: pointer; }

.app-shell {
  width: min(1200px, calc(100% - 24px));
  margin: 0 auto;
  padding: 18px 0 32px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-end;
  margin-bottom: 8px;
}
.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 800;
}
h1 {
  margin: 6px 0 8px;
  font-size: clamp(2rem, 5vw, 1.25rem);
  line-height: 0.95;
}
.subhead {
  max-width: 720px;
  color: var(--muted);
  margin: 0;
}
.header-stats {
  display: flex;
  gap: 6px;
}
.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.stat-card {
  min-width: 120px;
  padding: 1px 1px;
  text-align: center;
}
.stat-label {
  display: block;
  color: var(--muted);
  margin-bottom: 2px;
  font-size: 3px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.stat-card strong {
  font-size: .5rem;
}
.upload-panel, .toolbar {
  padding: 6px;
  margin-bottom: 6px;
}
.upload-form {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: end;
}
.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field-group.grow { flex: 1 1 240px; }
label {
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
}
input[type="text"], input[type="search"], input[type="file"] {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.24);
  color: var(--text);
  padding: 5px 7px;
}
input::file-selector-button {
  border: 0;
  margin-right: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  color: var(--text);
}
.primary-btn, .close-btn, .danger-link {
  border: 0;
  border-radius: 14px;
}
.primary-btn {
  min-height: 48px;
  padding: 0 18px;
  font-weight: 800;
  color: #041015;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.status {
  min-height: 22px;
  margin: 12px 2px 0;
  color: var(--muted);
}
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.video-card {
  overflow: hidden;
}
.thumb-button {
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  position: relative;
  display: block;
}
.thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  background: #0d1720;
}
.play-pill {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.16);
  font-size: 13px;
  font-weight: 800;
}
.video-meta {
  padding: 4px;
}
.video-title {
  margin: 0 0 3px;
  font-family: "Garamond (bold)";
  letter-spacing: .03rem;
  font-size: 1.2rem;
  color: #21FFE1;
  align-items: flex-end;
}
.video-subrow {
  display: flex;
  justify-content: space-between;
  gap: 4x;
  align-items: center;
}
.video-date {
  color: #062b2e;
  font-size: 1px;
  
}
.danger-link {
  background: transparent;
  color: var(--danger);
  font-weight: 400;
  padding: 3px 0;
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}
.hidden { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
}
.modal-panel {
  position: relative;
  width: min(1100px, calc(100% - 20px));
  margin: 18px auto;
  padding: 18px;
  border-radius: 24px;
  background: #08121a;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: var(--shadow);
}
.modal-title-wrap {
  padding-right: 42px;
}
.close-btn {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 40px;
  height: 40px;
  font-size: 26px;
  background: rgba(255,255,255,0.08);
  color: var(--text);
}
#player {
  width: 100%;
  max-height: calc(100vh - 140px);
  border-radius: 18px;
  background: #000;
}
.empty-state {
  grid-column: 1 / -1;
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 720px) {
  .app-shell { width: min(100% - 14px, 1200px); }
  .topbar { flex-direction: column; align-items: stretch; }
  .header-stats { width: 100%; }
  .stat-card { flex: 1; }
  .modal-panel { width: calc(100% - 12px); margin: 6px auto; padding: 12px; }
}
