/* ===== Smidak.sk – unified design ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Open Sans", sans-serif;
  background: #040404;
  background: linear-gradient(180deg, #0a0a0a 0%, #111827 100%);
  color: #fff;
  min-height: 100vh;
}

/* Back banner – same as other portfolio apps */
.portfolio-back-banner {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: #111827;
  border-bottom: 1px solid rgba(91, 124, 153, 0.35);
  padding: 6px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.portfolio-back-banner-inner {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
}

.portfolio-back-banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: rgba(91, 124, 153, 0.2);
  border: 1px solid rgba(91, 124, 153, 0.5);
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.portfolio-back-banner-btn:hover {
  background: rgba(91, 124, 153, 0.35);
  border-color: #5b7c99;
  color: #fff;
  text-decoration: none;
}

.portfolio-back-banner-icon {
  font-size: 15px;
  line-height: 1;
}

.portfolio-back-banner-home {
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  white-space: nowrap;
}

.portfolio-back-banner-home:hover {
  color: #fff;
  text-decoration: none;
}

/* Rules overlay – prvá obrazovka, banner hore ako pri iných appkach */
.geoguess-rules-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(4, 4, 4, 0.92);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  overflow-y: auto;
}
.geoguess-rules-overlay[aria-hidden="true"] {
  display: none;
}
.geoguess-rules-overlay .portfolio-back-banner { flex-shrink: 0; }
.geoguess-rules-overlay-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.geoguess-rules-box {
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid rgba(91, 124, 153, 0.35);
  border-radius: 16px;
  padding: 28px 32px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}
