﻿body {
  margin: 0;
  padding: 0;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background-color: #000;
  font-family: "Courier New", monospace;
  color: #00ff00;
}

.container {
  height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.open-browser-prompt {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid #ff0000;
  padding: 20px;
  text-align: center;
  z-index: 10;
  max-width: 90%;
}

.open-browser-prompt p {
  margin: 0 0 10px;
  font-size: 1em;
  color: #ff0000;
  font-weight: bold;
}

.open-browser-btn {
  background: none;
  border: 1px solid #ff0000;
  color: #ff0000;
  font-family: "Courier New", monospace;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 0.9em;
}

.open-browser-btn:hover {
  background: #ff0000;
  color: #000;
}

.fallback-icon {
  position: fixed;
  bottom: 10px;
  left: 10px;
  z-index: 3;
}

.fallback-icon button {
  background: none;
  border: none;
  font-size: 1.5em;
  color: #00ff00;
  cursor: pointer;
}

.fallback-icon button:hover {
  color: #ff0000;
}

.hidden {
  display: none !important;
}

#yt-wrapper {
  position: absolute;
  left: -99999px;
  top: auto;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.stream-title {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid #00ff00;
  padding: 5px 10px;
  display: none;
  z-index: 2;
  text-align: center;
}

.stream-text {
  font-size: 1em;
  color: #00ff00;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

.controls-panel {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  flex-direction: row;
  gap: 10px;
  z-index: 2;
}

.control-btn {
  background: none;
  border: none;
  width: 16.8px;
  height: 16.8px;
  cursor: pointer;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  image-rendering: pixelated;
}

.control-btn:hover {
  background-color: #00ff00;
}

.prev-btn {
  background-image: url('data:image/svg+xml;utf8,<svg width="48" height="48" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 2L2 8L12 14V2Z" fill="%2300ff00"/><path d="M8 2L2 8L8 14V2Z" fill="%2300ff00"/></svg>');
}

.next-btn {
  background-image: url('data:image/svg+xml;utf8,<svg width="48" height="48" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 2L14 8L4 14V2Z" fill="%2300ff00"/><path d="M8 2L14 8L8 14V2Z" fill="%2300ff00"/></svg>');
}

.random-btn {
  background-image: url('data:image/svg+xml;utf8,<svg width="48" height="48" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13 1H12V3H10.5858L7 6.58579L3.41421 3H0V5H2.58579L5.58579 8L2.58579 11H0V13H3.41421L11.4142 5H12V7H13L16 4L13 1Z" fill="%2300ff00"/><path d="M12 9H13L16 12L13 15H12V13H10.5858L8.41421 10.8284L9.82843 9.41421L11.4142 11H12V9Z" fill="%2300ff00"/></svg>');
}

.background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: fill;
  z-index: -1;
}

.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(rgba(0, 0, 0, 0.2) 2px, transparent 2px);
  background-size: 100% 4px;
  z-index: 1;
  pointer-events: none;
}

.typewriter {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5em;
  white-space: nowrap;
  overflow: hidden;
  animation: typing 3.5s steps(40, end);
  text-align: center;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

.arrow {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5em;
  cursor: pointer;
  color: #00ff00;
  z-index: 3;
}

.side-arrow {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5em;
  cursor: pointer;
  color: #00ff00;
  z-index: 3;
}

.panel {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  background: rgba(0, 0, 0, 0.8);
  padding: 20px;
  display: none;
  flex-direction: column;
  align-items: center;
  animation: slideUp 0.3s ease;
  z-index: 2;
}

.side-panel {
  position: fixed;
  right: 0;
  top: 0;
  height: 100vh;
  width: 200px;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  animation: slideLeft 0.3s ease;
  z-index: 2;
}

@keyframes slideLeft {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.close-arrow {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5em;
  cursor: pointer;
  color: #00ff00;
}

.close-side-arrow {
  position: absolute;
  left: -30px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5em;
  cursor: pointer;
  color: #00ff00;
}

.section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
  margin: 0;
}

.section h3 {
  margin: 0 0 10px;
  font-size: 0.9em;
  font-weight: normal;
  color: #00ff00;
}

.shortcut-btn {
  background: none;
  border: none;
  color: #00ff00;
  font-family: "Courier New", monospace;
  padding: 5px 10px;
  margin: 10px 0;
  cursor: pointer;
  display: block;
  width: 100%;
  text-align: center;
  font-size: 0.9em;
  font-weight: normal;
}

.shortcut-btn:hover {
  background: #00ff00;
  color: #000;
}

.stream-previews {
  /* Dynamiczne style wstawiane przez script.js z data.json */
}

.preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  position: relative;
}

