:root {
  --night: #171916;
  --night-soft: #20231e;
  --night-card: rgba(32, 35, 30, 0.8);
  --cream: #f6f0df;
  --cream-soft: rgba(246, 240, 223, 0.72);
  --gold: #e8c784;
  --gold-bright: #f4d899;
  --coral: #ef9175;
  --mint: #b5d3bf;
  --line: rgba(246, 240, 223, 0.15);
  --muted: rgba(246, 240, 223, 0.55);
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
  color: var(--cream);
  background: var(--night);
  font-family: "DM Sans", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--night);
}

body,
button,
select,
input {
  font-family: "DM Sans", Arial, sans-serif;
}

button,
select,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  cursor: pointer;
}

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

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

h1,
h2,
h3 {
  font-family: "Fraunces", Georgia, serif;
}

.cinema-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 18%, rgba(239, 145, 117, 0.08), transparent 25rem),
    radial-gradient(circle at 83% 68%, rgba(181, 211, 191, 0.08), transparent 31rem),
    var(--night);
}

.topbar,
.site-footer {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1320px, calc(100% - 56px));
  margin: 0 auto;
}

.topbar {
  min-height: 82px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-name span {
  color: var(--coral);
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: 28px;
  height: 26px;
  transform: rotate(-8deg);
}

.brand-mark::before,
.brand-mark::after,
.brand-mark span {
  position: absolute;
  display: block;
  content: "";
  background: var(--cream);
}

.brand-mark::before {
  top: 5px;
  left: 4px;
  width: 20px;
  height: 17px;
  border-radius: 50% 50% 44% 44%;
}

.brand-mark::after {
  top: 0;
  left: 4px;
  width: 9px;
  height: 9px;
  border-radius: 4px 8px 2px 8px;
  transform: rotate(-24deg);
}

.brand-mark span:first-child {
  top: 0;
  right: 3px;
  width: 9px;
  height: 9px;
  border-radius: 8px 4px 8px 2px;
  transform: rotate(24deg);
}

.brand-mark span:last-child {
  right: 6px;
  bottom: 1px;
  width: 5px;
  height: 5px;
  background: var(--coral);
  border-radius: 50%;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.viewer-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cream-soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-dot,
.featured-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--coral);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(239, 145, 117, 0.13);
}

.language-picker {
  position: relative;
}

.language-picker::after {
  position: absolute;
  top: 50%;
  right: 0;
  content: "⌄";
  color: var(--gold);
  pointer-events: none;
  transform: translateY(-55%);
}

#language-select {
  appearance: none;
  min-width: 55px;
  padding: 10px 16px 10px 0;
  color: var(--gold);
  background: transparent;
  border: 0;
  outline: 0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.queue-link {
  padding: 9px 14px;
  color: var(--night);
  background: var(--gold);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  transition: transform 180ms ease, background 180ms ease;
}

.queue-link:hover,
.surprise-button:hover {
  background: var(--gold-bright);
  transform: translateY(-2px);
}

.cinema-viewer {
  position: relative;
  min-height: calc(100vh - 82px);
  overflow: hidden;
  isolation: isolate;
}

.ambient-poster,
.ambient-wash,
.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ambient-poster {
  z-index: -3;
  background-position: center;
  background-size: cover;
  filter: blur(42px) saturate(0.75);
  opacity: 0.18;
  transform: scale(1.12);
  transition: background-image 500ms ease;
}

.ambient-wash {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(23, 25, 22, 0.98) 0%, rgba(23, 25, 22, 0.8) 30%, rgba(23, 25, 22, 0.72) 65%, rgba(23, 25, 22, 0.96) 100%),
    radial-gradient(circle at 50% 45%, transparent 0, rgba(23, 25, 22, 0.58) 64%, rgba(23, 25, 22, 0.94) 100%);
}

.grain {
  z-index: -1;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
  mix-blend-mode: screen;
}

.viewer-layout {
  display: grid;
  grid-template-columns: minmax(210px, 0.72fr) minmax(400px, 0.98fr) minmax(250px, 0.72fr);
  align-items: center;
  gap: clamp(30px, 5vw, 82px);
  width: min(1220px, calc(100% - 56px));
  min-height: calc(100vh - 82px);
  margin: 0 auto;
  padding: 52px 0 44px;
}

