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

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

#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: url("pictures/hero_dark_rings_nomesh_2560x1440.png") center/cover no-repeat;
  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);
}

#projects {
  padding: 5rem 2rem 2rem;
  background-color: #181818;
}

#projects h1 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  color: #fff;
}

.project-tile {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.inner-projects {
  background: #2c2c2c;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.3s ease;
}

.inner-projects:hover {
  transform: scale(1.03);
}

.inner-empty {
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  transition: none;
}

.inner-empty:hover {
  transform: none;
}

#projects h1:nth-of-type(2) {
  margin-top: 30px;
}

.project-pictures {
  width: 100%;
  height: auto;
  border-radius: 4px;

}

#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); 
}

.h2Flex {
  text-align: center;
  
  color: #fff;
  margin-bottom: 1rem;
}



#info {
  background-color: #2c2c2c;
  color: #f0f0f0;
  padding: 4rem 2rem;
  text-align: center;
}

#info h1 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #fff;
}

#info p {
  max-width: 700px;
  margin: 1rem auto;
  line-height: 1.8;
  font-size: 1.1rem;
}

.socials {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.socials a {
  color: #fff;
  transition: color 0.3s ease;
}

.socials a:hover {
  color: #ffd166;
}

.project-media {
  position: relative;
  width: 100%;
  height: auto;
}

.project-media img,
.project-media video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.project-video {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.project-media:hover .project-video {
  opacity: 1;
}

.project-media:hover img {
  opacity: 0;
}

#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: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;
  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;
}

/*nobé*/
html { scroll-behavior: smooth; }


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

@media (max-width: 768px) {
  #navbar {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    position: static;
  }

  #navbar a {
    font-size: 1.1rem;
  }

  #welcome-section h1 {
    font-size: 2.2rem;
  }

  #welcome-section h2 {
    font-size: 1.2rem;
  }

  #projects {
    padding: 3rem 1rem;
  }

  .project-tile {
    grid-template-columns: 1fr;
  }

  #info p {
    font-size: 1rem;
    padding: 0 1rem;
  }

  .socials {
    flex-direction: column;
    gap: 1rem;
  }

  .socials a i {
    font-size: 1.8rem;
  }
}

/* === HERO: pouze text + tlačítko === */
#textHlavniStranky{
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  padding: 0 1rem;
}

#textHlavniStranky h1{
  color:#fff;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: .02em;
  font-size: clamp(2rem, 5.2vw, 3.4rem);
  text-shadow:
    0 6px 24px rgba(0,0,0,.65),
    0 2px  1px rgba(0,0,0,.55);
  margin-bottom: .25rem;
}

#textHlavniStranky h2{
  color:#e5e7eb;
  font-weight: 400;
  line-height: 1.35;
  font-size: clamp(1.05rem, 2.1vw, 1.6rem);
  text-shadow: 0 4px 16px rgba(0,0,0,.55);
}

#start{
  margin-top: 1.75rem;
  padding: 1rem 2rem;
  font-size: 1.2rem;
  font-weight: 700;
  border-radius: 10px;
  background: linear-gradient(135deg, #00b4db, #0083b0);
  border: 2px solid #007ca6;
  color:#fff;
  cursor:pointer;
  box-shadow: 0 10px 28px rgba(0,140,200,.35);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

#start:hover{
  transform: translateY(-1px) scale(1.03);
  background: linear-gradient(135deg, #56ccf2, #2f80ed);
  box-shadow: 0 14px 34px rgba(0,140,200,.45);
}

#start:focus-visible{
  outline: 3px solid #56ccf2;
  outline-offset: 3px;
}

#start{
  margin-top: 1.75rem;
  padding: 1rem 2rem;
  font-size: 1.2rem;
  font-weight: 700;
  border-radius: 10px;

  background: linear-gradient(135deg, #8b5cf6, #4f46e5);
  border: 2px solid #4338ca;
  color:#fff;
  cursor:pointer;

  box-shadow: 0 10px 28px rgba(99,102,241,.38);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

#start:hover{
  transform: translateY(-1px) scale(1.03);
  background: linear-gradient(135deg, #a78bfa, #6366f1);
  box-shadow: 0 14px 34px rgba(99,102,241,.5);
}

#start:focus-visible{
  outline: 3px solid #a78bfa;
  outline-offset: 3px;
}


