:root {
  color-scheme: dark;
  --bg: #101214;
  --surface: #181b1e;
  --surface-2: #20252a;
  --surface-3: #2a3036;
  --line: #343b42;
  --text: #f3f1ec;
  --muted: #a9b0b7;
  --soft: #d7c6a1;
  --green: #6fcf97;
  --teal: #65d2c6;
  --red: #ff8a7a;
  --yellow: #f4c76c;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f3eb;
  --surface: #fffaf0;
  --surface-2: #f0eadf;
  --surface-3: #e6ded0;
  --line: #d5cab8;
  --text: #1c1d1d;
  --muted: #626b70;
  --soft: #7b6036;
  --shadow: 0 24px 60px rgba(71, 56, 39, 0.14);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(101, 210, 198, 0.1), transparent 440px),
    var(--bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
  padding-bottom: 80px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 18%);
  background: color-mix(in srgb, var(--bg), transparent 8%);
  padding: 14px clamp(16px, 3vw, 40px);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--soft), transparent 20%);
  border-radius: 8px;
  background: var(--surface);
  color: var(--teal);
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.topnav {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 3px;
}

.topnav a {
  min-width: 64px;
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.topnav a.is-active,
.topnav a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.primary-button,
.icon-button,
.text-button {
  border: 0;
  border-radius: 8px;
}

.primary-button {
  min-height: 42px;
  background: var(--teal);
  color: #081313;
  padding: 0 16px;
  font-weight: 800;
}

.primary-button:hover {
  filter: brightness(1.08);
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 18px;
}

.text-button {
  background: transparent;
  color: var(--teal);
  padding: 4px 0;
  font-size: 13px;
  font-weight: 700;
}

main {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: stretch;
  padding: 34px 0 18px;
}

.hero-copy {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  justify-content: flex-end;
  border-left: 1px solid var(--line);
  padding: 28px 0 10px 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 840px;
  margin-bottom: 16px;
  font-size: clamp(36px, 5vw, 74px);
  line-height: 0.95;
}

h2 {
  margin-bottom: 0;
  font-size: 22px;
}

h3 {
  margin-bottom: 8px;
}

.hero-copy p:last-child {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-content: end;
}

.metric-tile {
  min-height: 124px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--shadow);
}

.metric-tile strong {
  display: block;
  margin-bottom: 4px;
  font-size: 34px;
}

.metric-tile span {
  color: var(--muted);
  font-size: 13px;
}

.ad-slot,
.native-ad,
.mobile-sticky-ad {
  border: 1px dashed color-mix(in srgb, var(--soft), transparent 25%);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2), transparent 16%);
  color: var(--muted);
}

.ad-leaderboard {
  display: grid;
  min-height: 92px;
  place-items: center;
  margin: 10px 0 22px;
  text-align: center;
}

.ad-leaderboard strong,
.native-ad strong,
.mobile-sticky-ad strong {
  color: var(--text);
}

.ad-leaderboard span,
.native-ad span,
.mobile-sticky-ad span {
  display: block;
  color: var(--soft);
  font-size: 12px;
  font-weight: 900;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.control-panel,
.player-panel {
  position: sticky;
  top: 86px;
}

.control-panel,
.player-card,
.signals-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-section {
  border-bottom: 1px solid var(--line);
  padding: 18px;
}

.panel-section:last-child {
  border-bottom: 0;
}

.section-heading,
.content-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.search-label,
.sort-control label,
.upload-form label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal), transparent 78%);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chip {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 0 11px;
  font-size: 13px;
}

.chip.is-active {
  border-color: var(--teal);
  background: color-mix(in srgb, var(--teal), transparent 82%);
  color: var(--text);
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  list-style: none;
}

.check-list li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 8px;
}

.check-list li::before {
  color: var(--green);
  content: "✓";
  font-weight: 900;
}

.content-column {
  min-width: 0;
}

.content-heading {
  margin-bottom: 16px;
}

.sort-control {
  display: grid;
  grid-template-columns: auto minmax(120px, 160px);
  gap: 8px;
  align-items: center;
}

.clip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.clip-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  text-align: left;
  box-shadow: var(--shadow);
}

.clip-card:hover,
.clip-card.is-selected {
  border-color: color-mix(in srgb, var(--teal), transparent 20%);
}

.thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.status-pill,
.duration-pill {
  position: absolute;
  bottom: 10px;
  border-radius: 999px;
  background: rgba(5, 8, 9, 0.72);
  color: #fff;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.duration-pill {
  right: 10px;
}

.status-pill {
  left: 10px;
}

.clip-body {
  padding: 14px;
}

.clip-body h3 {
  display: -webkit-box;
  overflow: hidden;
  min-height: 44px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 16px;
  line-height: 1.35;
}

