/* ==========================================================================
   AVDtheGoat — shared styles
   White, minimal, system typography. No panels, no color noise.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --surface: #f5f5f7;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --accent: #0071e3;
  --hairline: rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --max-width: 980px;
}

* {
  box-sizing: border-box;
}

/* ---------- Accessibility utilities ---------- */

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

.skip-link {
  position: absolute;
  top: -100%;
  left: 12px;
  z-index: 100;
  background: var(--text);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-optical-sizing: auto;
}

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

img, svg {
  max-width: 100%;
  display: block;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 22px;
}

/* ---------- Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--hairline);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 22px;
}

.nav-links {
  display: flex;
  align-items: center;
  height: 52px;
}

.nav-links a {
  padding: 0 14px;
  height: 52px;
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

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

.nav-links a.active {
  color: var(--text);
  font-weight: 600;
}

.burger {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.burger svg {
  width: 20px;
  height: 20px;
}

/* ---------- Hero ---------- */

.hero {
  padding: 150px 0 100px;
}

.hero-inner {
  max-width: 640px;
}

.hero-logo {
  display: block;
  width: clamp(110px,15vw, 140px);
  max-width: 100%;
  height: auto;
  margin-bottom: 24px;
}

.eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 20px;
  color: var(--text);
}

.hero p.sub {
  max-width: 480px;
  margin: 0 0 38px;
  color: var(--text-secondary);
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: -0.005em;
}