.geoguess-rules-title {
  font-family: "Poppins", sans-serif;
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 16px;
  text-align: center;
}
.geoguess-rules-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 24px;
}
.geoguess-rules-text p { margin-bottom: 12px; }
.geoguess-rules-text ul {
  margin: 10px 0 10px 20px;
  padding-left: 8px;
}
.geoguess-rules-text li { margin-bottom: 6px; }
.geoguess-rules-ok-btn {
  display: block;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  font-family: "Poppins", sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  padding: 14px 24px;
  background: linear-gradient(135deg, #111827, #000);
  border: 1px solid #5b7c99;
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.geoguess-rules-ok-btn:hover,
.geoguess-rules-ok-btn:focus {
  background: rgba(91, 124, 153, 0.4);
  border-color: #5b7c99;
  color: #fff;
}

/* Skrytá hra kým užívateľ nepotvrdí pravidlá */
.geoguess-game-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.geoguess-game-visible {
  opacity: 1;
  pointer-events: auto;
}

.geoguess-rules-link {
  display: inline-block;
  margin: 0 auto 12px;
  padding: 4px 12px;
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  background: transparent;
  border: 1px solid rgba(91, 124, 153, 0.4);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.geoguess-rules-link:hover {
  background: rgba(91, 124, 153, 0.2);
  border-color: #5b7c99;
}

/* Container */
#gameContainer {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

#gameHeader {
  text-align: center;
  margin-bottom: 24px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 14px 20px 0;
}

#gameHeader h1 {
  font-family: "Poppins", sans-serif;
  font-size: 2rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.diffLabel {
  font-family: "Poppins", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 8px;
}

#difficultyContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10px;
}

.difficultyRadioGroup {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.difficultyRadioGroup input[type="radio"] {
  display: none;
}

.difficultyRadioGroup label {
  font-family: "Poppins", sans-serif;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid rgba(91, 124, 153, 0.4);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.difficultyRadioGroup label:hover {
  background: rgba(91, 124, 153, 0.2);
  border-color: #5b7c99;
}

.difficultyRadioGroup input[type="radio"]:checked + label {
  background: #5b7c99;
  border-color: #5b7c99;
  color: #fff;
}

/* Mode: Whole world / Selected continents */
#modeContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 14px;
}
.modeRadioGroup {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.modeRadioGroup input[type="radio"] { display: none; }
.modeRadioGroup label {
  font-family: "Poppins", sans-serif;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid rgba(91, 124, 153, 0.4);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.modeRadioGroup label:hover {
  background: rgba(91, 124, 153, 0.2);
  border-color: #5b7c99;
}
.modeRadioGroup input[type="radio"]:checked + label {
  background: #5b7c99;
  border-color: #5b7c99;
  color: #fff;
}
.continent-filters {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.continent-filters[aria-hidden="true"] { display: none; }
.continent-filters .diffLabel { margin-bottom: 8px; }
.continentRadioGroup {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.continentRadioGroup input[type="radio"] { display: none; }
.continentRadioGroup label {
  font-family: "Poppins", sans-serif;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(91, 124, 153, 0.4);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.continentRadioGroup label:hover {
  background: rgba(91, 124, 153, 0.2);
  border-color: #5b7c99;
}
.continentRadioGroup input[type="radio"]:checked + label {
  background: #5b7c99;
  border-color: #5b7c99;
  color: #fff;
}

/* Main card – glass / dark ako smidak.sk */
#gameCard {
  background: rgba(17, 24, 39, 0.85);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(91, 124, 153, 0.2);
  padding: 20px;
  margin: 14px auto 20px;
  max-width: 800px;
}

/* Country card */
#countryCard {
  display: none;
  text-align: center;
  margin-bottom: 20px;
  opacity: 1;
  transition: opacity 0.5s ease;
}

#countryCard img {
  width: 80px;
  height: auto;
  border-radius: 8px;
  margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#countryCard h2 {
  font-family: "Poppins", sans-serif;
  font-size: 1.5rem;
  color: #fff;
}

/* Progress bars – smidak farby */
#roundProgress,
#timeProgress {
  width: 100%;
  height: 10px;
  margin-bottom: 12px;
  appearance: none;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

#roundProgress::-webkit-progress-bar,
#timeProgress::-webkit-progress-bar {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

#roundProgress::-webkit-progress-value {
  background: #5b7c99;
  border-radius: 10px;
}

#timeProgress::-webkit-progress-value {
  background: rgba(255, 152, 0, 0.9);
  border-radius: 10px;
}

#roundProgress::-moz-progress-bar { background: #5b7c99; border-radius: 10px; }
#timeProgress::-moz-progress-bar { background: rgba(255, 152, 0, 0.9); border-radius: 10px; }

/* Continent buttons – kompaktné, viac miesta pre mapu */
#continentButtons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}

.continentBtn {
  font-family: "Poppins", sans-serif;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(91, 124, 153, 0.4);
  border-radius: 6px;
  margin: 0;
  padding: 5px 10px;
  font-size: 0.78rem;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.continentBtn:hover,
.continentBtn:focus {
  background: rgba(91, 124, 153, 0.25);
  border-color: #5b7c99;
  color: #fff;
}

.continentBtn:active {
  transform: scale(0.98);
}

.continentBtn.wrong {
  background: rgba(244, 67, 54, 0.5);
  border-color: #f44336;
  color: #fff;
}

.continentBtn.correct {
  background: rgba(76, 175, 80, 0.5);
  border-color: #4caf50;
  color: #fff;
}

/* Power-ups */
#powerUps {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

#powerUps button {
  font-family: "Poppins", sans-serif;
  background: rgba(91, 124, 153, 0.35);
  color: #fff;
  border: 1px solid #5b7c99;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}

#powerUps button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#powerUps button:not(:disabled):hover {
  background: rgba(91, 124, 153, 0.5);
}

#hintBtn:not(:disabled) { border-color: #009688; background: rgba(0, 150, 136, 0.3); }
#skipBtn { border-color: rgba(255,255,255,0.3); }

/* Map */
#map {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  max-width: 800px;
  height: 65vh;
  margin: 8px auto;
  border: 1px solid rgba(91, 124, 153, 0.3);
  border-radius: 12px;
  overflow: hidden;
}

/* Leaflet controls – tmavý štýl v súlade so smidak.sk */
#map .leaflet-control-zoom a,
#map .leaflet-control-attribution {
  background: rgba(17, 24, 39, 0.95) !important;
  color: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(91, 124, 153, 0.4) !important;
}
#map .leaflet-control-zoom a:hover {
  background: rgba(91, 124, 153, 0.5) !important;
  color: #fff !important;
}
#map .leaflet-control-attribution a { color: #5b7c99 !important; }