.clip-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 4px 8px;
  font-size: 12px;
}

.player-card {
  overflow: hidden;
}

.video-shell {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  place-items: center;
  background: #050808;
}

#clip-player,
.empty-player {
  width: 100%;
  height: 100%;
}

#clip-player {
  display: block;
  object-fit: contain;
}

.empty-player {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.empty-player img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.empty-player span {
  position: relative;
  max-width: 220px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  padding: 12px 14px;
  text-align: center;
}

.preroll-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
}

.preroll-layer button {
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  padding: 0 12px;
}

.player-meta {
  padding: 16px;
}

.player-meta p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.native-ad {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 14px 0;
  padding: 14px;
}

.native-ad p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.signals-card {
  padding: 16px;
}

.event-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  max-height: 320px;
  overflow: auto;
}

.event-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 10px;
  font-size: 13px;
}

.event-item strong {
  display: block;
  margin-bottom: 2px;
}

.event-item span {
  color: var(--muted);
}

.upload-band {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  border-top: 1px solid var(--line);
  margin: 36px 0 12px;
  padding: 34px 0;
}

.upload-copy {
  position: sticky;
  top: 88px;
}

.upload-copy p:last-child {
  color: var(--muted);
  line-height: 1.6;
}

.upload-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--shadow);
}

.dropzone {
  position: relative;
  display: grid;
  min-height: 176px;
  place-items: center;
  border: 1px dashed color-mix(in srgb, var(--teal), transparent 15%);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--teal), transparent 86%), transparent),
    var(--surface-2);
  text-align: center;
}

.dropzone.is-dragging {
  border-color: var(--green);
  background: color-mix(in srgb, var(--green), var(--surface-2) 80%);
}

.dropzone input {
  position: absolute;
  inset: 0;
  cursor: pointer;
  opacity: 0;
}

.dropzone strong,
.dropzone span {
  display: block;
}

.dropzone span {
  margin-top: 6px;
  color: var(--muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.upload-form label {
  display: grid;
  gap: 7px;
}

.rights-row {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: flex-start;
  gap: 10px !important;
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.5;
}

.rights-row input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

#upload-status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.mobile-sticky-ad {
  position: fixed;
  right: 16px;
  bottom: 14px;
  z-index: 30;
  display: none;
  min-width: 280px;
  padding: 9px 12px;
  text-align: center;
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1180px) {
  .workspace-grid {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .player-panel {
    position: static;
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 14px;
  }

  .native-ad,
  .signals-card {
    margin: 0;
  }
}

@media (max-width: 900px) {
  .topbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .topnav {
    order: 3;
    width: 100%;
  }

  .topnav a {
    flex: 1;
  }

  .hero-panel,
  .workspace-grid,
  .upload-band,
  .player-panel {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: 220px;
  }

  .control-panel,
  .upload-copy {
    position: static;
  }

  .clip-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  main {
    width: min(100% - 20px, 1480px);
  }

  .top-actions .primary-button {
    display: none;
  }

  .hero-metrics,
  .clip-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding-left: 16px;
  }

  .sort-control {
    grid-template-columns: 1fr;
  }

  .mobile-sticky-ad {
    display: block;
  }
}

/* additions for static-site refactor */

a.clip-card {
  display: block;
  text-decoration: none;
}

.breadcrumb {
  width: min(100% - 40px, 1480px);
  margin: 18px auto 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
}

.breadcrumb a:hover {
  border-bottom-color: var(--muted);
}

.creator-line {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.creator-line a {
  color: var(--teal);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--teal), transparent 60%);
}

.site-footer {
  margin-top: 64px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-inner {
  width: min(100% - 40px, 1480px);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner strong {
  color: var(--text);
}

.footer-inner nav {
  display: flex;
  gap: 18px;
}

.footer-inner nav a {
  color: var(--muted);
  text-decoration: none;
}

.footer-inner nav a:hover {
  color: var(--text);
}

a.tag {
  text-decoration: none;
}

.topnav a.is-active {
  color: var(--text);
}

/* 18+ age gate modal */

.age-gate {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(8, 10, 12, 0.94);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.age-gate-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 24px;
  max-width: 460px;
  width: 100%;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.age-gate-card h2 {
  margin: 0 0 14px;
  font-size: 1.5rem;
  color: var(--text);
}

.age-gate-card p {
  color: var(--muted);
  margin: 0 0 22px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.age-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.age-gate-actions .primary-button {
  width: 100%;
  padding: 12px 20px;
  font-size: 1rem;
}

.age-gate-actions .text-button {
  width: 100%;
  padding: 8px 12px;
}

/* Ensure ad-slot containers don't show their inner script text */
.ad-slot script {
  display: none;
}


