:root {
  --navy: #001b35;
  --ink: #03101c;
  --orange: #f77f00;
  --cyan: #38adde;
  --cream: #f0ebd2;
  --muted: #9bb0c0;
  --font-display: "Teko", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(56, 173, 222, 0.2), transparent 50%),
    radial-gradient(900px 520px at 100% 0%, rgba(247, 127, 0, 0.14), transparent 45%),
    linear-gradient(180deg, #041526 0%, var(--ink) 40%, #020b14 100%);
  color: var(--cream);
  font-family: var(--font-body);
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.15rem 1.5rem 0.55rem;
}

.brand {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  min-width: 0;
  flex-wrap: wrap;
}

.brand-logo {
  display: block;
  height: clamp(2.8rem, 6vw, 4rem);
  width: auto;
  max-width: min(280px, 42vw);
  object-fit: contain;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
  opacity: 0.72;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  flex: 1 1 12rem;
}

.brand-tag {
  margin: 0;
}

.live-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #666;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.live-dot.on {
  background: #ff3b3b;
  box-shadow: 0 0 16px #ff3b3b;
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  50% { opacity: 0.55; }
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes badgeFlash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

.channel {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.8vw, 2.1rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.05;
  text-transform: uppercase;
}

.tag, .tz {
  margin: 0.15rem 0 0;
  color: var(--cyan);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tz a {
  color: var(--cyan);
  text-decoration: none;
}

.antennas {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.antenna {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(56, 173, 222, 0.35);
  color: var(--cream);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.antenna:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.antenna.on {
  background: rgba(247, 127, 0, 0.18);
  border-color: var(--orange);
  color: var(--orange);
}

.clock {
  margin: 0;
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 600;
  color: var(--orange);
  text-align: right;
  line-height: 1;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.7fr);
  gap: 1.4rem;
  padding: 0.85rem 1.5rem 2.2rem;
}

.tv-bezel {
  background: #0a0a0a;
  border: 8px solid #1a1a1a;
  border-radius: 18px;
  box-shadow: 0 0 0 2px #3a3a3a, 0 24px 50px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  position: relative;
}

.player-logo {
  position: absolute;
  left: 0.85rem;
  top: 0.85rem;
  z-index: 30;
  height: clamp(2.4rem, 9vw, 4.2rem);
  width: auto;
  max-width: min(220px, 38%);
  object-fit: contain;
  opacity: 0.45;
  pointer-events: none;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.55));
  transition: opacity 0.25s ease;
}

.tv-bezel:hover .player-logo {
  opacity: 0.38;
}

.tv-bezel:fullscreen .player-logo,
.tv-bezel:-webkit-full-screen .player-logo {
  left: 1.1rem;
  top: 1.1rem;
  height: clamp(3rem, 8vh, 5rem);
  max-width: min(280px, 36vw);
  opacity: 0.55;
  z-index: 40;
}

video, #yt-player, #local-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
}

#local-player { display: none; }
#local-player.on { display: block; }

.deck {
  position: absolute;
  right: 0.7rem;
  top: 0.7rem;
  z-index: 12;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.sound-gate {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  border: 0;
  cursor: pointer;
  color: #fff;
  font: 700 1.35rem/1.2 Teko, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(0, 10, 24, 0.55);
  /* nie zasłaniaj górnego paska z „Następny” */
  clip-path: inset(3.2rem 0 0 0);
}

.sound-gate[hidden] {
  display: none !important;
}

.sound-gate:hover {
  background: rgba(0, 10, 24, 0.72);
}

@media (hover: hover) and (pointer: fine) {
  .tv-bezel:hover .deck,
  .tv-bezel:focus-within .deck {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (hover: none), (pointer: coarse) {
  .deck {
    opacity: 1;
    pointer-events: auto;
  }
}

.deck button {
  border: 0;
  border-radius: 6px;
  padding: 0.45rem 0.75rem;
  background: rgba(0, 12, 28, 0.9);
  color: var(--cream);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.deck button:hover {
  background: rgba(247, 127, 0, 0.92);
  color: #111;
}

.deck-quality {
  display: inline-flex;
  margin: 0;
}

.deck select {
  border: 0;
  border-radius: 6px;
  padding: 0.45rem 0.55rem;
  background: rgba(0, 12, 28, 0.9);
  color: var(--cream);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(6px);
  max-width: 9.5rem;
}

.deck select:hover,
.deck select:focus {
  background: rgba(247, 127, 0, 0.92);
  color: #111;
  outline: none;
}

.deck #btn-cc.active {
  background: rgba(56, 173, 222, 0.9);
  color: #041018;
}

.deck-volume {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  background: rgba(0, 12, 28, 0.9);
  backdrop-filter: blur(6px);
}

.deck-volume .vol-ico {
  color: var(--cream);
  font-size: 0.85rem;
  line-height: 1;
}

.deck-volume input[type="range"] {
  width: 5.5rem;
  height: 0.35rem;
  margin: 0;
  accent-color: var(--orange);
  cursor: pointer;
}

.tv-bezel:fullscreen,
.tv-bezel:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  border: 0;
  border-radius: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tv-bezel:fullscreen #local-player,
.tv-bezel:-webkit-full-screen #local-player,
.tv-bezel:fullscreen #yt-player,
.tv-bezel:-webkit-full-screen #yt-player {
  width: 100%;
  height: 100%;
  max-height: 100vh;
  aspect-ratio: auto;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

#yt-player.off { display: none; }

#yt-player iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.screen-note {
  position: absolute;
  left: 1rem;
  bottom: 0.8rem;
  margin: 0;
  padding: 0.25rem 0.55rem;
  background: rgba(0, 12, 28, 0.72);
  color: var(--cyan);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  pointer-events: none;
}

.now {
  margin-top: 1rem;
  padding: 1.1rem 1.15rem 1.15rem;
  background:
    linear-gradient(135deg, rgba(0, 40, 72, 0.55), rgba(0, 27, 53, 0.82));
  border-left: 4px solid var(--orange);
  animation: riseIn 0.45s ease both;
}

.now.bump {
  animation: riseIn 0.4s ease both;
}

.now-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.now-kicker {
  margin: 0;
  color: var(--cyan);
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 700;
}

.live-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #ff6b6b;
  animation: badgeFlash 2s ease-in-out infinite;
}

.now h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.4vw, 2.55rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.02em;
}

