/**
 * GameStream
 * Playmatic — skeleton placeholders, non-clickable player
 * Link — previous cinema page design
 */

.page-gamestream {
  --gs-bg: #111111;
  --gs-surface: #161616;
  --gs-line: #3a3a3a;
  --gs-skel: rgba(245, 244, 240, 0.08);
  --gs-skel-strong: rgba(245, 244, 240, 0.12);
  --gs-text: #f5f4f0;
  --gs-muted: #9a9a94;
  --gs-accent: #4a66c7;
  --gs-max: 1120px;
  margin: 0;
  min-height: 100vh;
  background: var(--gs-bg);
  color: var(--gs-text);
  font-family: Inter, Arial, sans-serif;
}

/* Domain views */
html[data-domain="linkvideo"] .gs-view--skel { display: none !important; }
html[data-domain="playmatic"] .gs-view--rich,
html:not([data-domain="linkvideo"]) .gs-view--rich { display: none !important; }

.gs-demo-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--gs-bg);
  border-bottom: 1px solid var(--gs-line);
}

.gs-demo-bar__back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: inherit;
  text-decoration: none;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.78;
}

.gs-demo-bar__back:hover { opacity: 1; }

.gs-demo-bar__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gs-muted);
}

.gs-demo-bar__badge {
  color: var(--gs-accent);
  font-weight: 600;
}

.gs-cinema {
  max-width: var(--gs-max);
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.gs-site-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--gs-line);
}

.gs-main {
  padding-top: 1.15rem;
}

/* --- Skeleton (Playmatic) --- */
.gs-skel {
  display: block;
  background: var(--gs-skel);
  border-radius: 0;
  pointer-events: none;
  user-select: none;
}

.gs-skel--logo { width: 96px; height: 18px; flex-shrink: 0; }
.gs-skel--nav { width: 52px; height: 10px; flex-shrink: 0; }
.gs-skel--grow { flex: 1 1 auto; min-width: 0; height: 0; background: transparent; }
.gs-skel--chip { width: 84px; height: 28px; flex-shrink: 0; border: 1px solid var(--gs-line); background: transparent; }
.gs-skel--sq { width: 28px; height: 28px; flex-shrink: 0; border: 1px solid var(--gs-line); background: transparent; }

.gs-skel--title {
  width: min(280px, 70%);
  height: 28px;
  margin-bottom: 0.85rem;
  background: var(--gs-skel-strong);
}

.gs-skel--line {
  height: 10px;
  margin-bottom: 0.55rem;
}

.gs-skel--w25 { width: 25%; }
.gs-skel--w30 { width: 30%; }
.gs-skel--w50 { width: 50%; }
.gs-skel--w55 { width: 55%; }
.gs-skel--w65 { width: 65%; }
.gs-skel--w70 { width: 70%; }
.gs-skel--w80 { width: 80%; }
.gs-skel--w90 { width: 90%; }
.gs-skel--w100 { width: 100%; }
.gs-skel--mt { margin-top: 1.35rem; }

.gs-skel-row {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0 0.25rem;
}

.gs-skel--btn {
  width: 110px;
  height: 36px;
  background: var(--gs-skel-strong);
}

.gs-skel--btn-ghost {
  background: transparent;
  border: 1px solid var(--gs-line);
}

.gs-skel--card {
  width: 100%;
  height: 64px;
  margin-top: 0.5rem;
  border: 1px solid var(--gs-line);
  background: transparent;
}

.gs-view--skel .gs-player__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid #666;
  background: #141414;
  pointer-events: none;
  user-select: none;
  cursor: default;
}

.gs-player__grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    #141414;
  background-size: 28px 28px, 28px 28px, auto;
}

.gs-player__label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: rgba(245, 244, 240, 0.28);
  text-transform: uppercase;
}

.gs-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(200px, 0.65fr);
  gap: 1.5rem;
  margin-top: 1.35rem;
}

.gs-view--skel .gs-site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gs-line);
}

/* --- Rich cinema (Link) --- */
html[data-domain="linkvideo"] .page-gamestream {
  --gs-bg: #0b0b0d;
  --gs-surface: #141418;
  --gs-line: rgba(255, 255, 255, 0.1);
  --gs-text: #f3f2ee;
  --gs-muted: rgba(243, 242, 238, 0.58);
}