.viewer-copy {
  align-self: center;
  max-width: 290px;
}

.viewer-copy h1 {
  margin-top: 0;
}

.eyebrow,
.section-kicker,
.detail-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--coral);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow-line {
  display: inline-block;
  width: 23px;
  height: 1px;
  background: var(--coral);
}

h1 {
  margin: 17px 0 19px;
  color: var(--cream);
  font-size: clamp(50px, 5.3vw, 74px);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.065em;
}

h1 em {
  color: var(--gold);
  font-style: normal;
}

.viewer-intro {
  max-width: 270px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.viewer-proof {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 27px;
  color: var(--cream-soft);
  font-size: 10px;
  line-height: 1.4;
}

.avatar-stack {
  display: flex;
  padding-left: 7px;
}

.avatar {
  display: grid;
  width: 27px;
  height: 27px;
  margin-left: -7px;
  place-items: center;
  border: 2px solid var(--night);
  border-radius: 50%;
  font-size: 13px;
}

.avatar-one {
  background: #c87864;
}

.avatar-two {
  background: #8cae8f;
}

.avatar-three {
  background: #e7bf6c;
}

.viewer-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 33px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.stat-number {
  color: var(--gold);
  font-family: "Fraunces", Georgia, serif;
  font-size: 23px;
}

.stat-divider {
  width: 1px;
  height: 18px;
  margin: 0 3px;
  background: var(--line);
}

.reel-column {
  width: min(100%, 460px);
  justify-self: center;
}

.reel-shell {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  isolation: isolate;
  background: #2b3029;
  border: 1px solid rgba(246, 240, 223, 0.2);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

#main-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #2b3029;
}

.reel-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(9, 14, 11, 0.72), transparent 23%, transparent 52%, rgba(9, 14, 11, 0.82)),
    linear-gradient(90deg, rgba(9, 14, 11, 0.34), transparent 28%, transparent 74%, rgba(9, 14, 11, 0.32));
}

.reel-topline,
.reel-title,
.video-center,
.reel-sticker,
.exit-fullscreen-button {
  position: absolute;
  z-index: 2;
}

