:root {
  color-scheme: dark;
  --bg: #10130f;
  --panel: #181d17;
  --panel-strong: #20271d;
  --text: #f5f1e8;
  --muted: #bbb3a4;
  --line: rgba(245, 241, 232, 0.13);
  --accent: #d6ff66;
  --accent-strong: #9fe870;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(214, 255, 102, 0.12), transparent 28rem),
    linear-gradient(135deg, #10130f 0%, #151a17 42%, #111318 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
iframe {
  font: inherit;
}

.page {
  display: flex;
  flex-direction: column;
  width: min(1680px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 2.4vw, 34px);
}

.site-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(18px, 2vw, 30px);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(2.4rem, 7vw, 6rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.intro {
  width: min(360px, 100%);
  margin-bottom: 8px;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.2vw, 1.15rem);
  line-height: 1.5;
}

.load-status {
  min-height: 1.5em;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.95rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(10px, 1vw, 16px);
  margin-bottom: clamp(18px, 2.2vw, 34px);
}

.video-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.video-card:hover,
.video-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(214, 255, 102, 0.62);
  background: rgba(214, 255, 102, 0.08);
  outline: none;
}

.video-card.is-active {
  border-color: var(--accent);
  background: rgba(214, 255, 102, 0.13);
  box-shadow: 0 0 0 1px rgba(214, 255, 102, 0.16);
}

.video-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 5px;
  object-fit: cover;
  background: #222;
}

.video-card span {
  min-height: 2.35em;
  padding: 0 2px 3px;
  color: var(--text);
  font-size: clamp(0.78rem, 0.9vw, 0.98rem);
  font-weight: 760;
  line-height: 1.18;
}

.player-section {
  min-height: calc(100vh - 250px);
  padding: clamp(12px, 1.4vw, 20px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  box-shadow: var(--shadow);
}

.player-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 0 2px 12px;
}

.player-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
}

.player-heading h2 {
  margin-bottom: 0;
  font-size: clamp(1.2rem, 2.6vw, 2.5rem);
  line-height: 1;
  text-align: right;
}

.player-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: min(74vh, calc((100vw - clamp(36px, 4.8vw, 68px)) * 0.5625));
  min-height: 360px;
  border-radius: 7px;
  background: #050505;
}

.player-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.fullscreen-button {
  display: none;
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.fullscreen-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 1080px) {
  .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body {
    background: #10130f;
  }

  .page {
    padding: 12px;
  }

  .site-header {
    order: 1;
  }

  .load-status {
    order: 2;
  }

  .player-section {
    order: 3;
  }

  .gallery {
    order: 4;
  }

  .site-header,
  .player-heading {
    display: block;
  }

  .site-header {
    margin-bottom: 10px;
  }

  .eyebrow {
    margin-bottom: 4px;
    font-size: 0.7rem;
  }

  h1 {
    font-size: clamp(2rem, 13vw, 3.7rem);
  }

  .intro {
    margin-top: 8px;
    margin-bottom: 0;
    font-size: 0.9rem;
    line-height: 1.35;
  }

  .load-status {
    min-height: 1.2em;
    margin-bottom: 8px;
    font-size: 0.82rem;
  }

  .gallery {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    margin-right: -12px;
    margin-top: 12px;
    margin-bottom: 0;
    padding: 0 12px 8px 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .gallery::-webkit-scrollbar {
    display: none;
  }

  .video-card {
    flex: 0 0 min(44vw, 190px);
    gap: 7px;
    padding: 6px;
    scroll-snap-align: start;
  }

  .video-card:hover,
  .video-card:focus-visible {
    transform: none;
  }

  .video-card span {
    min-height: 2.15em;
    font-size: 0.82rem;
  }

  .player-section {
    min-height: 0;
    margin-inline: -12px;
    padding: 10px 12px 14px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .player-heading h2 {
    margin-top: 5px;
    text-align: left;
  }

  .player-frame {
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
    border-radius: 4px;
  }

  .fullscreen-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 920px) and (orientation: landscape) {
  html,
  body {
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  .page {
    width: 100vw;
    height: 100dvh;
    padding: 0;
  }

  .site-header,
  .load-status,
  .gallery,
  .player-heading {
    display: none;
  }

  .player-section {
    order: 1;
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #000;
    box-shadow: none;
  }

  .player-frame {
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    border-radius: 0;
  }

  .fullscreen-button {
    display: inline-flex;
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 430px) {
  .page {
    padding: 10px;
  }

  .gallery {
    margin-right: -10px;
    padding-right: 10px;
  }

  .video-card {
    flex-basis: 58vw;
  }

  .player-section {
    margin-inline: -10px;
    padding-inline: 10px;
  }
}