.btn-row {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 12px 24px;
  border-radius: 980px;
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.1s ease-out, background 0.15s ease, opacity 0.15s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-primary:hover {
  opacity: 0.85;
}

.btn-text {
  background: transparent;
  color: var(--accent);
  padding: 12px 4px;
}

.btn-text:hover {
  opacity: 0.7;
}

.btn-outline {
  background: transparent;
  border-color: var(--hairline);
  color: var(--text);
  padding: 11px 22px;
}

.btn-outline:hover {
  border-color: var(--text-secondary);
}

.btn-outline.selected {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* ---------- Sections ---------- */

section {
  padding: 70px 0;
}

.section-alt {
  background: var(--surface);
}

.section-head {
  margin-bottom: 40px;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: var(--text);
}

.section-sub {
  color: var(--text-secondary);
  margin: 0;
  max-width: 560px;
  font-size: 1.05rem;
}

.grid {
  display: grid;
  gap: 32px 28px;
}

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

@media (max-width: 820px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ---------- Stat split — one dominant number + a compact list ----------
   Apple spec-page pattern: lead with your best number, big, paired with
   an unequal-width column of supporting numbers. Never three equal boxes. */

.stat-split {
  display: flex;
  gap: 64px;
  align-items: flex-end;
}

.stat-hero {
  flex: 1 1 56%;
}

.stat-hero .num {
  font-size: clamp(3.6rem, 8vw, 6.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
}

.stat-hero .label {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-top: 14px;
  max-width: 30ch;
}

.stat-list {
  flex: 1 1 36%;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
}

.stat-list .stat-row:first-child {
  border-top: 1px solid var(--hairline);
}

.stat-row .num {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}

.stat-row .label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-align: right;
  max-width: 22ch;
}

@media (max-width: 720px) {
  .stat-split {
    flex-direction: column;
    gap: 36px;
  }
}

/* ---------- Feature row — text paired with a visual, sides alternate ---------- */

.feature-row {
  display: flex;
  gap: 72px;
  align-items: center;
}

.feature-row.reverse {
  flex-direction: row-reverse;
}

.feature-text {
  flex: 1 1 58%;
}

.feature-visual {
  flex: 1 1 30%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.feature-visual svg {
  width: 100%;
  max-width: 200px;
}

@media (max-width: 780px) {
  .feature-row,
  .feature-row.reverse {
    flex-direction: column-reverse;
    gap: 36px;
  }
  .feature-visual svg {
    max-width: 120px;
  }
}

/* ---------- Clip cards (no panels — just image block + type) ---------- */

.clip-thumb {
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  background-color: var(--surface);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  overflow: hidden; /* clips the thumbnail image to the rounded corners */
  position: relative;
}

.play {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1.5px solid var(--text-secondary);
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: transform 0.1s ease-out, background 0.15s ease;
}

.play:hover {
  background: var(--bg);
}

.play:active {
  transform: scale(0.94);
}

.play svg {
  width: 14px;
  height: 14px;
  margin-left: 2px;
  pointer-events: none;
}

.clip-card .eyebrow {
  margin-bottom: 8px;
  font-size: 0.68rem;
}

.clip-card h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.clip-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

.clip-card h3 a:hover,
.short-card h3 a:hover {
  text-decoration: underline;
}

/* ---------- Shorts row — vertical cards, horizontal scroll ---------- */

.shorts-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
}

.short-card {
  flex: 0 0 168px;
}

.short-thumb {
  aspect-ratio: 9/16;
  border-radius: var(--radius);
  background-color: var(--surface);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  overflow: hidden;
  position: relative;
}

.short-card h3 {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

/* ---------- Skeleton loading state — shown immediately on page load,
   swapped for real cards (or the empty state below) once /api/clips
   resolves. Never left spinning: loadClips() always resolves to one
   of the three states. ---------- */

.skeleton-card {
  display: flex;
  flex-direction: column;
}

.skeleton {
  background: var(--surface);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.06), transparent);
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  100% {
    transform: translateX(100%);
  }
}

.skel-thumb {
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.short-card .skel-thumb {
  aspect-ratio: 9/16;
  margin-bottom: 12px;
}

.skel-line {
  height: 13px;
  border-radius: 4px;
}

.skel-title {
  width: 80%;
  height: 15px;
  margin-bottom: 8px;
}

.skel-sub {
  width: 45%;
}

@media (prefers-reduced-motion: reduce) {
  .skeleton::after {
    animation: none;
    display: none;
  }
}

/* ---------- Empty state — shown only if the fetch genuinely fails
   or returns nothing, in place of the skeleton. ---------- */

.clips-empty {
  grid-column: 1 / -1;
  color: var(--text-secondary);
  font-size: 0.92rem;
  padding: 4px 0;
}

/* ---------- Clip grid — every card the same size, thumbnail locked
   to a consistent 16:9 regardless of content (video, clip, or a
   playing embed) so nothing looks arbitrarily bigger than the rest. ---------- */

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 28px;
}

@media (max-width: 820px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Partner strip ---------- */

.partner-strip {
  max-width: 480px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  letter-spacing: -0.005em;
}

/* ---------- Table (schedule) — hairlines only, no boxed panel ---------- */

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 16px 12px;
  text-align: left;
  border-bottom: 1px solid var(--hairline);
}

th {
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

td {
  font-size: 0.95rem;
}

tbody tr:first-child td {
  border-top: 1px solid var(--hairline);
}

.today {
  color: var(--text);
  font-weight: 600;
}

/* ---------- List rows (links, hall of fame) — hairline dividers ---------- */

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: 8px;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--hairline);
  transition: opacity 0.15s ease;
}

.list-row:first-of-type {
  border-top: 1px solid var(--hairline);
}

a.list-row:hover {
  opacity: 0.6;
}

.list-row h3 {
  margin: 0 0 3px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.list-row p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

/* ---------- Item thumbnail — small product-photo placeholder next to
   each row's name. Gray box + generic icon for now; swap the <span
   class="item-thumb"> for a real <img> once photos exist. ---------- */

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

.item-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  /* Placeholder icon baked in here (once) instead of repeating the same
     inline <svg> in every row's HTML — swap for a real <img> child
     (see below) once photos exist; the icon just sits behind it. */
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

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

/* ---------- Buy links — "where to get it", used in the PC Build
   table and the equipment/peripherals list rows ---------- */

.buy-links {
  display: inline-flex;
  gap: 16px;
  flex-shrink: 0;
}

.buy-links a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.buy-links a:hover {
  text-decoration: underline;
}

.list-row .chevron {
  color: var(--text-secondary);
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* ---------- Linktree-style profile + button list (Links page) ---------- */

.linktree {
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
}

.linktree-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.linktree-avatar svg {
  width: 42px;
  height: 42px;
}

.linktree h1 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  color: var(--text);
}

.linktree .bio {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0 0 36px;
}

.link-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.link-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 17px 22px;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  background: var(--bg);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease-out;
}

.link-btn:hover {
  background: var(--surface);
  border-color: #c7c7cc;
}

.link-btn:active {
  transform: scale(0.98);
}

.link-btn .title {
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text);
}

