* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", sans-serif;
  background-color: #fdfdfd;
  color: #fff;
  line-height: 1.6;
  overflow-x: hidden;
  
  
}

video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
   /* Udrží poměr stran a ořízne přebytek */
   /* Umístí video za ostatní obsah */
  pointer-events: none; /* Kliky propustí skrz video */
}

/*#navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #2c2c2c;
  display: flex;
  justify-content: flex-end;
  gap: 2rem;
  padding: 1rem 2rem;
  z-index: 1000;
}*/

#navbar a {
  color: #fff;
  font-size: 1.2rem;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
}

#navbar a:hover {
  color: #ffd166;
  text-decoration: underline;
}

/* Úvodní sekce */
#welcome-section {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  text-align: center;
  background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
  color: #fff;
}

#welcome-section h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #222;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.2);
}

#welcome-section h2 {
  font-size: 1.5rem;
  color: #5f5f5f;
  font-weight: normal;
  text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.1);
}

.start-bottom {
  position: static;
  padding: 1rem 2rem;
  font-size: 1.5rem;
  font-weight: bold;
  background: linear-gradient(135deg, #00b4db, #0083b0);
  border: 2px solid #007ca6;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 132, 180, 0.4);
  transition: all 0.3s ease;
  z-index: 2;
}



/*#start {
  padding: 1rem 2rem;
  font-size: 1.2rem;
  font-weight: bold;
  background: linear-gradient(135deg, #00b4db, #0083b0);
  border: 2px solid #007ca6;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 132, 180, 0.4);
  transition: all 0.3s ease;
  margin-top: 2rem;
}*/

.start-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 1rem 2rem;
  font-size: 1.5rem;
  font-weight: bold;
  background: linear-gradient(135deg, #00b4db, #0083b0);
  border: 2px solid #007ca6;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 132, 180, 0.4);
  transition: all 0.3s ease;
  z-index: 2;
}


.start-center:hover {
  background: linear-gradient(135deg, #56ccf2, #2f80ed);
  transform: translate(-50%, -50%) scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 132, 180, 0.6);
}

.start-bottom:hover {
  background: linear-gradient(135deg, #56ccf2, #2f80ed);
  transform:  scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 132, 180, 0.6);
}

/* parametry pro vyskakující okno po kliknutí na Kouzelné tlačítko */
#vysvetleni {
  max-height: 85vh;
  display: none;
  position: relative;
  background-color: #fff;
  color: #333;
  border: 3px solid #0083b0;
  border-radius: 10px;
  padding: 1.5rem; /* menší padding */
  margin: 1.5rem auto 0 auto;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  max-width: 1000px;
  width: 90%;
  overflow: hidden;
}

#vysvetleni h1 {
  text-align: center;
  margin-bottom: 2rem;
}

/* křížek */
#endButton {
  position: absolute;
  top: 10px;
  right: 15px;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 5px;
  padding: 2px 6px;
  font-size: 2rem;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
}

#endButton:hover {
  color: crimson;
  border-color: #ffb3b3;
  background-color: rgba(255, 0, 0, 0.05);
}

/* FLEX KONTEJNER pro dvě řady */
.flexGame,
.flexGame2 {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  padding-top: 1rem;
}

/* oddělení mezi řadami */
.flexGame2 {
  margin-top: 1.5rem;
  border-top: 2px solid #ddd;
  padding-top: 1.5rem;
}

/* BOXY */
.pozitivni,
.negativni,
.ovladani,
.life {
  min-width: 200px;
  flex: 1 1 250px;
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
}

/* pozitivni */
.pozitivni {
  background: #e6ffed;
  border: 2px solid #77c679;
}

.pozitivni ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 0;
}

.pozitivni li img {
  width: 60px;
  height: auto;
  transition: transform 0.2s ease;
}

.pozitivni li img:hover {
  transform: scale(1.1);
}

/* negativni */
.negativni {
  background-color: #ffeaea;
  border: 2px solid #e78b8b;
}

.negativni img {
  width: 60px;
  height: auto;
  transition: transform 0.2s ease;
}

.negativni img:hover {
  transform: rotate(10deg) scale(1.05);
}

/* ovladani */
.ovladani {
  background: #e6f7ff;
  border: 2px solid #00aaff;
}

.ovladani h2 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  color: #0077aa;
}

