:root {
  --bg: #071015;
  --bg-2: #0c1822;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-2: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.12);
  --text: rgba(255, 255, 255, 0.96);
  --muted: rgba(255, 255, 255, 0.68);
  --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;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(45, 212, 191, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 24%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  position: relative;
}

.page-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 15%, rgba(45, 212, 191, 0.08), transparent 20%),
    radial-gradient(circle at 80% 10%, rgba(56, 189, 248, 0.08), transparent 18%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
  padding: 18px 0 32px;
  position: relative;
  z-index: 1;
}

.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);
}

.hero {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 20px;
  align-items: center;
  justify-content:center;
  padding: 20px;
  margin-bottom: 6px;
  overflow: hidden;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 1.95;
  letter-spacing: 0.03em;
}

.subhead {
  max-width: 680px;
  color: var(--muted);
  margin: 0 0 16px;
  font-size: 1.6rem;
  line-height: 1.5;
}

.header-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stat-card {
  min-width: 40px;
  padding: 1px 1px;
  text-align: center;
}

.stat-label {
  display: block;
  color: var(--muted);
  margin-bottom: 1px;
  font-size: .2px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.stat-card strong {
  font-size: .002rem;
  line-height: 1;
}

.hero-photo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-photo {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.upload-panel,
.toolbar {
  padding: 6px;
  margin-bottom: 4px;
}

.upload-form {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: end;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-group.grow {
  flex: 1 1 260px;
}

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: 12px 14px;
  outline: none;
}

input[type="text"]:focus,
input[type="search"]:focus,
input[type="file"]:focus {
  border-color: rgba(45, 212, 191, 0.65);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.14);
}

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 9px;
  font-weight: 800;
  color: #041015;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 24px rgba(45, 212, 191, 0.18);
}

.primary-btn:hover {
  transform: translateY(-1px);
}

.status {
  min-height: 22px;
  margin: 12px 2px 0;
  color: var(--muted);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 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: 9 / 10;
  object-fit: cover;
  display: block;
  background: #0d1720;
}

.play-pill {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 6px 10px;
  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: 6px;
}

.video-title {
  margin: 0 0 8px;
  letter-spacing: 0.01em;
  font-size: 1.1rem;
  color: #9ffcf1;
  line-height: 1.2;
}

.video-subrow {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.video-date {
  color: var(--muted);
  font-size: 0.85rem;
}

.danger-link {
  background: transparent;
  color: var(--danger);
  font-weight: 700;
  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;
}

#modalTitle {
  margin: 0 0 14px;
}

.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: 820px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-photo {
    max-width: 100%;
    aspect-ratio: 9 / 11;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 14px, 1200px);
  }

  h1 {
    font-size: 2.4rem;
  }

  .header-stats {
    width: 100%;
  }

  .stat-card {
    flex: 1;
  }

  .modal-panel {
    width: calc(100% - 12px);
    margin: 6px auto;
    padding: 12px;
  }
}