/* Feedback & score */
#feedback {
  font-family: "Poppins", sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  text-align: center;
  margin: 12px 0 14px 0;
  color: rgba(255, 255, 255, 0.9);
}

#scoreBoard {
  font-family: "Poppins", sans-serif;
  font-size: 1.2rem;
  text-align: center;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.9);
}

#totalScore.score-up {
  animation: scoreUp .6s ease;
  color: #4caf50;
}

#totalScore.score-down {
  animation: scoreDown .6s ease;
  color: #f44336;
}

/* Start / Share – ako CTA na smidak.sk, mierne odsadené zhora */
#buttonsContainer {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

#buttonsContainer button {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg, #111827, #000);
  color: #fff;
  border: 1px solid rgba(91, 124, 153, 0.5);
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.1s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#buttonsContainer button:hover:not(:disabled),
#buttonsContainer button:focus {
  border-color: #5b7c99;
  background: linear-gradient(135deg, #1a2332, #0d0d0d);
  color: #fff;
}

#buttonsContainer button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Save score container */
#saveScoreContainer {
  display: none;
  text-align: center;
  margin-top: 24px;
  background: rgba(17, 24, 39, 0.9);
  border: 1px solid rgba(91, 124, 153, 0.25);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  padding: 24px;
  max-width: 400px;
  margin: 24px auto;
}

#playerNameInput {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 0 auto 14px auto;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(91, 124, 153, 0.5);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
  box-sizing: border-box;
}

#playerNameInput::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

#playerNameInput:focus {
  outline: none;
  border-color: #5b7c99;
}

#saveScoreBtn {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg, #111827, #000);
  border: 1px solid #5b7c99;
  color: #fff;
  padding: 12px 24px;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

#saveScoreBtn:hover,
#saveScoreBtn:focus {
  background: rgba(91, 124, 153, 0.4);
  border-color: #5b7c99;
  color: #fff;
}

#saveScoreContainer h3 {
  font-family: "Poppins", sans-serif;
  margin-top: 20px;
  font-size: 1.25rem;
  color: #fff;
}

#leaderboardList {
  list-style: none;
  padding: 0;
  margin: 12px auto 0;
  max-width: 300px;
  text-align: left;
}

#leaderboardList li {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(91, 124, 153, 0.2);
  margin: 6px 0;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
}

/* Animations */
@keyframes bounce {
  0% { transform: translateY(0); }
  30% { transform: translateY(-15px); }
  50% { transform: translateY(0); }
  70% { transform: translateY(-7px); }
  100% { transform: translateY(0); }
}

.bounce { animation: bounce 0.5s; }

@keyframes ripple {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(2.5); opacity: 0; }
}

.ripple { animation: ripple 0.8s ease-out; }

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.pulse { animation: pulse 1s ease-out; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn .4s ease; }

@keyframes scoreUp {
  0% { transform: scale(1); }
  35% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

@keyframes scoreDown {
  0% { transform: scale(1); }
  35% { transform: scale(0.85); }
  100% { transform: scale(1); }
}

/* Mobile – pravidlá a hra */
@media (max-width: 600px) {
  .geoguess-rules-box { padding: 20px 18px; }
  .geoguess-rules-title { font-size: 1.25rem; }
  .geoguess-rules-text { font-size: 0.9rem; }
  .geoguess-rules-ok-btn { max-width: 100%; }
  .continentRadioGroup { gap: 6px; }
  .continentRadioGroup label { padding: 8px 12px; font-size: 0.85rem; }
  #map { height: 58vh; }
  #gameHeader h1 { font-size: 1.5rem; }
  .continentBtn { padding: 4px 8px; font-size: 0.72rem; }
  #gameCard { padding: 16px; }
  #buttonsContainer { margin-top: 16px; }
}

/* Cursor (optional) */
@media (min-width: 800px) {
  #map, .leaflet-container, .leaflet-pane, .leaflet-marker-icon, .leaflet-interactive {
    cursor: url('flag-cursor.png') 0 32, auto !important;
  }
}
