/* Základní reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Tělo stránky */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-image: url('images/background.jpg'); /* přizpůsob si název */
  background-size: cover;
  background-position: center;
  height: 100vh;
  color: #fff;
}

/* Wrapper, který udrží vše ve výšce viewportu */
.page-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 100vh;
  padding: 20px;
  text-align: center;
}

/* Logo */
.logo {
  max-width: 250px;
  margin-top: 10px;
}

/* Nadpis */
h1 {
  font-size: 2rem;
  margin-top: 10px;
  color: #333;
  background: rgba(255, 255, 255, 0.6);
  padding: 10px 20px;
  border-radius: 12px;
}

/* Popis pod nadpisem */
.description {
  font-size: 1rem;
  margin-top: 5px;
  color: #444;
  background: rgba(255, 255, 255, 0.4);
  padding: 6px 12px;
  border-radius: 10px;
}

/* Herní karty */
.cards-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.card {
  width: 280px;
  height: 170px;
  background-size: cover;
  background-position: center;
  border-radius: 20px;
  position: relative;
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Průhledná vrstva na kartě */
.card-overlay {
  background-color: rgba(0, 0, 0, 0.5);
  width: 100%;
  height: 100%;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  color: white;
}

/* Název státu */
.country-name {
  font-size: 1.5rem;
  font-weight: bold;
  text-shadow: 0 0 5px black;
}

/* Populace */
.population {
  font-size: 1.2rem;
  color: gold;
  text-shadow: 0 0 4px black;
  margin-top: 5px;
}

/* "VS" text mezi kartami */
#vs {
  font-size: 1.5rem;
  margin: 10px 0;
  font-weight: bold;
  color: white;
  text-shadow: 0 0 5px black;
}

/* Tlačítka */
.buttons {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

button {
  padding: 10px 20px;
  font-size: 1rem;
  background-color: teal;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s ease;
}

button:hover {
  background-color: #0a7c7c;
}

/* Výsledek odpovědi */
#result {
  font-weight: bold;
  color: gold;
  margin-top: 10px;
  text-shadow: 0 0 3px black;
}

/* Skóre */
.score {
  font-size: 1rem;
  color: white;
  margin-bottom: 5px;
  text-shadow: 0 0 2px black;
}

/* Responzivita pro menší zařízení */
@media screen and (max-width: 768px) {
  .card {
    width: 90vw;
    height: 150px;
  }

  .cards-container {
    flex-direction: column;
    align-items: center;
  }

  .buttons {
    flex-direction: column;
    width: 80%;
  }

  button {
    width: 100%;
  }

  .logo {
    max-width: 120px;
  }
}
.instruction {
    color: #f0f0f0;
    font-size: 16px;
    margin: 10px 0 20px;
    opacity: 0.8;
    text-align: center;
}
/* Základní styl pro všechna tlačítka */
.btn {
  padding: 12px 24px;
  margin: 10px;
  font-size: 1em;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: white;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* Zelené tlačítko - Higher */
.btn.higher {
  background-color: #2ecc71;
}
.btn.higher:hover {
  background-color: #27ae60;
  transform: scale(1.05);
}

/* Červené tlačítko - Lower */
.btn.lower {
  background-color: #e74c3c;
}
.btn.lower:hover {
  background-color: #c0392b;
  transform: scale(1.05);
}
/* Wrapper, který zabere celý viewport */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Obal hlavního obsahu */
.page-wrapper {
  flex: 1;
}

/* Footer */
.site-footer {
  background-color: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  font-size: 0.9em;
  padding: 12px 0;
  text-align: center;
}

/* Odkazy ve footeru */
.site-footer a {
  color: #ffd700;
  text-decoration: none;
  margin-left: 5px;
}

.site-footer a:hover {
  text-decoration: underline;
}
.language-switcher {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
  z-index: 1000;
}

.language-switcher img {
  width: 30px;
  height: 20px; /* pevná výška pro všechny vlajky */
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.2s;
  border-radius: 3px;
}

.language-switcher img:hover {
  transform: scale(1.1);
}
@media screen and (max-width: 768px) {
  body {
    padding: 10px;
    font-size: 14px;
    overflow-x: hidden;
  }

  h1 {
    font-size: 1.2em;
    text-align: center;
    white-space: normal; /* Dovolí zalomení na menší obrazovce */
  }

  .description {
    font-size: 0.95em;
    max-width: 95%;
    margin: 10px auto;
    line-height: 1.4;
    white-space: normal;
  }

  .cards-container {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .card {
    flex: 1 1 45%;
    height: 130px;
    max-width: 45%;
  }

  .instruction {
  font-size: 0.85em;
  padding: 0 10px;
  text-align: center;
  white-space: normal;   /* Dovolí zalomení textu */
  word-wrap: break-word; /* Zalomí delší slova */
  max-width: 100%;       /* Zabrání přetékání */
  box-sizing: border-box;
  }

  .buttons {
    flex-direction: row;
    justify-content: center;
    width: 100%;
    gap: 10px;
    margin-top: 15px;
  }

  .buttons button {
    flex: 1 1 45%;
    padding: 10px;
    font-size: 0.95em;
  }
}