.link-btn .sub {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.link-btn .chevron {
  color: var(--text-secondary);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.l-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.l-rank {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  width: 28px;
  flex-shrink: 0;
}

.l-row-main {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  flex: 1;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 40px 0 30px;
  margin-top: 30px;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.footer-wordmark {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

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

.footer-note {
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 1.6;
}

/* ---------- Vision test page ---------- */

.eye-chart {
  text-align: center;
  padding: 30px 20px 10px;
}

.eye-chart .line {
  font-weight: 700;
  letter-spacing: 0.28em;
  margin: 22px 0;
  color: var(--text);
}

.eye-chart .l1 { font-size: 4rem; }
.eye-chart .l2 { font-size: 2.9rem; }
.eye-chart .l3 { font-size: 2rem; }
.eye-chart .l4 { font-size: 1.4rem; }
.eye-chart .l5 { font-size: 0.95rem; letter-spacing: 0.14em; }

.game-box {
  text-align: center;
}

.eye-target {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 40px 0;
}

.eyeball {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1.5px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.pupil {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--text);
  transition: transform 0.2s ease;
}

#game-result {
  min-height: 26px;
  font-weight: 500;
  color: var(--text);
}

#game-score {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ---------- Misc ---------- */

.center {
  text-align: center;
}

.mt-lg {
  margin-top: 40px;
}

.disclaimer {
  color: var(--text-secondary);
  font-size: 0.85rem;
  border-top: 1px solid var(--hairline);
  padding-top: 20px;
}

/* ---------- Merch grid ---------- */

.merch-notice {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 40px;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.merch-notice strong {
  color: var(--text);
}

.merch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 28px;
}

@media (max-width: 820px) {
  .merch-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .merch-grid {
    grid-template-columns: 1fr;
  }
}

.merch-card {
  display: flex;
  flex-direction: column;
}

.merch-thumb {
  aspect-ratio: 1/1;
  border-radius: var(--radius);
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 30px 30px;
  margin-bottom: 16px;
  overflow: hidden;
}

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

.merch-card h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.merch-price {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 6px;
}

.merch-tagline {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0 0 14px;
}

.merch-status {
  margin: 12px 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  min-height: 18px;
}

/* ---------- Jump nav — long spec-style pages (Setup) ---------- */

.jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  padding: 22px 0 4px;
  margin-top: 30px;
  border-top: 1px solid var(--hairline);
  font-size: 0.88rem;
}

.jump-nav a {
  color: var(--text-secondary);
}

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

/* ---------- Side nav — fixed to the left edge, vertically centered,
   follows scroll. Only shown where there's actual gutter room next to
   the centered content column; narrower viewports keep .jump-nav
   instead (shown/hidden by the same breakpoint, below). ---------- */

.side-nav {
  position: fixed;
  top: 50%;
  left: clamp(16px, 4vw, 56px);
  transform: translateY(-50%);
  display: none;
  flex-direction: column;
  gap: 16px;
  font-size: 0.85rem;
  z-index: 40;
}

.side-nav a {
  color: var(--text-secondary);
  padding: 2px 0;
  border-left: 2px solid transparent;
  padding-left: 12px;
}

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

.side-nav a.active {
  color: var(--text);
  font-weight: 600;
  border-left-color: var(--text);
}

@media (min-width: 1320px) {
  .side-nav {
    display: flex;
  }
  .jump-nav {
    display: none;
  }
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
  }
  .burger {
    display: inline-flex;
  }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    height: auto;
    padding: 8px 22px 16px;
    border-bottom: 1px solid var(--hairline);
  }
  .nav-links a {
    height: 44px;
    padding: 0;
  }
  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --text-secondary: #4a4a4d;
    --hairline: rgba(0, 0, 0, 0.35);
  }
}

/* ---------- Video modal — clicking a play button opens the video large,
   centered, over a dimmed backdrop, instead of playing inline in the
   small thumbnail. Single reused overlay, injected once by main.js. ---------- */

.video-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  overflow-y: auto;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}

.video-modal.open {
  opacity: 1;
  visibility: visible;
}

.video-modal-frame {
  width: min(90vw, 1100px);
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

.video-modal-frame.is-vertical {
  width: min(90vw, 420px);
  aspect-ratio: 9/16;
}

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

.video-modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.video-modal-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

@media (prefers-reduced-motion: reduce) {
  .video-modal {
    transition: none;
  }
}
