@font-face {
  font-family: 'PoxelFont'; /* Název fontu, který budeš používat v CSS */
  src: url('font/FreePixel.ttf') format('truetype'); /* Cesta k souboru .ttf */
  font-weight: normal; /* Můžeš nastavit další vlastnosti, jako je tloušťka fontu */
  font-style: normal;  /* Nastavení stylu písma (normální, kurzíva atd.) */
}

:root {
  --pixel-size: 4px;
  --cols: 5;
  --rows: 7;
  --gap: calc(var(--pixel-size) / 4);
  --char-width: calc(var(--pixel-size) * var(--cols) + var(--gap) * (var(--cols) - 1));
  --char-height: calc(var(--pixel-size) * var(--rows) + var(--gap) * (var(--rows) - 1));



  --pixel-size2: 1px;
  --cols2: 5;
  --rows2: 7;
  --gap2:3px;
  --char-width2: calc(var(--pixel-size2) * var(--cols2) + var(--gap2) * (var(--cols2) - 1));
  --char-height2: calc(var(--pixel-size2) * var(--rows2) + var(--gap2) * (var(--rows2) - 1));
}

html,
body {
  margin: 0;
  padding: 0;
  background: #000;
  height: 100%;
  overflow: hidden;
  font-family: monospace;
}

#screen {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  position: relative;
  z-index: 1;
}

.pixel-text {
  display: block;
  /* nebo inline-block, ale NE flex! */
  gap: calc(var(--pixel-size) * 1);
  /* vertical-align: top; */
  width: 100%;
  word-break: break-word;
}

.char {
  display: inline-block; /* změna z grid na inline-block */
  vertical-align: bottom;
  /* grid nastavení přesuneš do vnitřního wrapperu */
  width: var(--char-width);
  height: var(--char-height);
  position: relative;
  margin-right: 4px; /* přidá rozestup mezi znaky */
}

.char:last-child {
  margin-right: 0;
}

.char-inner {
  display: grid;
  grid-template-columns: repeat(var(--cols), var(--pixel-size));
  grid-template-rows: repeat(var(--rows), var(--pixel-size));
  gap: var(--gap);
  width: var(--char-width);
  height: var(--char-height);
}

/* Wrapper pro jeden řádek textu */
.text-line {
  display: block;
  width: 100%;
  white-space: nowrap;
  line-height: 1.1;
  margin-bottom: 8px; /* přidá svislou mezeru mezi řádky */
}

.text-line:last-child {
  margin-bottom: 0;
}

/* === KURZOR === */
.cursor {
  display: inline-block;
  /* odstraněno: width, height, background, vertical-align, margin, animation */
  /* vše potřebné je z .char a .char-inner */
  /* žádná úzká čára! */
  /* animace zůstává pro blikání */
  animation: blink 1s steps(1) infinite;
}


/* === CRT OVERLAY === */
body::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  /* background: repeating-linear-gradient(to bottom,
      rgba(0, 255, 0, 0.05),
      rgba(0, 255, 0, 0.05) 1px,
      transparent 2px,
      transparent 4px); */
  pointer-events: none;
  z-index: 2;
  /* mix-blend-mode: overlay; */
}

#screen::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  /* background: radial-gradient(ellipse at center, rgba(0, 255, 0, 0.05) 0%, transparent 70%); */
  pointer-events: none;
  z-index: 2;
}

/* === CRT Glow === */
.pixel.on {
  /* box-shadow: 0 0 18px rgba(252, 252, 252, 0.7), 0 0 6px rgba(255, 255, 255, 0.4); */
  background-color: rgb(255, 255, 255);
}

/* === Glitch animation === */
.glitch {
  animation: glitch 1s infinite;
}

@keyframes glitch {
  0% {
    transform: translate(0px, 0px);
  }

  20% {
    transform: translate(-1px, 0px);
  }

  40% {
    transform: translate(1px, 1px);
  }

  60% {
    transform: translate(0px, -1px);
  }

  80% {
    transform: translate(1px, 0px);
  }

  100% {
    transform: translate(0px, 0px);
  }
}


#crt-tunnel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  z-index: 1;
}


canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#main-canvas {
  /* filter: blur(1.5px); */
  /* color: red; */
  z-index: 0;
}

#rocket-canvas {
  /* filter: blur(0.0px);  */
  z-index: 1;

}


#menu-container {
  font-family: 'PoxelFont', sans-serif; /* Použití vlastního fontu */
  color: white;
  font-size: 28px;
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 10;
  text-align: left;
  display: flex;
  
  
}



#menu-container span {
  font-size: 30px;
  padding: 3px 2px 0px 0px;
}
.menu-item {
  
  /* box-shadow: 0 0 18px rgba(255, 255, 255, 0.7), 0 0 6px rgba(255, 255, 255, 0.4); */
  /* transform: scale(0.3); */
  /* padding: 0px; */
  /* font-family: 'Courier New', sans-serif; */
  font-family: 'PoxelFont', sans-serif; /* Použití vlastního fontu */
  /* text-transform: uppercase; */
 font-weight: bold;
  color: black;
  font-size: 28px;
  letter-spacing: -2px;
  /* text-shadow: 0 0 18px rgba(255, 255, 255, 0.7), 0 0 6px rgba(255, 255, 255, 0.4); */
  /* background-color: rgba(61, 61, 61, 0.524); */
  background-color: white;
  text-decoration: none;
  margin-left: 0px;
  margin-right: 15px;
  padding: 3px 22px 0px 2px;
  width: 100px;

  /* border: 1px solid white; */
}

.menu-item:hover {
  color: white;
  background-color: rgb(0, 0, 0);

  
}

#footer-bar {
  font-family: 'Courier New', sans-serif;
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 70px;
  width: 90%;

  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1em;
  color: #c9c9c9;
  padding: 0 0px;
  z-index: 100;
  pointer-events: none;
  /* letter-spacing: 0.001em; */
}



#footer-bar .footer-left,
#footer-bar .footer-right {
  pointer-events: auto;
}

#footer-bar .footer-right a {
  color: #c9c9c9;
  text-decoration: none;
  font-weight: normal;
}





/* Responsivita pro mobilní zařízení */
@media (max-width: 600px) {
  #footer-bar {
    flex-direction: column;
    align-items: flex-start;
    width: 96%;
    font-size: 1em;
    padding: 0 2vw;
    bottom: 16px;
    border: none;
    background: rgba(0,0,0,0.7);
  }
  #footer-bar .footer-left,
  #footer-bar .footer-right {
    white-space: normal;
    margin-bottom: 2px;
    width: 100%;
    text-align: left;
  }
  #footer-bar .footer-right {
    margin-bottom: 0;
  }
}

