:root {
  --bg: #050306;
  --panel: #0c080b;
  --panel-soft: #161016;
  --text: #ffffff;
  --muted: #b3b3b3;
  --line: rgba(255, 45, 122, 0.18);
  --accent: #ff2d7a;
  --accent-2: #e6005c;
  --brand-gradient: linear-gradient(135deg, #ff2d7a 0%, #e6005c 100%);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: progress;
  opacity: 0.62;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr minmax(260px, 420px) auto;
  gap: 14px;
  align-items: center;
  min-height: 68px;
  padding: 0 32px;
  background:
    radial-gradient(520px 180px at 8% 0%, rgba(255, 45, 122, 0.16), transparent 62%),
    rgba(5, 3, 6, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  display: block;
  width: clamp(190px, 18vw, 252px);
  height: auto;
  filter: drop-shadow(0 0 18px rgba(255, 45, 122, 0.22));
}

.nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav a,
.category-nav summary {
  color: var(--muted);
  padding: 10px 12px;
  transition: color 180ms ease, background 180ms ease;
}

.nav a:hover,
.nav a:focus-visible,
.category-nav summary:hover,
.category-nav summary:focus-visible {
  color: var(--text);
  background: rgba(255, 45, 122, 0.09);
  outline: none;
}

.category-nav {
  position: relative;
}

.category-nav summary {
  cursor: pointer;
  list-style: none;
  font-weight: 800;
}

.category-nav summary::-webkit-details-marker {
  display: none;
}

.category-nav summary::after {
  content: "⌄";
  margin-left: 6px;
  color: var(--accent-2);
}

.category-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 8px 28px;
  width: min(1040px, calc(100vw - 64px));
  max-height: min(620px, calc(100svh - 110px));
  overflow-y: auto;
  padding: 26px;
  background: rgba(18, 19, 24, 0.98);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.category-menu button {
  min-height: 36px;
  border: 0;
  color: var(--text);
  background: transparent;
  font-size: 16px;
  font-weight: 900;
  text-align: left;
}

.category-menu button:hover,
.category-menu button:focus-visible,
.category-menu button.active {
  color: var(--accent-2);
  outline: none;
}

.search {
  display: grid;
  grid-template-columns: 1fr auto;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
}

.search input {
  min-width: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  padding: 12px 14px;
  outline: none;
}

.search button,
.primary,
.secondary,
.ghost,
.upload-trigger,
.view-toggle button,
.filter {
  border: 0;
  min-height: 44px;
  padding: 0 16px;
  color: var(--text);
  background: var(--panel-soft);
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.search button,
.upload-trigger,
.primary {
  color: #fff;
  background: var(--brand-gradient);
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(255, 45, 122, 0.24);
}

.upload-trigger {
  min-width: 78px;
}

.secondary,
.ghost {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
}

.ghost {
  border: 1px solid var(--line);
}

.primary:hover,
.secondary:hover,
.ghost:hover,
.upload-trigger:hover,
.view-toggle button:hover {
  transform: translateY(-1px);
}

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

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(44px, 7vw, 92px);
  line-height: 0.95;
  letter-spacing: 0;
}

.section-head h2 {
  margin-bottom: 16px;
  font-size: 24px;
}

.feed {
  padding: 36px 32px 80px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 22px;
}

.view-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
}

.view-toggle button {
  min-height: 38px;
  color: var(--muted);
  background: transparent;
}

.view-toggle button.active {
  color: #170d09;
  background: var(--accent-2);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.video-grid.compact {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.video-card {
  display: grid;
  grid-template-rows: auto minmax(72px, auto);
  gap: 12px;
  align-content: start;
  min-width: 0;
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  text-align: left;
}

.thumb-button {
  width: 100%;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: inherit;
}

.thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 150px;
  height: clamp(150px, 13vw, 220px);
  background: var(--panel);
}

.thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: saturate(0.92) contrast(1.05);
  transition: transform 260ms ease, filter 260ms ease;
}

.hover-preview {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 160ms ease, transform 260ms ease;
  pointer-events: none;
}

.thumb-button.is-preview-ready .hover-preview {
  opacity: 1;
  transform: scale(1);
}

.video-card:hover img,
.thumb-button:focus-visible img {
  transform: scale(1.055);
  filter: saturate(1.15) contrast(1.12);
}

.duration,
.quality {
  position: absolute;
  bottom: 8px;
  padding: 5px 8px;
  background: rgba(0, 0, 0, 0.74);
  font-size: 12px;
  font-weight: 800;
}

.duration {
  right: 8px;
}

.quality {
  left: 8px;
  color: var(--accent-2);
}

.upload-progress {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(2px);
}

.upload-progress strong {
  position: relative;
  z-index: 1;
  padding: 9px 12px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.72);
  font-size: 15px;
  line-height: 1;
}