.ovladani i {
  font-size: 2rem;
  color: #0077aa;
  margin: 0 1rem;
  padding: 0.5rem;
  border: 2px solid #0077aa;
  border-radius: 8px;
  background-color: #ffffff22;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.ovladani i:hover {
  transform: scale(1.2);
  background-color: #d4f1ff;
}

/* life */
.life {
  background: #fff5f5;
  border: 2px solid #e58a8a;
}

.life h2 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  color: #c0392b;
}

.life img {
  width: 80px;
  height: auto;
  transition: transform 0.2s ease;
}

.life img:hover {
  transform: scale(1.1);
}

/* Následju celá část týkající se hry */

/* Sekce hry */
#game {
  display: none;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(to bottom, #c2e9fb, #a1c4fd);
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  overflow: hidden;
}

/* Herní okno */
.gameWindow {
  position: relative;
  background: linear-gradient(to bottom, #0077aa, #66c6f2, #e0f7ff);
  border: 6px solid #0077aa;
  border-radius: 20px;
  /* pro vytvoření videa
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  */
  width: 90%;
  height: 90%;
  max-width: 80%;
  max-height: 70%;
  
  padding: 1rem;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}

#finalButton {
  padding: 1rem 2rem;
  font-size: 1.2rem;
  font-weight: bold;
  background: linear-gradient(135deg, #00b4db, #0083b0);
  border: 2px solid #007ca6;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 132, 180, 0.4);
  transition: all 0.3s ease;
}

#finalButton:hover {
  background: linear-gradient(135deg, #56ccf2, #2f80ed);
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 132, 180, 0.6);
}

.gameLife {
  position: absolute;
  bottom: 2rem;
  left: 1rem;
  display: flex;
  gap: 0.5rem;
}

.gameLife img {
  width: 40px;
  height: auto;
}

.gameScore {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
}

.gameScore h1 {
  color: #000;
  font-size: 1.8rem;
}

.floor {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2rem;
  background-color: #8b4513;
  border-top: 10px solid #3cb043;
}

.gamePlayer {
  display: block;
  position: absolute;
  bottom: 4.2rem;
  left: 100px;

  height: 30px;
}

#player {
  width: 80px;
}

.dropItem {
  position: absolute;
  top: 0;
  width: 50px;
  height: auto;
  pointer-events: none;
  z-index: 10;
  transition: top 0.1s linear;
}

.gameHtml,
.gameCss,
.gameJs,
.gameBug,
.gameHeart,
.gameRandom,
.mraky {
  display: none;
}

#mrak1, #mrak2, #mrak3, #mrak4 {
  position: absolute;
  max-height: 50%;
  
  opacity: 0.6;
  pointer-events: none;
  z-index: 5;
}

#mrak1 {
  top: 20%;
  left: 10%;
  width: 300px;
  height: 200px;
}

#mrak2 {
  top: 0%;
  right: 10%;
  width: 300px;
  height: 200px;
}

#mrak3 {
  top: 40%;
  right: 30%;
  width: 100px;
  height: 100px;
}

#mrak4 {
  top: 10%;
  left: 40%;
  width: 100px;
  height: 100px;
}



/* KonecHry div */
.defeatGame {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ffffffee;
  border: 3px solid #007ca6;
  border-radius: 20px;
  padding: 2rem 3rem;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  z-index: 999;
}

.defeatGame h1 {
  color: #c0392b;
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

/* Komentář ke hře */
.komentar {
  display: none;
  position: absolute;
  top: 20px;
  left: 10%;

  width: 500px;
  height: 40px;
  line-height: 25px;
  text-align: center;

  background: rgba(0, 0, 0, 0.2);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: bold;
  font-family: monospace;
  z-index: 100;
}

/* Restart button */
#restart {
  padding: 1rem 2rem;
  font-size: 1.2rem;
  font-weight: bold;
  background: linear-gradient(135deg, #ff5f6d, #ffc371);
  border: 2px solid #e67e22;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(230, 126, 34, 0.4);
  transition: all 0.3s ease;
}

#restart:hover {
  background: linear-gradient(135deg, #ff9966, #ff5e62);
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(230, 126, 34, 0.6);
}

#scoreOdstavec {
  color: black;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  text-align: center;
}

@media (max-width: 1024px), (pointer: coarse) {
  #vysvetleni {
    overflow-y: auto;
  }
  #start {
    display: none;
  }
}
