/* Channel Chaos: yayın ekranı. Oyundan görsel yok; ekran dürüstçe test kartı / sinyal yok.
   Soluk test kartı + kanal logosu + büyük OSD başlık + kayan bant. */
@font-face {
  font-family: "VT323";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/channelchaos-vt323-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-017F, U+0218-021B;
}
@font-face {
  font-family: "VT323";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/channelchaos-vt323-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201D, U+2022, U+2026, U+2212;
}

html[data-page="channel-chaos"] {
  --cc-osd: "VT323", "Courier New", monospace;
  --cc-green: #8be08b;
}

html[data-page="channel-chaos"] .cc-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

html[data-page="channel-chaos"] .crumbs {
  font-family: var(--cc-osd);
  font-size: 18px;
  letter-spacing: 0.06em;
}

/* ---------------------------------------------------------
   Ekran
--------------------------------------------------------- */

html[data-page="channel-chaos"] .cc-broadcast {
  position: relative;
}

html[data-page="channel-chaos"] .cc-screen {
  appearance: none;
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 9;
  padding: 0;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  background: #000;
  overflow: hidden;
  cursor: pointer;
  color: #e6e6e6;
  text-align: left;
  font: inherit;
}

html[data-page="channel-chaos"] .cc-screen:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

html[data-page="channel-chaos"] .cc-views {
  position: absolute;
  inset: 0;
  display: block;
  font-family: var(--cc-osd);
}

html[data-page="channel-chaos"] .cc-view {
  position: absolute;
  inset: 0;
  display: none;
}

html[data-page="channel-chaos"] .cc-screen[data-ch="0"] [data-view="0"],
html[data-page="channel-chaos"] .cc-screen[data-ch="1"] [data-view="1"],
html[data-page="channel-chaos"] .cc-screen[data-ch="2"] [data-view="2"],
html[data-page="channel-chaos"] .cc-screen[data-ch="3"] [data-view="3"] {
  display: block;
}

html[data-page="channel-chaos"] .cc-screen.is-switching .cc-view {
  display: none !important;
}

/* CH 01: soluk SMPTE test kartı (üstündeki yazı okunsun diye karartılmış) */
html[data-page="channel-chaos"] .cc-v-bars {
  filter: saturate(0.75) brightness(0.55);
}

html[data-page="channel-chaos"] .cc-v-bars i {
  display: block;
}