.gs-site-header--rich {
  gap: 1.5rem;
}

.gs-site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.gs-site-header__mark {
  width: 18px;
  height: 18px;
  border: 2px solid var(--gs-text);
  border-radius: 2px;
  box-shadow: inset -5px -5px 0 0 var(--gs-accent);
}

.gs-site-header__name {
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: 0.92rem;
}

.gs-site-header__nav {
  display: flex;
  gap: 1.1rem;
  flex: 1;
  min-width: 0;
  color: var(--gs-muted);
  font-size: 0.86rem;
}

.gs-site-header__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.gs-pill {
  width: 84px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.gs-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3a3a42, #6a6a78);
}

.gs-player__frame--rich {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--gs-line);
  background: #101014;
  pointer-events: none;
  user-select: none;
}

.gs-player__poster {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 70% 40%, rgba(74, 102, 199, 0.35), transparent 70%),
    linear-gradient(160deg, #1a1c28 0%, #0d0e14 55%, #151821 100%),
    url("../../assets/images/branding-1440x900.jpg") center / cover no-repeat;
  filter: saturate(0.85) brightness(0.72);
}

.gs-player__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.55) 100%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 27px,
      rgba(255, 255, 255, 0.02) 28px
    );
}

.gs-player__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 78px;
  height: 78px;
  border: 0;
  border-radius: 50%;
  background: rgba(11, 11, 13, 0.55);
  color: #fff;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.gs-player__play-tri {
  width: 0;
  height: 0;
  margin-left: 4px;
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent currentColor;
}

.gs-player__live {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.45);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
}

.gs-player__live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e5484d;
  box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.25);
}

.gs-player__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.75rem 1rem 0.85rem;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.75));
}

.gs-player__progress {
  height: 3px;
  margin-bottom: 0.65rem;
  background: rgba(255, 255, 255, 0.18);
}

.gs-player__progress > span {
  display: block;
  width: 34%;
  height: 100%;
  background: var(--gs-accent);
}

.gs-player__controls {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.85);
}

.gs-player__spacer { flex: 1; }

.gs-info {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.7fr);
  gap: 1.75rem;
  margin-top: 1.5rem;
}

.gs-info__kicker {
  margin: 0 0 0.55rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--gs-accent);
}

.gs-info__title {
  margin: 0 0 0.55rem;
  font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.gs-info__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
  color: var(--gs-muted);
  font-size: 0.88rem;
}

.gs-info__lede {
  margin: 0 0 1.25rem;
  max-width: 40rem;
  color: rgba(243, 242, 238, 0.78);
  line-height: 1.55;
}

.gs-info__cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.gs-btn {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--gs-line);
  background: transparent;
  color: var(--gs-text);
  padding: 0.7rem 1.1rem;
  font-size: 0.86rem;
  font-weight: 600;
  pointer-events: none;
}

.gs-btn--primary {
  background: var(--gs-accent);
  border-color: var(--gs-accent);
  color: #fff;
}

.gs-info__side-title {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gs-muted);
}

.gs-thumbs {
  display: grid;
  gap: 0.65rem;
}

.gs-thumb {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: center;
  min-height: 64px;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--gs-line);
  background: var(--gs-surface);
}

.gs-thumb span {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  color: var(--gs-accent);
}

.gs-thumb strong {
  font-size: 0.9rem;
  font-weight: 600;
}

.gs-article {
  margin-top: 2rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--gs-line);
  max-width: 44rem;
}

.gs-article h2 {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
}

.gs-article p {
  margin: 0 0 0.9rem;
  color: var(--gs-muted);
  line-height: 1.65;
}

.gs-site-footer--rich {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gs-line);
  color: var(--gs-muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 860px) {
  .gs-skel--hide-sm,
  .gs-view--skel .gs-skel--nav:nth-of-type(n + 4) { display: none; }

  .gs-layout,
  .gs-info {
    grid-template-columns: 1fr;
  }

  .gs-site-header__nav,
  .gs-pill { display: none; }

  .gs-player__play {
    width: 64px;
    height: 64px;
  }
}