.preview-img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border: 2px solid #00ff00;
  image-rendering: pixelated;
}

.preview-img:hover {
  background: #00ff00;
}

.preview-label {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8em;
  color: #00ff00;
  background: rgba(0, 0, 0, 0.8);
  padding: 2px 5px;
  text-align: center;
  width: auto;
  white-space: nowrap;
}

.loading-dots {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3em;
  color: #00ff00;
  display: flex;
  gap: 0.1em;
}

.dot {
  animation: blink 1s infinite;
}

.dot:nth-child(1) {
  animation-delay: 0s;
}

.dot:nth-child(2) {
  animation-delay: 0.2s;
}

.dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* Usunięcie efektu hover i zapewnienie widoczności dla strzałek i przycisków sterujących na mobile */
@media (hover: none) {
  .arrow:hover,
  .arrow:active,
  .close-arrow:hover,
  .close-arrow:active,
  .control-btn:hover,
  .control-btn:active {
    background-color: transparent;
    opacity: 1;
  }
  .prev-btn:hover,
  .prev-btn:active {
    background-image: url('data:image/svg+xml;utf8,<svg width="48" height="48" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 2L2 8L12 14V2Z" fill="%2300ff00"/><path d="M8 2L2 8L8 14V2Z" fill="%2300ff00"/></svg>');
  }
  .next-btn:hover,
  .next-btn:active {
    background-image: url('data:image/svg+xml;utf8,<svg width="48" height="48" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 2L14 8L4 14V2Z" fill="%2300ff00"/><path d="M8 2L14 8L8 14V2Z" fill="%2300ff00"/></svg>');
  }
  .random-btn:hover,
  .random-btn:active {
    background-image: url('data:image/svg+xml;utf8,<svg width="48" height="48" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13 1H12V3H10.5858L7 6.58579L3.41421 3H0V5H2.58579L5.58579 8L2.58579 11H0V13H3.41421L11.4142 5H12V7H13L16 4L13 1Z" fill="%2300ff00"/><path d="M12 9H13L16 12L13 15H12V13H10.5858L8.41421 10.8284L9.82843 9.41421L11.4142 11H12V9Z" fill="%2300ff00"/></svg>');
  }
}

@media (max-width: 768px) {
  .background {
    object-fit: fill;
  }
  .typewriter {
    font-size: 1em;
  }
  .arrow {
    font-size: 1em;
    bottom: 10px;
  }
  .side-arrow {
    font-size: 1em;
    right: 10px;
  }
  .close-arrow {
    font-size: 1em;
    top: -20px;
  }
  .close-side-arrow {
    font-size: 1em;
    left: -20px;
  }
  .panel {
    padding: 10px;
  }
  .side-panel {
    width: 150px;
  }
  .section h3 {
    font-size: 0.9em;
  }
  .stream-title {
    width: 75%;
    font-size: 1em;
    padding: 3px 6px;
  }
  .stream-text {
    font-size: 1em;
  }
  .controls-panel {
    gap: 5px;
  }
  .control-btn {
    width: 20px;
    height: 20px;
  }
  .preview-img {
    width: 120px;
    height: 80px;
  }
  .preview-label {
    font-size: 0.9em;
    bottom: 5px;
    background: rgba(0, 0, 0, 0.8);
  }
  .shortcut-btn {
    padding: 3px 6px;
    font-size: 0.9em;
    margin: 8px 0;
  }
  .fallback-icon button {
    font-size: 1.2em;
  }
}