.now p { margin: 0.3rem 0 0; }

.credit {
  color: var(--muted);
  font-size: 0.88rem;
}

.upnext {
  margin-top: 0.95rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(56, 173, 222, 0.22);
}

.upnext-label {
  margin: 0;
  color: var(--orange);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.upnext-track {
  margin: 0.25rem 0 0;
  font-size: 1rem;
  font-weight: 600;
}

.guide {
  background: rgba(0, 27, 53, 0.55);
  border: 1px solid rgba(56, 173, 222, 0.25);
  padding: 1rem 1.1rem 1.3rem;
}

.guide-lead {
  margin: -0.35rem 0 0.9rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.guide h2, .guide h3 {
  margin: 0 0 0.8rem;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--orange);
}

.guide h3 { font-size: 1rem; margin-top: 0.2rem; }

.guide ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.guide li {
  padding: 0.7rem 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.2s ease;
}

.guide li.active {
  background: rgba(247, 127, 0, 0.14);
  border-left: 3px solid var(--orange);
}

.guide li.active strong::after {
  content: " · teraz";
  color: var(--orange);
  font-weight: 600;
  font-size: 0.78em;
}

.hours {
  display: block;
  color: var(--cyan);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.hints {
  margin-top: 1.15rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.legal {
  margin-top: 1.15rem;
  padding: 1.1rem 1.15rem 1.2rem;
  background: linear-gradient(135deg, rgba(0, 40, 72, 0.4), rgba(0, 27, 53, 0.78));
  border-left: 4px solid var(--cyan);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.legal h3 {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--orange);
}

.legal p { margin: 0 0 0.75rem; }
.legal p:last-child { margin-bottom: 0; }

.support {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.support-lead { margin: 0 0 0.75rem; }

.support-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  align-items: center;
  margin-bottom: 0.9rem;
}

.legal a:not(.bmc-btn):not(.paypal-btn):not(.recommend-btn),
.support a:not(.bmc-btn):not(.paypal-btn):not(.recommend-btn) {
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.legal a:not(.bmc-btn):not(.paypal-btn):not(.recommend-btn):hover {
  border-bottom-color: var(--orange);
  color: #fff;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.bmc-btn,
.paypal-btn,
.recommend-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0;
  padding: 0.55rem 1rem;
  border: 0 !important;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  text-decoration: none !important;
  cursor: pointer;
  font-family: inherit;
}

.bmc-btn {
  background: #ffdd00;
  color: #0d0c22 !important;
}

.paypal-btn {
  background: #0070ba;
  color: #fff !important;
}

.recommend-btn {
  background: var(--orange);
  color: #1a0f05 !important;
}

.bmc-btn:hover,
.paypal-btn:hover,
.recommend-btn:hover {
  filter: brightness(1.08);
}

.recommend-btn.copied {
  background: var(--cyan);
  color: #041018 !important;
  filter: none;
}

.recommend-status {
  margin: 0.55rem 0 0;
  min-height: 1.2em;
  color: var(--muted);
  font-size: 0.85rem;
}

.bmc-btn svg {
  flex-shrink: 0;
}

.support .bmc-btn,
.support .paypal-btn {
  margin-top: 0;
}

.support-form {
  display: grid;
  gap: 0.45rem;
}

.support-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 4.5rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(0, 8, 18, 0.55);
  color: var(--cream);
  font: inherit;
}

.support-form button {
  justify-self: start;
  border: 0;
  border-radius: 6px;
  padding: 0.45rem 0.85rem;
  background: rgba(255, 255, 255, 0.1);
  color: var(--cream);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.support-form button:hover { background: rgba(255, 255, 255, 0.16); }

.form-note {
  margin: 0;
  font-size: 0.78rem;
  opacity: 0.85;
}

.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;
}

.hints kbd {
  display: inline-block;
  min-width: 1.35rem;
  padding: 0.05rem 0.35rem;
  border: 1px solid rgba(56, 173, 222, 0.4);
  border-radius: 4px;
  background: rgba(0, 12, 28, 0.65);
  color: var(--cream);
  font-size: 0.75rem;
  text-align: center;
}

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .clock { font-size: 1.55rem; text-align: left; }
  .deck { opacity: 1; pointer-events: auto; }
}

@media (max-width: 560px) {
  .top { padding: 1rem 1rem 0.4rem; }
  .layout { padding: 0.7rem 1rem 1.6rem; }
  .antenna { padding: 0.4rem 0.65rem; font-size: 0.75rem; }
}