html[data-page="channel-chaos"] .cc-top,
html[data-page="channel-chaos"] .cc-mid {
  position: absolute;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

html[data-page="channel-chaos"] .cc-top { top: 0; height: 67%; }
html[data-page="channel-chaos"] .cc-mid { top: 67%; height: 8%; }

html[data-page="channel-chaos"] .cc-low {
  position: absolute;
  left: 0;
  right: 0;
  top: 75%;
  bottom: 0;
  display: grid;
  grid-template-columns: 5fr 5fr 5fr 3fr 3fr;
}

html[data-page="channel-chaos"] .cc-top i:nth-child(1) { background: #b4b4b4; }
html[data-page="channel-chaos"] .cc-top i:nth-child(2) { background: #b4b414; }
html[data-page="channel-chaos"] .cc-top i:nth-child(3) { background: #14b4b4; }
html[data-page="channel-chaos"] .cc-top i:nth-child(4) { background: #14b414; }
html[data-page="channel-chaos"] .cc-top i:nth-child(5) { background: #b414b4; }
html[data-page="channel-chaos"] .cc-top i:nth-child(6) { background: #b41414; }
html[data-page="channel-chaos"] .cc-top i:nth-child(7) { background: #1414b4; }
html[data-page="channel-chaos"] .cc-mid i:nth-child(1) { background: #1414b4; }
html[data-page="channel-chaos"] .cc-mid i:nth-child(2) { background: #101010; }
html[data-page="channel-chaos"] .cc-mid i:nth-child(3) { background: #b414b4; }
html[data-page="channel-chaos"] .cc-mid i:nth-child(4) { background: #101010; }
html[data-page="channel-chaos"] .cc-mid i:nth-child(5) { background: #14b4b4; }
html[data-page="channel-chaos"] .cc-mid i:nth-child(6) { background: #101010; }
html[data-page="channel-chaos"] .cc-mid i:nth-child(7) { background: #b4b4b4; }
html[data-page="channel-chaos"] .cc-low i:nth-child(1) { background: #082a4a; }
html[data-page="channel-chaos"] .cc-low i:nth-child(2) { background: #d8d8d8; }
html[data-page="channel-chaos"] .cc-low i:nth-child(3) { background: #3a0a5a; }
html[data-page="channel-chaos"] .cc-low i:nth-child(4) { background: #101010; }
html[data-page="channel-chaos"] .cc-low i:nth-child(5) { background: #1e1e1e; }

/* CH 02 / CH 03: düz zemin, kanalın adı alttaki büyük başlıkta */
html[data-page="channel-chaos"] .cc-v-nosig { background: #10203e; }
html[data-page="channel-chaos"] .cc-v-wait { background: #141418; }

/* CH 04: tüp TV kapanması */
html[data-page="channel-chaos"] .cc-v-off { background: #000; }

html[data-page="channel-chaos"] .cc-collapse {
  position: absolute;
  inset: 0;
  background: #141418;
  opacity: 0;
}

html[data-page="channel-chaos"] .cc-screen[data-ch="3"].is-closing .cc-collapse {
  animation: cc-off 760ms cubic-bezier(0.5, 0, 0.8, 0.6) forwards;
}

@keyframes cc-off {
  0% { opacity: 1; transform: scale(1, 1); background: #141418; }
  45% { opacity: 1; transform: scale(1, 0.012); background: #9aa4a6; }
  80% { opacity: 1; transform: scale(0.05, 0.012); background: #9aa4a6; }
  100% { opacity: 0; transform: scale(0, 0.012); background: #9aa4a6; }
}

/* Parazit (düşük kontrast, küçük çözünürlük, pikselli büyütme) */
html[data-page="channel-chaos"] .cc-noise {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  image-rendering: pixelated;
}

html[data-page="channel-chaos"] .cc-screen.is-switching .cc-noise {
  display: block;
}

/* Tarama çizgileri */
html[data-page="channel-chaos"] .cc-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 0 1px, transparent 1px 3px);
}

/* ---------------------------------------------------------
   Yayın grafiği: ses çubuğu, kanal logosu, büyük başlık
--------------------------------------------------------- */

html[data-page="channel-chaos"] .cc-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

html[data-page="channel-chaos"] .cc-screen[data-ch="3"] .cc-overlay,
html[data-page="channel-chaos"] .cc-screen.is-switching .cc-overlay {
  visibility: hidden;
}

html[data-page="channel-chaos"] .cc-vol {
  position: absolute;
  left: clamp(16px, 2.6vw, 32px);
  top: clamp(14px, 2.2vw, 26px);
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--cc-green);
  font-size: clamp(18px, 1.8vw, 22px);
  letter-spacing: 0.06em;
}

html[data-page="channel-chaos"] .cc-vol i {
  width: 9px;
  height: 16px;
  background: var(--cc-green);
}

html[data-page="channel-chaos"] .cc-vol i:first-of-type {
  margin-left: 6px;
}

html[data-page="channel-chaos"] .cc-vol i.off {
  background: rgba(139, 224, 139, 0.25);
}

html[data-page="channel-chaos"] .cc-bug {
  position: absolute;
  right: clamp(16px, 2.6vw, 32px);
  top: clamp(14px, 2.2vw, 26px);
  padding: 4px 10px;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.35);
  font-family: var(--font-display);
  font-size: clamp(13px, 1.4vw, 16px);
  font-weight: 800;
  letter-spacing: 0.02em;
}

html[data-page="channel-chaos"] .cc-bug b {
  font-weight: 600;
}

html[data-page="channel-chaos"] .cc-title {
  position: absolute;
  left: clamp(16px, 2.6vw, 32px);
  right: clamp(16px, 2.6vw, 32px);
  bottom: clamp(14px, 2.4vw, 28px);
  display: grid;
  justify-items: start;
}

html[data-page="channel-chaos"] .cc-now {
  margin-bottom: 8px;
  padding: 3px 10px;
  color: #06181c;
  background: var(--gold);
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

html[data-page="channel-chaos"] .cc-big {
  color: #fff;
  font-size: clamp(38px, 7.6vw, 108px);
  line-height: 0.86;
  letter-spacing: 0.02em;
  text-shadow: 3px 3px 0 #000;
}

html[data-page="channel-chaos"] .cc-sub {
  margin-top: 8px;
  color: var(--cc-green);
  font-size: clamp(18px, 2vw, 26px);
  letter-spacing: 0.06em;
  text-shadow: 2px 2px 0 #000;
}

/* Kayan bant (ekranın altına yapışık) */
html[data-page="channel-chaos"] .cc-ticker {
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  padding: 9px 0;
  color: #cfd3d4;
  background: #0a0b0e;
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold);
  border-radius: 0 0 var(--radius) var(--radius);
  font-size: 13px;
}

/* Üç tur akıp durur; üstüne gelince ya da odakta bekler */
html[data-page="channel-chaos"] .cc-ticker-track {
  display: inline-block;
  padding-left: 20px;
  animation: cc-tick calc(40s / var(--slomo, 1)) linear 3;
}

html[data-page="channel-chaos"] .cc-broadcast:is(:hover, :focus-within) .cc-ticker-track {
  animation-play-state: paused;
}

@keyframes cc-tick {
  to { transform: translateX(-50%); }
}

html[data-page="channel-chaos"] .cc-hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

/* ---------------------------------------------------------
   Yayın akışı (künye)
--------------------------------------------------------- */

html[data-page="channel-chaos"] .game-facts {
  margin-top: 8px;
  counter-reset: cc-row;
  border-radius: 6px;
}

html[data-page="channel-chaos"] .details-bar {
  font-family: var(--cc-osd);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.08em;
  background: #1a2a4a;
  color: #d8dde6;
  border-bottom-color: #000;
}

html[data-page="channel-chaos"] .details-actor {
  color: #9fb0cc;
}

html[data-page="channel-chaos"] .resume-row {
  counter-increment: cc-row;
  grid-template-columns: 74px 150px 1fr;
  gap: 18px;
  padding: 16px 22px;
  align-items: baseline;
}

html[data-page="channel-chaos"] .resume-row::before {
  content: "CH " counter(cc-row, decimal-leading-zero);
  font-family: var(--cc-osd);
  font-size: 22px;
  letter-spacing: 0.06em;
  color: var(--cc-green);
}

html[data-page="channel-chaos"] .resume-label {
  font-family: var(--cc-osd);
  font-size: 22px;
  letter-spacing: 0.06em;
  color: var(--gold);
}

html[data-page="channel-chaos"] .resume-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

/* Kanal geçişi gibi gezinme */
html[data-page="channel-chaos"] .game-nav a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 16px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}

html[data-page="channel-chaos"] .game-nav a:last-child {
  text-align: right;
}

html[data-page="channel-chaos"] .game-nav a:hover {
  border-color: var(--gold);
}

html[data-page="channel-chaos"] .game-nav small {
  font-family: var(--cc-osd);
  font-size: 18px;
  letter-spacing: 0.1em;
  color: var(--dim);
}

@media (max-width: 760px) {
  html[data-page="channel-chaos"] .cc-screen {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 560px) {
  html[data-page="channel-chaos"] .resume-row {
    grid-template-columns: 56px 1fr;
    gap: 4px 14px;
  }

  html[data-page="channel-chaos"] .resume-row .resume-text {
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-page="channel-chaos"] .cc-screen[data-ch="3"].is-closing .cc-collapse {
    animation: none;
  }

  html[data-page="channel-chaos"] .cc-ticker-track {
    animation: none;
  }
}