.upload-progress i {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  height: 4px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.18);
}

.upload-progress i::before {
  content: "";
  display: block;
  width: var(--upload-progress);
  height: 100%;
  background: var(--accent-2);
  transition: width 260ms ease;
}

.video-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: minmax(42px, auto) 18px;
  align-content: start;
  column-gap: 10px;
  min-height: 72px;
  padding-top: 0;
}

.video-meta h3 {
  grid-column: 1 / 2;
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
  max-height: 46px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.video-meta p {
  grid-column: 1 / 2;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-button {
  grid-column: 2 / 3;
  grid-row: 1 / 3;
  align-self: start;
  min-height: 34px;
  border: 1px solid var(--line);
  padding: 0 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
  font-weight: 800;
}

.share-button:hover,
.share-button:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
  outline: none;
}

.empty {
  display: none;
  color: var(--muted);
  padding: 32px 0;
}

.empty.show {
  display: block;
}

.age-gate,
.player,
.upload-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(16px);
}

.age-gate.hidden,
.player,
.upload-modal {
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.player.open,
.upload-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.age-panel,
.player-shell,
.upload-shell {
  width: min(760px, 100%);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.age-panel {
  padding: 40px;
  border: 1px solid var(--line);
  animation: riseIn 500ms ease both;
}

.age-panel h1 {
  font-size: clamp(36px, 7vw, 68px);
}

.age-panel p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.7;
}

.age-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  width: min(1180px, 100%);
  transform: translateY(18px) scale(0.98);
  transition: transform 220ms ease;
}

.player.theater {
  padding: 0;
  place-items: stretch;
}

.player.theater .player-shell {
  width: 100%;
  min-height: 100svh;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  background: #050505;
}

.player.open .player-shell,
.upload-modal.open .upload-shell {
  transform: translateY(0) scale(1);
}

.upload-shell {
  position: relative;
  display: grid;
  gap: 18px;
  max-height: min(900px, calc(100svh - 48px));
  overflow-y: auto;
  padding: 32px;
  border: 1px solid var(--line);
  transform: translateY(18px) scale(0.98);
  transition: transform 220ms ease;
}

.upload-shell h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 42px);
}

.dropzone {
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 150px;
  padding: 24px;
  border: 1px dashed rgba(255, 209, 102, 0.45);
  background: rgba(255, 255, 255, 0.045);
  text-align: center;
  transition: border-color 180ms ease, background 180ms ease;
}

.dropzone:hover {
  border-color: var(--accent-2);
  background: rgba(255, 209, 102, 0.08);
}

.dropzone input {
  width: 1px;
  height: 1px;
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.dropzone span {
  font-size: 20px;
  font-weight: 900;
}

.dropzone small,
.classification small,
.cover-controls small,
.batch-item small {
  color: var(--muted);
  line-height: 1.5;
}

.batch-panel {
  display: none;
  gap: 10px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
}

.batch-panel.has-items {
  display: grid;
}

.batch-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.batch-head strong {
  color: var(--accent-2);
}

.batch-list {
  display: grid;
  gap: 8px;
  max-height: 210px;
  overflow-y: auto;
}

.batch-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  width: 100%;
  border: 1px solid transparent;
  padding: 10px 12px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.18);
  text-align: left;
  transition: border-color 180ms ease, background 180ms ease;
}

.batch-item:hover,
.batch-item:focus-visible {
  border-color: rgba(255, 209, 102, 0.34);
  background: rgba(255, 209, 102, 0.06);
  outline: none;
}

.batch-item.active {
  border-color: var(--accent-2);
  background: rgba(255, 209, 102, 0.1);
}

.batch-item strong,
.batch-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-item span {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
}

.cover-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 14px;
  align-items: stretch;
}

.cover-picker.is-empty {
  opacity: 0.72;
}

.cover-video-wrap,
.cover-preview {
  overflow: hidden;
  background: #050506;
}

.cover-video-wrap {
  grid-column: 1 / 2;
  aspect-ratio: 16 / 9;
}

.cover-video-wrap video,
.cover-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cover-preview img:not([src]) {
  display: none;
}

.cover-controls {
  grid-column: 1 / 2;
  display: grid;
  gap: 8px;
}

.cover-controls label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.cover-controls input {
  width: 100%;
  accent-color: var(--accent-2);
}

.cover-preview {
  position: relative;
  grid-column: 2 / 3;
  grid-row: 1 / 3;
  min-height: 150px;
  border: 1px solid var(--line);
}