.reel-topline {
  top: 17px;
  right: 17px;
  left: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.source-credit {
  color: rgba(246, 240, 223, 0.78);
  font-size: 10px;
  font-weight: 600;
}

.source-credit > span:first-of-type {
  color: var(--gold);
}

.featured-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  color: var(--cream);
  background: rgba(23, 25, 22, 0.55);
  border: 1px solid rgba(246, 240, 223, 0.2);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.featured-dot {
  width: 5px;
  height: 5px;
  box-shadow: 0 0 0 3px rgba(239, 145, 117, 0.14);
}

.reel-title {
  right: 20px;
  bottom: 22px;
  left: 20px;
}

.reel-title .detail-label {
  color: var(--gold-bright);
  font-size: 9px;
}

.reel-title h2 {
  max-width: 340px;
  margin-top: 7px;
  color: var(--cream);
  font-size: clamp(23px, 2.7vw, 34px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.reel-title p {
  max-width: 340px;
  margin-top: 8px;
  color: rgba(246, 240, 223, 0.75);
  font-size: 11px;
  line-height: 1.45;
}

.exit-fullscreen-button {
  top: 15px;
  right: 15px;
  display: none;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  color: var(--cream);
  background: rgba(23, 25, 22, 0.58);
  border: 1px solid rgba(246, 240, 223, 0.28);
  border-radius: 50%;
  backdrop-filter: blur(9px);
}

.exit-fullscreen-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.video-center {
  top: 50%;
  left: 50%;
  display: grid;
  justify-items: center;
  gap: 12px;
  transform: translate(-50%, -50%);
  transition: opacity 180ms ease, visibility 180ms ease;
}

.play-hint {
  color: rgba(246, 240, 223, 0.83);
  font-size: 11px;
  white-space: nowrap;
}

.play-button {
  display: grid;
  width: 70px;
  height: 70px;
  padding: 0;
  place-items: center;
  color: var(--night);
  background: var(--gold-bright);
  border: 4px solid rgba(246, 240, 223, 0.8);
  border-radius: 50%;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.34);
  transition: background 180ms ease, transform 180ms ease;
}

.play-button:hover {
  background: #ffe2a9;
  transform: scale(1.06);
}

.play-button svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.play-button .pause-icon {
  display: none;
}

.is-playing .play-icon {
  display: none;
}

.is-playing .pause-icon {
  display: block;
}

.is-playing .play-hint {
  opacity: 0;
}

.reel-sticker {
  color: var(--gold-bright);
  font-size: 28px;
}

.sticker-sparkle {
  top: 24%;
  left: 12%;
  transform: rotate(-15deg);
}

.sticker-heart {
  right: 12%;
  bottom: 31%;
  color: var(--coral);
  transform: rotate(12deg);
}

.player-controls {
  padding: 13px 2px 0;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.video-progress-wrap {
  flex: 1;
}

#video-progress {
  display: block;
  width: 100%;
  height: 4px;
  margin: 0;
  accent-color: var(--gold);
  cursor: pointer;
}

.video-time {
  min-width: 79px;
  color: var(--cream-soft);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

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

.control-note {
  color: var(--muted);
  font-size: 10px;
}

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

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  color: var(--cream);
  background: rgba(246, 240, 223, 0.04);
  border: 1px solid rgba(246, 240, 223, 0.18);
  border-radius: 50%;
  transition: background 180ms ease, transform 180ms ease;
}

.icon-button:hover {
  background: rgba(246, 240, 223, 0.12);
  transform: translateY(-1px);
}

.icon-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.muted-icon {
  display: none;
}

.is-muted .volume-icon {
  display: none;
}

.is-muted .muted-icon {
  display: block;
}

.queue-panel {
  align-self: center;
  padding: 22px 19px 18px;
  background: var(--night-card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(16px);
}

.queue-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.queue-heading h3 {
  margin-top: 6px;
  color: var(--cream);
  font-size: 24px;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.queue-heart {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--coral);
  background: rgba(239, 145, 117, 0.13);
  border-radius: 50%;
  font-size: 14px;
}

.queue-description {
  margin: 14px 0 15px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.playlist {
  display: grid;
  gap: 5px;
}

.playlist-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 23px;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px;
  color: var(--cream);
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  transition: background 180ms ease, border-color 180ms ease;
}

.playlist-item:hover {
  background: rgba(246, 240, 223, 0.06);
}

.playlist-item.is-active {
  background: rgba(181, 211, 191, 0.15);
  border-color: rgba(181, 211, 191, 0.2);
}

.playlist-thumb {
  position: relative;
  display: grid;
  width: 56px;
  height: 64px;
  overflow: hidden;
  place-items: center;
  background: var(--night-soft);
  border-radius: 9px;
}

.playlist-thumb::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(135deg, rgba(181, 211, 191, 0.18), transparent 68%);
}

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

.thumb-emoji {
  position: absolute;
  z-index: 1;
  font-size: 21px;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.28));
}

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

.playlist-copy strong,
.playlist-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playlist-copy strong {
  color: var(--cream);
  font-family: "Fraunces", Georgia, serif;
  font-size: 13px;
  font-weight: 600;
}

.playlist-copy span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.playlist-play {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  color: var(--night);
  background: var(--gold);
  border-radius: 50%;
}

.playlist-play svg {
  width: 10px;
  height: 10px;
  fill: currentColor;
}

.surprise-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 14px;
  padding: 12px 14px;
  color: var(--night);
  background: var(--gold);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  transition: background 180ms ease, transform 180ms ease;
}

.surprise-button span:last-child {
  font-size: 16px;
  line-height: 0.6;
}

.site-footer {
  min-height: 88px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.footer-note {
  margin-left: auto;
  margin-right: 25px;
}

.next-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 0 10px 15px;
  color: var(--cream);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
}

.next-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--gold);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform 180ms ease;
}

.next-button:hover svg {
  transform: translateX(3px);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html[dir="rtl"] body {
  direction: rtl;
}

html[dir="rtl"] .viewer-copy,
html[dir="rtl"] .reel-title,
html[dir="rtl"] .source-credit,
html[dir="rtl"] .queue-panel,
html[dir="rtl"] .queue-description,
html[dir="rtl"] .playlist-copy,
html[dir="rtl"] .control-note {
  text-align: right;
}

html[dir="rtl"] .playlist-item {
  text-align: right;
}

html[dir="rtl"] .next-button svg {
  transform: scaleX(-1);
}

body.is-fullscreen-locked {
  overflow: hidden;
}

#video-frame:fullscreen,
#video-frame.is-simulated-fullscreen {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  aspect-ratio: auto;
  border-radius: 0;
  background: #050706;
}

