:root {
  --bg: #030504;
  --panel: #0d120f;
  --text: #f4f1e8;
  --muted: #9ca79e;
  --line: rgba(255, 255, 255, 0.12);
  --gold: #f6c400;
  --red: #ff5f57;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100svh;
  margin: 0;
  background:
    linear-gradient(90deg, rgba(3, 5, 4, 0.96), rgba(3, 5, 4, 0.76), rgba(3, 5, 4, 0.95)),
    url("./assets/world-cup-hero.png") center / cover fixed;
  color: var(--text);
  max-width: 100%;
  overflow-x: hidden;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
  display: grid;
  min-height: 100svh;
  padding: clamp(10px, 2vw, 24px);
}

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  width: 100%;
}

.watch-main {
  display: grid;
  min-width: 0;
  gap: 12px;
}

.ad-shell {
  display: grid;
  overflow: hidden;
  place-items: center;
  border: 1px dashed rgba(246, 196, 0, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(246, 196, 0, 0.12), rgba(13, 18, 15, 0.96) 42%, rgba(246, 196, 0, 0.08)),
    linear-gradient(rgba(246, 196, 0, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 196, 0, 0.08) 1px, transparent 1px);
  background-size: auto, 28px 28px, 28px 28px;
  color: rgba(246, 196, 0, 0.72);
  font-size: 11px;
  font-weight: 950;
  text-align: center;
  text-transform: uppercase;
}

.ad-shell span,
.brand-kicker,
.eyebrow {
  color: var(--gold);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ad-shell strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 20px;
  font-weight: 1000;
}

.banner-link {
  display: block;
  height: 100%;
  width: 100%;
  color: inherit;
  text-decoration: none;
}

.banner-link img {
  display: block;
  height: 100%;
  width: 100%;
  background: #050705;
  object-fit: contain;
}

.ad-leaderboard {
  min-height: 90px;
}

.ad-rail {
  align-self: start;
  border: 0;
  background: transparent;
  height: calc(100svh - 48px);
  min-height: 720px;
  position: sticky;
  top: 24px;
  width: 300px;
}

.ad-rail .banner-link img {
  height: 100%;
  object-fit: cover;
  width: 300px;
}

.player-grid {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}

.player-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(3, 5, 4, 0.9);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.player-brand {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.38);
  padding: 10px 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #ffd93d);
  color: #060606;
  font-size: 15px;
  font-weight: 1000;
}

.brand strong {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  font-style: italic;
  line-height: 1;
}

.stage {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 9;
  min-height: 420px;
  place-items: center;
  overflow: hidden;
  background: #000;
}

.stage video,
.stage iframe,
.stage .video-js {
  display: block;
  height: 100%;
  width: 100%;
  border: 0;
  background: #000;
}

.stream-play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 11;
  display: grid;
  width: clamp(64px, 8vw, 92px);
  height: clamp(64px, 8vw, 92px);
  place-items: center;
  border: 2px solid rgba(255, 212, 61, 0.9);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.5);
  color: #ffd43d;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.stream-play-button[hidden] {
  display: none;
}

.stream-play-button::before {
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: clamp(14px, 1.9vw, 20px) solid transparent;
  border-bottom: clamp(14px, 1.9vw, 20px) solid transparent;
  border-left: clamp(22px, 2.7vw, 32px) solid currentColor;
  content: "";
}

.stream-play-button:hover,
.stream-play-button:focus-visible {
  border-color: #fff2a3;
  background: rgba(0, 0, 0, 0.84);
  outline: 0;
}

.third-party-shield {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  width: 112px;
  height: 96px;
  background: transparent;
}

.iframe-ad-cover {
  position: absolute;
  right: 0;
  top: 76px;
  z-index: 5;
  width: min(720px, 58%);
  height: calc(68% - 76px);
  background: transparent;
  pointer-events: auto;
}

.iframe-click-shield {
  position: absolute;
  inset: 0;
  z-index: 7;
  background: transparent;
  cursor: pointer;
}

.player-brand-overlay {
  position: absolute;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(246, 196, 0, 0.72);
  background: rgba(0, 0, 0, 0.72);
  color: #ffd43d;
  font-weight: 1000;
  letter-spacing: 0.06em;
  line-height: 1;
  pointer-events: none;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.42);
  text-shadow: 0 2px 12px rgba(246, 196, 0, 0.38), 0 2px 0 rgba(0, 0, 0, 0.95);
  text-transform: uppercase;
  user-select: none;
}