.cover-preview span {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 5px 8px;
  color: var(--accent-2);
  background: rgba(0, 0, 0, 0.72);
  font-size: 12px;
  font-weight: 800;
}

#coverCanvas {
  display: none;
}

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

.upload-fields label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.upload-fields input,
.upload-fields select {
  min-width: 0;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  padding: 13px 14px;
  outline: none;
}

.upload-fields input:focus,
.upload-fields select:focus {
  border-color: rgba(255, 209, 102, 0.62);
}

.classification {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.055);
  border-left: 3px solid var(--accent-2);
}

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

.classification strong {
  color: var(--accent-2);
}

.publish {
  justify-self: start;
}

.player-stage {
  position: relative;
  display: grid;
  background: #000;
}

.player video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: calc(100svh - 210px);
  background: #000;
  object-fit: contain;
}

.player-buffer {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(255, 45, 122, 0.11), transparent 34%),
    rgba(0, 0, 0, 0.74);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.player.is-buffering .player-buffer {
  opacity: 1;
}

.player-buffer img {
  width: min(360px, 58vw);
  height: auto;
  filter: drop-shadow(0 0 28px rgba(255, 45, 122, 0.28));
}

.player.mobile-native .player-buffer,
.player.mobile-native .player-tools {
  display: none;
}

.player.mobile-native video {
  max-height: calc(100svh - 190px);
}

.player.theater video {
  max-height: calc(100svh - 118px);
}

.player-tools {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: grid;
  grid-template-columns: auto auto auto minmax(220px, 1fr) auto auto auto auto auto auto auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 45, 122, 0.18);
  border-radius: 999px;
  background: rgba(3, 2, 3, 0.82);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
  pointer-events: none;
}

.player-tools button,
.player-tools select,
.player-volume,
.player-tools span {
  pointer-events: auto;
}

.player-tools button,
.player-tools select {
  min-width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 45, 122, 0.18);
  border-radius: 6px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  font-size: 13px;
  font-weight: 900;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.player-tools button:hover,
.player-tools button:focus-visible,
.player-tools button.active,
.player-tools select:focus {
  border-color: var(--accent);
  color: #fff;
  background: var(--brand-gradient);
  outline: none;
}

.player-tools button:active {
  transform: translateY(1px);
}

.player-play {
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0;
  border-radius: 50%;
  overflow: hidden;
  background: #030203;
  border-color: rgba(255, 45, 122, 0.48);
  box-shadow: 0 0 22px rgba(255, 45, 122, 0.30);
}

.player-play img {
  display: block;
  width: 100%;
  height: 100%;
}

.player-skip {
  position: relative;
  border-radius: 50%;
  padding: 0;
  color: var(--muted);
  font-size: 10px;
}

.player-skip::before {
  content: "↺";
  display: block;
  font-size: 16px;
  line-height: 0.8;
}

#forwardVideo::before {
  content: "↻";
}

.player-timeline {
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.player-volume input {
  --range-progress: 0%;
  appearance: none;
  width: 100%;
  min-width: 80px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0 var(--range-progress), rgba(255, 255, 255, 0.78) var(--range-progress) 100%);
  cursor: pointer;
}

.player-volume input::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #070407;
  box-shadow: 0 0 0 2px rgba(255, 45, 122, 0.26), 0 0 18px rgba(255, 45, 122, 0.34);
}

.player-volume input::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #070407;
  box-shadow: 0 0 0 2px rgba(255, 45, 122, 0.26), 0 0 18px rgba(255, 45, 122, 0.34);
}

.player-progress {
  --range-progress: 0%;
  position: relative;
  min-width: 160px;
  height: 24px;
  cursor: pointer;
  touch-action: none;
}

.player-progress::before,
.player-progress__fill {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 6px;
  border-radius: 999px;
  transform: translateY(-50%);
}

.player-progress::before {
  background: rgba(255, 255, 255, 0.78);
}

.player-progress__fill {
  right: auto;
  width: var(--range-progress);
  background: var(--brand-gradient);
  box-shadow: 0 0 18px rgba(255, 45, 122, 0.28);
}

.player-progress__thumb {
  position: absolute;
  left: var(--range-progress);
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #070407;
  box-shadow: 0 0 0 2px rgba(255, 45, 122, 0.28), 0 0 20px rgba(255, 45, 122, 0.38);
  transform: translate(-50%, -50%);
}

.player-progress:focus-visible {
  outline: none;
}

.player-progress:focus-visible::before {
  box-shadow: 0 0 0 3px rgba(255, 45, 122, 0.28);
}