#video-frame:fullscreen #main-video,
#video-frame.is-simulated-fullscreen #main-video {
  object-fit: contain;
}

#video-frame:fullscreen .exit-fullscreen-button,
#video-frame.is-simulated-fullscreen .exit-fullscreen-button {
  display: grid;
}

#video-frame.is-playing:not(.show-playback-controls) .video-center {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#video-frame:fullscreen .reel-vignette,
#video-frame.is-simulated-fullscreen .reel-vignette {
  background:
    linear-gradient(180deg, rgba(9, 14, 11, 0.6), transparent 24%, transparent 64%, rgba(9, 14, 11, 0.8)),
    linear-gradient(90deg, rgba(9, 14, 11, 0.24), transparent 28%, transparent 74%, rgba(9, 14, 11, 0.24));
}

@media (max-width: 1200px) {
  .viewer-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 26px;
    width: min(calc(100% - 32px), 620px);
    min-height: 0;
    padding: 42px 0 32px;
  }

  .viewer-copy {
    max-width: 100%;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(40px, 9vw, 54px);
    overflow-wrap: anywhere;
  }

  .viewer-intro {
    max-width: 370px;
  }

  .viewer-stats {
    display: none;
  }

  .reel-column {
    width: min(100%, 420px);
    align-self: center;
  }

  .queue-panel {
    width: min(100%, 620px);
    align-self: center;
  }
}

@media (max-width: 1050px) {
  .viewer-layout {
    grid-template-columns: minmax(175px, 0.58fr) minmax(360px, 0.95fr) minmax(230px, 0.68fr);
    gap: 30px;
  }

  h1 {
    font-size: clamp(46px, 5.5vw, 63px);
  }

  .viewer-copy {
    max-width: 230px;
  }
}

@media (max-width: 900px) {
  .viewer-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 30px;
    padding-top: 42px;
  }

  .viewer-copy {
    max-width: 360px;
  }

  h1 {
    font-size: clamp(42px, 7vw, 62px);
  }

  .reel-column {
    width: min(100%, 460px);
    align-self: center;
  }

  .queue-panel {
    width: min(100%, 620px);
    align-self: center;
  }

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

  .surprise-button {
    width: min(100%, 280px);
  }
}

@media (max-width: 620px) {
  .topbar,
  .site-footer,
  .viewer-layout {
    width: min(calc(100% - 32px), 520px);
  }

  .topbar {
    min-height: 68px;
  }

  .topbar-right {
    gap: 12px;
  }

  .viewer-status,
  .queue-link {
    display: none;
  }

  .cinema-viewer,
  .viewer-layout {
    min-height: 0;
  }

  .viewer-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 25px;
    padding: 34px 0 25px;
  }

  .viewer-copy {
    max-width: 100%;
  }

  h1 {
    margin: 14px 0 13px;
    font-size: clamp(52px, 16vw, 75px);
  }

  .viewer-intro {
    max-width: 350px;
    font-size: 12px;
  }

  .viewer-proof {
    margin-top: 19px;
  }

  .viewer-stats {
    display: none;
  }

  .reel-column {
    width: min(100%, 400px);
    align-self: center;
  }

  .reel-shell {
    aspect-ratio: 4 / 5.2;
    border-radius: 15px;
  }

  .reel-topline {
    top: 13px;
    right: 13px;
    left: 13px;
  }

  .exit-fullscreen-button {
    top: 12px;
    right: 12px;
  }

  .source-credit {
    max-width: 146px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .reel-title {
    right: 16px;
    bottom: 17px;
    left: 16px;
  }

  .reel-title h2 {
    font-size: 25px;
  }

  .reel-title p {
    max-width: 290px;
    font-size: 10px;
  }

  .play-hint {
    font-size: 10px;
  }

  .play-button {
    width: 64px;
    height: 64px;
  }

  .control-note {
    max-width: 185px;
    line-height: 1.4;
  }

  .queue-panel {
    padding: 18px 14px 14px;
  }

  .playlist {
    grid-template-columns: 1fr;
  }

  .surprise-button {
    width: 100%;
  }

  .site-footer {
    min-height: 75px;
  }

  .footer-note {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