.player-brand-overlay-top {
  top: clamp(8px, 1.8vw, 18px);
  right: clamp(8px, 1.8vw, 18px);
  min-width: clamp(150px, 18vw, 260px);
  height: clamp(36px, 4.8vw, 58px);
  padding: 0 clamp(14px, 2.4vw, 28px);
  font-size: clamp(18px, 2.5vw, 32px);
}

.player-brand-overlay-bottom {
  left: 50%;
  bottom: clamp(12px, 2.8vw, 32px);
  width: min(38vw, 430px);
  min-width: min(280px, calc(100% - 32px));
  height: clamp(34px, 4.6vw, 58px);
  padding: 0 clamp(16px, 3vw, 36px);
  font-size: clamp(20px, 3vw, 38px);
  transform: translateX(-50%);
}

.player-fullscreen-button {
  position: absolute;
  right: clamp(10px, 1.8vw, 22px);
  bottom: clamp(10px, 1.8vw, 22px);
  z-index: 10;
  display: grid;
  width: clamp(38px, 4vw, 52px);
  height: clamp(38px, 4vw, 52px);
  place-items: center;
  border: 1px solid rgba(246, 196, 0, 0.78);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.76);
  color: #ffd43d;
  cursor: pointer;
  pointer-events: auto;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.player-fullscreen-button::before {
  width: 20px;
  height: 20px;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 8px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 0 / 2px 8px no-repeat,
    linear-gradient(currentColor, currentColor) 100% 0 / 8px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 100% 0 / 2px 8px no-repeat,
    linear-gradient(currentColor, currentColor) 0 100% / 8px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 100% / 2px 8px no-repeat,
    linear-gradient(currentColor, currentColor) 100% 100% / 8px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 100% 100% / 2px 8px no-repeat;
  content: "";
}

.player-fullscreen-button:hover {
  border-color: rgba(255, 212, 61, 0.95);
  background: rgba(0, 0, 0, 0.86);
  transform: translateY(-1px);
}

.player-fullscreen-button:focus-visible {
  outline: 2px solid #ffd43d;
  outline-offset: 3px;
}

.stage.stage-videojs .player-fullscreen-button {
  width: clamp(56px, 5.2vw, 74px);
  height: clamp(48px, 4.8vw, 64px);
}

.stage.stage-videojs .player-fullscreen-button::before {
  width: 28px;
  height: 28px;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 11px 3px no-repeat,
    linear-gradient(currentColor, currentColor) 0 0 / 3px 11px no-repeat,
    linear-gradient(currentColor, currentColor) 100% 0 / 11px 3px no-repeat,
    linear-gradient(currentColor, currentColor) 100% 0 / 3px 11px no-repeat,
    linear-gradient(currentColor, currentColor) 0 100% / 11px 3px no-repeat,
    linear-gradient(currentColor, currentColor) 0 100% / 3px 11px no-repeat,
    linear-gradient(currentColor, currentColor) 100% 100% / 11px 3px no-repeat,
    linear-gradient(currentColor, currentColor) 100% 100% / 3px 11px no-repeat;
}

.stage:fullscreen,
.stage:-webkit-full-screen,
.stage.stage-pseudo-fullscreen {
  width: 100vw;
  height: 100vh;
  min-height: 0;
  aspect-ratio: auto;
  background: #000;
}

.stage.stage-pseudo-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

body.stage-pseudo-fullscreen-active {
  overflow: hidden;
}