.player-seek-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.player-volume {
  display: grid;
  grid-template-columns: 36px 82px;
  gap: 8px;
  align-items: center;
}

.player-volume button {
  min-width: 36px;
  padding: 0;
}

.player-volume svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.player-volume input {
  min-width: 82px;
  --range-progress: 100%;
}

.player-tools select {
  width: 72px;
  padding: 0 8px;
  appearance: none;
}

.player-tools .episode-button {
  min-width: 64px;
  padding: 0 12px;
  white-space: nowrap;
}

.player-tools span {
  min-width: 96px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.player-meta {
  padding: 22px 24px 26px;
}

.player-meta h2 {
  margin-bottom: 8px;
}

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

.share-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  max-width: min(420px, calc(100vw - 48px));
  padding: 14px 16px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.share-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 0;
  color: var(--text);
  background: rgba(0, 0, 0, 0.7);
  font-size: 28px;
  line-height: 1;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px 18px;
  }

  .nav {
    overflow-x: auto;
  }

  .category-menu {
    position: fixed;
    left: 18px;
    right: 18px;
    top: 64px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: auto;
    padding: 18px;
  }

  .feed {
    padding: 28px 18px 64px;
  }

  .video-grid,
  .video-grid.compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .video-grid,
  .video-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .video-grid,
  .video-grid.compact {
    grid-template-columns: 1fr;
  }

  .video-card {
    grid-template-rows: auto auto;
    gap: 14px;
    margin-bottom: 30px;
  }

  .thumb {
    min-height: 0;
    height: auto;
    aspect-ratio: 16 / 9;
    background: #050506;
  }

  .thumb img {
    object-fit: cover;
  }

  .video-meta {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    row-gap: 10px;
    min-height: 0;
    padding-bottom: 8px;
  }

  .video-meta h3 {
    grid-column: 1 / -1;
    margin: 0;
    max-height: 58px;
    font-size: 20px;
    line-height: 1.32;
  }

  .video-meta p {
    grid-column: 1 / 2;
    align-self: center;
    font-size: 14px;
  }

  .share-button {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    min-height: 42px;
    padding: 0 16px;
  }

  .age-panel {
    padding: 28px;
  }

  .player {
    padding: 10px;
  }

  .player-shell {
    width: min(100%, 760px);
  }

  .player video {
    max-height: calc(100svh - 300px);
  }

  .player-tools {
    position: static;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-areas:
      "play rewind forward fullscreen"
      "timeline timeline timeline timeline"
      "prev next volume volume"
      "speed capture download pip";
    gap: 8px;
    padding: 10px;
    overflow: visible;
    border-radius: 0 0 18px 18px;
    background: rgba(3, 2, 3, 0.94);
  }

  .player-play {
    grid-area: play;
    justify-self: start;
  }

  #rewindVideo {
    grid-area: rewind;
  }

  #forwardVideo {
    grid-area: forward;
  }

  #fullscreenVideo {
    grid-area: fullscreen;
  }

  .player-timeline {
    grid-area: timeline;
    grid-template-columns: 92px minmax(0, 1fr);
    width: 100%;
    min-width: 0;
  }

  .player-progress {
    min-width: 0;
  }

  #prevEpisode {
    grid-area: prev;
  }

  #nextEpisode {
    grid-area: next;
  }

  .player-volume {
    grid-area: volume;
    grid-template-columns: 36px minmax(84px, 1fr);
    width: 100%;
    min-width: 0;
  }

  #speedControl {
    grid-area: speed;
    width: 100%;
  }

  #captureFrame {
    grid-area: capture;
  }

  #downloadVideo {
    grid-area: download;
  }

  #pipVideo {
    grid-area: pip;
  }

  #theaterVideo {
    display: none;
  }

  .player-tools button,
  .player-tools select {
    width: 100%;
    min-width: 0;
  }

  .player-tools .episode-button {
    min-width: 0;
    padding: 0 8px;
  }

  .player-tools span {
    min-width: 0;
    font-size: 11px;
    text-align: left;
  }

  .player-meta {
    padding: 18px;
  }

  .upload-fields,
  .classification,
  .cover-picker {
    grid-template-columns: 1fr;
  }

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

  .cover-preview {
    grid-column: 1;
    grid-row: auto;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 520px) {
  .player {
    padding: 0;
  }

  .player video {
    max-height: calc(100svh - 360px);
  }

  .player-tools {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .player-tools button,
  .player-tools select {
    height: 38px;
    font-size: 12px;
  }

  .player-play {
    width: 42px;
    min-width: 42px;
  }

  .player-volume {
    grid-template-columns: 34px minmax(72px, 1fr);
    gap: 6px;
  }
}