.stage:fullscreen video,
.stage:fullscreen iframe,
.stage:fullscreen .video-js,
.stage:-webkit-full-screen video,
.stage:-webkit-full-screen iframe,
.stage:-webkit-full-screen .video-js,
.stage.stage-pseudo-fullscreen video,
.stage.stage-pseudo-fullscreen iframe,
.stage.stage-pseudo-fullscreen .video-js {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.stage:fullscreen .player-brand-overlay-top,
.stage:-webkit-full-screen .player-brand-overlay-top,
.stage.stage-pseudo-fullscreen .player-brand-overlay-top {
  top: 8px;
  right: 8px;
  min-width: 230px;
  height: 50px;
  font-size: 30px;
}

.stage:fullscreen .player-brand-overlay-bottom,
.stage:-webkit-full-screen .player-brand-overlay-bottom,
.stage.stage-pseudo-fullscreen .player-brand-overlay-bottom {
  bottom: 18px;
  width: min(32vw, 360px);
  min-width: 250px;
  height: 48px;
  font-size: 30px;
}

.stage:fullscreen .player-fullscreen-button,
.stage:-webkit-full-screen .player-fullscreen-button,
.stage.stage-pseudo-fullscreen .player-fullscreen-button {
  right: 14px;
  bottom: 14px;
}

.stage.stage-iframe {
  aspect-ratio: 16 / 9;
  min-height: 0;
}

.stage.stage-iframe .iframe-ad-cover {
  display: none;
  pointer-events: none;
}

.empty-state {
  max-width: 560px;
  padding: 28px;
  text-align: center;
}

.eyebrow {
  margin: 0;
}

h1 {
  margin: 8px 0 0;
  font-size: clamp(24px, 5vw, 58px);
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

p {
  color: var(--muted);
  line-height: 1.6;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  background: rgba(13, 18, 15, 0.96);
  padding: 16px;
}

.controls h1 {
  font-size: clamp(18px, 3vw, 28px);
}

.player-preview-mode,
.player-preview-mode body {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #000;
}

.player-preview-mode .shell,
.player-preview-mode .watch-layout,
.player-preview-mode .watch-main,
.player-preview-mode .player-grid,
.player-preview-mode .player-panel {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
}

.player-preview-mode .ad-shell,
.player-preview-mode .player-brand,
.player-preview-mode .controls,
.player-preview-mode .tg-popup {
  display: none !important;
}

.player-preview-mode .player-panel {
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #000;
}

.player-preview-mode .stage {
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
}

.player-preview-mode .stage video,
.player-preview-mode .stage iframe,
.player-preview-mode .stage .video-js {
  object-fit: contain;
}

.player-preview-mode .player-brand-overlay,
.player-preview-mode .player-fullscreen-button,
.player-preview-mode .stream-play-button {
  display: none !important;
}

.control-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.viewer-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  padding: 0 14px;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.viewer-count::before {
  content: "";
  display: inline-block;
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(246, 196, 0, 0.8);
  animation: viewer-count-pulse 1.1s ease-in-out infinite;
}

.viewer-count-header {
  min-height: 34px;
  margin-left: auto;
  border-color: rgba(246, 196, 0, 0.32);
  background: rgba(246, 196, 0, 0.08);
  color: var(--gold);
  box-shadow: 0 0 24px rgba(246, 196, 0, 0.08);
}

.viewer-count[hidden] {
  display: none;
}

@keyframes viewer-count-pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.82);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

label {
  display: grid;
  min-width: 180px;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

select,
.button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #070a08;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

select {
  padding: 0 10px;
}

.button {
  padding: 0 14px;
  cursor: pointer;
}

.button:hover {
  border-color: var(--gold);
  color: var(--gold);
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #070a08;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  padding: 10px;
}

textarea {
  resize: vertical;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.button:focus-visible {
  border-color: var(--gold);
  outline: 2px solid rgba(246, 196, 0, 0.44);
  outline-offset: 2px;
}

.error {
  color: var(--red);
}

.adblock-modal[hidden] {
  display: none;
}

.adblock-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 16px;
}

.adblock-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
}

.adblock-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(92vw, 420px);
  gap: 14px;
  border: 1px solid rgba(246, 196, 0, 0.34);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.62);
  padding: 22px;
}

.adblock-dialog h2,
.adblock-dialog p {
  margin: 0;
}

.adblock-dialog h2 {
  color: var(--gold);
  font-size: 22px;
  font-weight: 950;
  line-height: 1.1;
}

.adblock-dialog p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.45;
}

.tg-popup[hidden] {
  display: none;
}

.tg-popup {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 30;
}

.tg-popup-on-stage {
  position: absolute;
  left: 14px;
  right: auto;
  bottom: 14px;
  z-index: 9;
}

.tg-popup-card {
  position: relative;
  width: min(360px, calc(100vw - 32px));
  border: 1px solid rgba(246, 196, 0, 0.44);
  border-radius: 10px;
  background:
    radial-gradient(circle at 20% 0%, rgba(246, 196, 0, 0.2), transparent 35%),
    linear-gradient(150deg, rgba(6, 8, 7, 0.98), rgba(2, 3, 3, 0.98));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  padding: 16px;
}

.tg-popup-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.tg-popup-kicker {
  margin: 0;
  color: var(--gold);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tg-popup-card h2 {
  margin: 8px 0 0;
  font-size: 22px;
  font-weight: 950;
  line-height: 1.1;
  text-transform: uppercase;
}

.tg-popup-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.tg-popup-button {
  margin-top: 14px;
  text-decoration: none;
}

.social-dock {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: grid;
  justify-items: end;
  gap: 10px;
  pointer-events: none;
}

.social-dock-toggle {
  display: none;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(246, 196, 0, 0.44);
  border-radius: 999px;
  background: var(--gold);
  color: #111;
  cursor: pointer;
  font-size: 24px;
  font-weight: 950;
  pointer-events: auto;
}

.social-dock-panel {
  display: grid;
  gap: 8px;
  pointer-events: auto;
}

.social-link {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  min-width: 152px;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(246, 196, 0, 0.24);
  border-radius: 8px;
  background: rgba(12, 14, 12, 0.9);
  color: var(--text);
  padding: 4px 11px 4px 4px;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.social-link.disabled {
  color: rgba(244, 239, 226, 0.56);
}

.social-mark {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #1d9bf0;
  color: #fff;
}

.social-mark svg {
  display: block;
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.social-mark.telegram svg {
  width: 22px;
  height: 22px;
}

.social-mark.youtube {
  background: #ff0033;
}

.social-mark.youtube svg {
  width: 23px;
  height: 23px;
}

.social-mark.tiktok {
  background: #111;
  box-shadow: inset 2px 0 #25f4ee, inset -2px 0 #fe2c55;
}

.social-mark.tiktok svg {
  width: 20px;
  height: 20px;
}

.social-mark.facebook {
  background: #1877f2;
}

.social-mark.facebook svg {
  width: 24px;
  height: 24px;
}

.social-mark.instagram {
  background: linear-gradient(135deg, #feda75, #fa7e1e 28%, #d62976 58%, #962fbf 78%, #4f5bd5);
}

@media (max-width: 1180px) {
  .watch-layout {
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
  }

  .ad-rail {
    display: none;
  }

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

}

@media (max-width: 760px) {
  .shell {
    padding: 0;
  }

  .watch-layout,
  .watch-main,
  .player-grid {
    display: block;
  }

  .ad-leaderboard {
    min-height: 90px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .player-panel {
    min-height: 0;
    border: 0;
    border-radius: 0;
  }

  .stage {
    width: 100vw;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .stage.stage-iframe {
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 0;
    width: 100vw;
  }

  .stage.stage-iframe iframe {
    height: 100%;
    max-width: none;
    transform: none;
    width: 100%;
  }

  .iframe-ad-cover {
    right: 0;
    top: 64px;
    width: 65%;
    height: calc(62% - 64px);
  }

  .player-brand-overlay-top {
    top: 8px;
    right: 8px;
    min-width: 124px;
    height: 34px;
    font-size: 17px;
  }

  .player-brand-overlay-bottom {
    bottom: 12px;
    width: min(62vw, 260px);
    min-width: 0;
    height: 36px;
    font-size: 18px;
  }

  .player-fullscreen-button {
    display: none;
  }

  .controls {
    align-items: stretch;
    flex-direction: column;
  }

  .control-row {
    justify-content: stretch;
  }

  .viewer-count {
    justify-content: center;
    width: 100%;
  }

  .viewer-count-header {
    width: auto;
    min-height: 34px;
    padding: 0 12px;
  }

  label,
  .button {
    width: 100%;
  }

  .tg-popup {
    right: 10px;
    bottom: 10px;
  }

  .tg-popup-on-stage {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }

  .social-dock {
    right: 12px;
    bottom: 12px;
    z-index: 95;
  }

  .social-dock-toggle {
    display: inline-flex;
  }

  .social-dock-panel {
    display: none;
    max-width: min(220px, calc(100vw - 24px));
  }

  .social-dock.open .social-dock-panel {
    display: grid;
  }
}
