/* ======================================================
   📱 Liběchov – QR hra (mobilní verze)
   Kompletní a optimalizovaný style.css (bez scrollování)
   ====================================================== */

/* =======================================
   🧩 Globální reset a základní nastavení
   ======================================= */
* {
  box-sizing: border-box;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

html, body {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: 'Poppins', 'Uncial Antiqua', serif;
  color: #2a1a08;
  background-color: #f5e9c8;
  touch-action: none;
}

@supports (height: 100dvh) {
  html, body {
    height: 100dvh;
  }
}

body {
  position: relative;
  background: transparent !important;
  z-index: 1;
  opacity: 0;
  animation: fadeInPage 1.2s ease forwards;
  animation-delay: 0.4s;
}

/* 🌄 Pozadí */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url('../images/background_mobile.png') center top / cover no-repeat;
  z-index: 0;
}

/* ✨ Animace a efekty */
@keyframes fadeInPage {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOut {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.98); }
}
.fade-in { animation: fadeIn 0.8s ease forwards; }
.fade-out { animation: fadeOut 0.8s ease forwards; }
.hidden { display: none !important; }

/* ======================================================
   🌍 Horní lišta (jazyk + uživatel)
   ====================================================== */
.top-bar {
  position: fixed;
  top: 0.6rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0.6rem;
  z-index: 100;
}

/* 🇨🇿 Přepínač jazyků */
.language-switch {
  display: flex;
  gap: 0.3rem;
  background: rgba(250, 240, 210, 0.85);
  border: 2px solid #b79555;
  border-radius: 10px;
  padding: 0.3rem 0.4rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.language-switch .fi {
  width: 24px;
  height: 18px;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background-size: cover;
  background-position: center;
  margin: 0 4px;
}
.language-switch .fi:hover {
  transform: scale(1.15);
  box-shadow: 0 0 6px rgba(0,0,0,0.4);
}
.language-switch .fi-cz { background-image: url('/images/flags/cz.svg'); }
.language-switch .fi-gb { background-image: url('/images/flags/gb.svg'); }
.language-switch .fi-de { background-image: url('/images/flags/de.svg'); }

/* 👤 Uživatel */
.user-info {
  background: rgba(250, 240, 210, 0.85);
  border: 2px solid #b79555;
  border-radius: 10px;
  padding: 0.3rem 0.6rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  font-weight: 600;
  color: #3c220a;
  cursor: pointer;
  transition: background 0.3s;
}
.user-info:hover {
  background: rgba(250, 240, 210, 0.95);
}
#connection-status {
  margin-left: 6px;
  display: inline-block;
  transition: transform 0.3s ease;
}
#connection-status:hover {
  transform: scale(1.2);
}

/* 🔽 Dropdown menu uživatele */
.user-menu {
  position: absolute;
  right: 0;
  top: 120%;
  background: rgba(250, 240, 210, 0.95);
  border: 2px solid #b79555;
  border-radius: 10px;
  padding: 0.5rem 0.8rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.25);
  z-index: 200;
}
.user-menu button {
  background: none;
  border: none;
  color: #3c220a;
  font-weight: 600;
  cursor: pointer;
  padding: 0.3rem 0;
}
.user-menu button:hover {
  color: #8b5a1e;
  text-decoration: underline;
}

/* ======================================================
   🔄 Aktualizační sekce (načítání dat)
   ====================================================== */
#update-section {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  color: #f7e3a1;
  text-align: center;
  font-family: 'Uncial Antiqua', 'Poppins', serif;
  z-index: 9999;
  transition: opacity 0.6s ease;
}
#update-section.hidden { display: none; }

.update-content h2 {
  font-size: 1.7rem;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 12px rgba(247, 227, 161, 0.4);
}
.update-content p {
  font-size: 1.1rem;
  color: #e8d7a6;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* 🌀 Spinner */
.loading-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.loading-spinner {
  width: 90px;
  height: 90px;
  border: 5px solid rgba(255,255,255,0.15);
  border-top: 5px solid #f7e3a1;
  border-radius: 50%;
  animation: slowSpin 3.5s linear infinite;
  box-shadow: 0 0 15px rgba(247, 227, 161, 0.3);
}
.loading-spinner.finish-glow {
  border-top-color: #ffd66b !important;
  box-shadow: 0 0 25px rgba(255, 214, 107, 0.9) !important;
  transform: scale(1.2);
  transition: all 0.8s ease;
}
@keyframes slowSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.progress-text {
  position: absolute;
  font-size: 1.3rem;
  font-weight: bold;
  color: #f7e3a1;
  text-shadow: 0 0 8px rgba(0,0,0,0.7);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(1.1); }
}

/* ======================================================
   🎮 MENU SEKCE – hlavní nabídka
   ====================================================== */
#menu-section {
  position: relative;
  z-index: 5;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  background: transparent;
  padding-top: 10vh;
  animation: fadeIn 1s ease forwards;
}

.menu-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

/* Logo + titulek */
.menu-header {
  position: relative;
  width: 90%;
  max-width: 420px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.menu-logo {
  width: 100%;
  height: auto;
  object-fit: contain;
}
.menu-title {
  position: absolute;
  top: 43%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Uncial Antiqua', cursive;
  font-size: clamp(1.4rem, 5vw, 2rem);
  color: #f7e3a1;
  text-shadow: 3px 3px 6px rgba(0,0,0,0.8), -1px -1px 2px rgba(0,0,0,0.5);
  width: 80%;
  line-height: 1.2;
}

/* Blok tlačítek v menu */
.menu-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 90%;
  max-width: 300px;
}

/* Vzhled všech hlavních tlačítek */
.primary-btn {
  background: linear-gradient(180deg, #b16b27 0%, #7a4217 60%, #703714 100%);
  color: #f9e6b5;
  border: 3px solid #3e290d;
  font-family: 'Uncial Antiqua', cursive;
  font-size: 1.1rem;
  border-radius: 14px;
  padding: 0.9rem 1.8rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4), inset 0 -3px 6px rgba(0,0,0,0.3);
  transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.3s;
  width: 100%;
}
.primary-btn:hover {
  background: linear-gradient(180deg, #c47a2f 0%, #a45d21 70%, #7d4113 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.5);
}
.primary-btn:active {
  transform: scale(0.98);
  background: linear-gradient(180deg, #b67925 0%, #8b4f1a 100%);
}
.primary-btn.active {
  background: linear-gradient(180deg, #dca64a 0%, #b67925 70%, #8b4f1a 100%);
  box-shadow: 0 0 15px rgba(255,210,120,0.8);
  transform: scale(1.05);
}

/* ======================================================
   🌄 HERO SEKCE – Přihlášení / Registrace
   ====================================================== */
#hero-section {
  position: relative;
  z-index: 5;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(2px);
  padding-top: 8vh;
  padding-inline: 1rem;
  overflow: hidden;
  animation: fadeIn 1s ease forwards;
}

/* Logo + titulek */
.hero-header {
  position: relative;
  max-width: 420px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.hero-logo {
  width: 100%;
  height: auto;
  object-fit: contain;
}
.hero-title {
  position: absolute;
  top: 43%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Uncial Antiqua', cursive;
  font-size: clamp(1.4rem, 5vw, 2rem);
  color: #f7e3a1;
  text-shadow: 3px 3px 6px rgba(0,0,0,0.8), -1px -1px 2px rgba(0,0,0,0.5);
  text-align: center;
  width: 80%;
}

/* 🔘 Přepínač Login / Registrace */
.hero-auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  width: 90%;
  max-width: 300px;
  margin: 0 auto 1rem;
}

/* Formulář */
.hero-auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  padding: 1.4rem;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  width: 90%;
  max-width: 320px;
  margin: 1rem auto 0;
}
.hero-auth-form input {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  border: 2px solid #b79555;
  background: rgba(255, 255, 255, 0.9);
  text-align: center;
  width: 100%;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.hero-auth-form input:focus {
  outline: none;
  border-color: #8b5a1e;
  box-shadow: 0 0 6px rgba(139, 90, 30, 0.4);
}
.hero-auth-form .primary-btn {
  margin-top: 0.4rem;
}

/* Text pod formulářem */
.toggle-auth-text {
  color: #fff;
  font-size: 0.9rem;
  margin-top: 0.6rem;
}
.auth-link {
  color: #f7d17a;
  text-decoration: underline;
  cursor: pointer;
}
.auth-link:hover {
  color: #ffe9aa;
  text-shadow: 0 0 4px rgba(255,255,255,0.6);
}

/* Zprávy o stavu přihlášení */
.auth-message {
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  margin-top: 0.6rem;
  text-align: center;
  transition: opacity 0.3s ease;
}
.auth-message.error {
  color: #ff4d4d;
  text-shadow: 0 0 6px rgba(255,0,0,0.3);
}
.auth-message.success {
  color: #9efb87;
  text-shadow: 0 0 6px rgba(0,255,0,0.3);
}

/* ======================================================
   🗺️ Výběr dobrodružství
   ====================================================== */
#adventure-selection {
  width: 100vw;
  height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding-top: 7vh;
  padding-inline: 0.8rem;
  overflow: hidden;
}

.adventure-container {
  position: relative;
  width: 90%;
  max-width: 380px;
  height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Karta s obsahem */
.adventure-card {
  position: relative;
  background: rgba(255, 248, 230, 0.92);
  border: 3px solid #b79555;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
  padding: 0.8rem;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Obrázek + šipky */
.adventure-image-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 0.6rem;
}
.adventure-image-wrapper img {
  width: 50%;
  max-width: 250px;
  max-height: 35vh;
  object-fit: contain;
  border: 3px solid #b79555;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* Šipky */
.arrow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 2px solid transparent;
  color: #3c220a;
  font-size: 1.5rem;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.arrow-btn:hover {
  transform: translateY(-50%) scale(1.1);
}
#prev-adventure { left: calc(50% - 38% - 40px); }
#next-adventure { right: calc(50% - 38% - 40px); }

/* Tečky pod obrázkem */
.dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin: 0.4rem 0 0.6rem;
}
.dot {
  width: 7px;
  height: 7px;
  background: #d0b47c;
  border-radius: 50%;
  transition: all 0.3s ease;
}
.dot.active {
  background: #8b5a1e;
  transform: scale(1.25);
}

/* Textová část */
.adventure-text {
  flex: 1;
  overflow-y: auto;
  padding: 0 0.4rem 0.8rem;
  scrollbar-width: thin;
  scrollbar-color: #b79555 rgba(0,0,0,0.1);
}
.adventure-text::-webkit-scrollbar { width: 6px; }
.adventure-text::-webkit-scrollbar-thumb {
  background: #b79555;
  border-radius: 10px;
}

/* Obsah karty */
.adventure-card h3 {
  color: #3c220a;
  font-family: 'Uncial Antiqua', cursive;
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}
.adventure-card p {
  color: #4b3418;
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
  line-height: 1.3;
}

/* Doplňkové info */
.adventure-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 0.5rem;
}
#adventure-duration, #adventure-length {
  font-size: 0.9rem;
  color: #4b3418;
}
#adventure-difficulty {
  font-weight: 700;
  color: #3c220a;
  margin-bottom: 0.6rem;
}
#adventure-status {
  font-weight: 700;
  color: #5b320a;
  margin-bottom: 0.6rem;
}
#adventure-description {
  margin: 0.4rem 0 0.3rem;
  color: #4b3418;
}

/* Tlačítka dole */
.adventure-buttons {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.adventure-buttons .primary-btn {
  width: 100%;
  border: none;
  border-radius: 0;
  font-size: 1.05rem;
  padding: 1rem 0;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.25);
}
#adventure-selection #select-adventure {
  border-top: 2px solid #3e290d;
}
#adventure-selection #back-to-menu-from-adventure {
  border-top: 2px solid #3e290d;
  border-radius: 0 0 12px 12px;
}

/* ======================================================
   ⚙️ Sekce Nastavení – sjednocený design s Minihrami
   ====================================================== */
#settings-section {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  text-align: center;
  animation: fadeIn 0.4s ease;
}

.settings-container {
  background: rgba(0, 0, 0, 0.30); 
  border: 1px solid #b79555;
  border-radius: 16px;
  padding: 2rem 3rem;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 0 20px rgba(183, 149, 85, 0.3);
  color: #f7e3a1;
  font-family: 'Poppins', sans-serif;
}


.settings-container h2 {
  font-family: 'Uncial Antiqua', cursive;
  font-size: 2rem;
  color: #f7e3a1;
  text-shadow: 0 0 10px rgba(255, 255, 200, 0.3);
  margin-bottom: 2rem;
  letter-spacing: 1px;
}

.settings-options {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* Formulář pro změnu hesla */
.change-password-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
  margin-top: 0.8rem;
}

.change-password-form input {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  border: 2px solid #b79555;
  background: rgba(255, 255, 255, 0.9);
  color: #3c220a;
  text-align: center;
  width: 100%;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.change-password-form input:focus {
  outline: none;
  border-color: #8b5a1e;
  box-shadow: 0 0 6px rgba(139,90,30,0.4);
}

/* Tlačítko zpět */
#back-to-menu-from-settings {
  margin-top: 1.5rem;
  width: 100%;
}


/* ======================================================
   🧑‍🤝‍🧑 Overlay pro výběr přítele
   ====================================================== */

#invite-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);         /* 🔥 stejné jako prší overlay */
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

#invite-overlay.hidden {
  display: none !important;
}

#invite-overlay .overlay-content {
  background: rgba(0, 0, 0, 0.30);        /* 🔥 stejné jako .prsi-container */
  border: 1px solid #b79555;
  border-radius: 16px;
  padding: 2rem 2rem;
  width: 90%;
  max-width: 420px;

  box-shadow: 0 0 20px rgba(183, 149, 85, 0.3);
  color: #f7e3a1;
  font-family: 'Poppins', sans-serif;

  animation: fadeInUp 0.4s ease;          /* 🔥 stejná animace */
  text-align: center;
}

#invite-overlay h3 {
  font-family: 'Uncial Antiqua', cursive;
  font-size: 1.6rem;                      /* 🔥 stejné jako prsi-container h2 */
  margin-bottom: 1rem;
  color: #f7e3a1;
}

#invite-friends-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 1.4rem 0;
}

/* položky */
.invite-item {
  background: rgba(255, 255, 255, 0.10);   /* sjednoceno s friends designem */
  border: 1px solid #b79555;
  border-radius: 10px;
  padding: 0.6rem 0.8rem;

  display: flex;
  justify-content: space-between;
  align-items: center;

  color: #f7e3a1;
  font-size: 1rem;

  box-shadow: inset 0 0 4px rgba(0,0,0,0.2);
  transition: transform 0.15s ease, box-shadow 0.25s ease;
}

.invite-item:hover {
  transform: scale(1.02);
  box-shadow: 0 0 12px rgba(183,149,85,0.4);
}

.invite-item button {
  background: #9a531d;
  border: none;
  color: #fff;
  border-radius: 10px;
  padding: 0.3rem 0.8rem;
  cursor: pointer;

  font-family: 'Poppins', sans-serif;
  font-weight: 600;

  transition: background 0.2s, transform 0.2s ease;
}

.invite-item button:hover {
  background: #c47a2f;
  transform: scale(1.08);
}

/* zavřít */
#close-invite-overlay.primary-btn {
  margin-top: 1rem;
  width: 100%;
}



/* ======================================================
   🎮 Overlays – výzvy k Prší (sjednoceno do stejného stylu)
   ====================================================== */

#waiting-overlay,
#incoming-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);   /* stejné jako invite + prsi */
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1200;
}

.popup-inner {
  background: rgba(0, 0, 0, 0.30);   /* stejná karta jako prsi-container */
  border: 1px solid #b79555;
  border-radius: 16px;
  padding: 2rem;
  width: 90%;
  max-width: 420px;

  box-shadow: 0 0 20px rgba(183, 149, 85, 0.3);
  color: #f7e3a1;
  font-family: 'Poppins', sans-serif;

  text-align: center;
  animation: fadeInUp 0.4s ease;
}

.popup-inner h3 {
  font-family: 'Uncial Antiqua', cursive;
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: #f7e3a1;
}

.popup-inner p {
  font-size: 1rem;
  margin-bottom: 1.4rem;
  color: #f7e3a1;
}

.popup-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1rem;
}

.popup-buttons .primary-btn {
  width: 100%;
}

/* ======================================================
   🎮 Overlay návratu do hry – sjednocený styl
   ====================================================== */

#return-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1200;
}

#return-overlay.hidden {
  display: none !important;
}

#return-overlay .overlay-content {
  background: rgba(0, 0, 0, 0.30);   /* sjednoceno */
  border: 1px solid #b79555;
  border-radius: 16px;
  padding: 2rem;
  width: 90%;
  max-width: 420px;

  text-align: center;
  color: #f7e3a1;
  font-family: 'Poppins', sans-serif;

  box-shadow: 0 0 20px rgba(183, 149, 85, 0.3);
  animation: fadeInUp 0.4s ease;
}

#return-overlay .overlay-content h3 {
  font-family: 'Uncial Antiqua', cursive;
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: #f7e3a1;
}

#return-overlay .overlay-content p {
  color: #f7e3a1;
  font-size: 1rem;
  margin-bottom: 1.3rem;
}

.overlay-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.overlay-buttons .primary-btn {
  width: 100%;
}


/* ======================================================
👥 Sekce Přátelé 
====================================================== */

#friends-section {
  position: relative;
  z-index: 5;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: rgba(0, 0, 0, 0.40);
  padding: 0;
  animation: fadeIn 0.8s ease forwards;
}

.friends-container {
  background: rgba(0, 0, 0, 0.30);
  border: 1px solid #b79555;
  border-radius: 16px;
  padding: 0;
  width: 90%;
  max-width: 420px;

  display: flex;
  flex-direction: column;

  height: 80dvh;
  max-height: 80dvh;
  overflow: hidden;

  box-shadow: 0 0 20px rgba(183, 149, 85, 0.3);
  color: #f7e3a1;
  font-family: 'Poppins', sans-serif;

  animation: fadeInUp 0.4s ease;
}

/* celý obsah, co má scrollovat */
.friends-scroll-wrapper {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem 3rem 1rem 3rem;
}

/* uvnitř wrapperu */
.friends-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* sekce uvnitř */
.friends-scroll-area {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Nadpisy */
.friends-container h2 {
  font-family: 'Uncial Antiqua', cursive;
  font-size: 1.8rem;
  color: #f7e3a1;
  text-shadow: 0 0 10px rgba(255, 255, 200, 0.3);
  margin: 0;
}

.friends-container h3 {
  font-family: 'Uncial Antiqua', cursive;
  font-size: 1.2rem;
  color: #f7e3a1;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  border-bottom: 2px solid rgba(183,149,85,0.4);
  padding-bottom: 0.3rem;
}

/* Seznamy */
.friends-list,
.requests-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#no-friends,
#no-requests {
  text-align: center;
  font-size: 0.95rem;
  color: #e4d19a;
  opacity: 0.8;
  font-style: italic;
}

/* Položky */
.friend-item,
.friend-request {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid #b79555;
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  color: #f7e3a1;
  font-size: 1rem;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.2);
  transition: transform 0.15s ease, box-shadow 0.3s ease;
}

.friend-item:hover,
.friend-request:hover {
  transform: scale(1.02);
  box-shadow: 0 0 12px rgba(183,149,85,0.4);
}

/* text ve jménu */
.friend-item span,
.friend-request span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Křížky, fajfky – původní design */
.remove-friend,
.friend-request button {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.3s ease;
}

.remove-friend {
  color: #ff6b6b;
}
.remove-friend:hover {
  transform: scale(1.2);
  color: #ff3b3b;
}

.friend-request .accept-friend {
  color: #80ff8a;
}
.friend-request .reject-friend {
  color: #ff6b6b;
}

.friend-request .accept-friend:hover {
  transform: scale(1.2);
  color: #5aff66;
}
.friend-request .reject-friend:hover {
  transform: scale(1.2);
  color: #ff3b3b;
}

/* Input */
.friend-input {
  padding: 0.8rem 1rem;
  font-size: 1rem;
  border: 2px solid #b79555;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: #3c220a;
  text-align: center;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.friend-input:focus {
  border-color: #8b5a1e;
  box-shadow: 0 0 6px rgba(139,90,30,0.3);
}

/* Stavová zpráva */
.friend-status-msg {
  text-align: center;
  font-size: 0.95rem;
  margin-top: -0.3rem;
  margin-bottom: 0.3rem;
  color: #80ff8a;
  transition: opacity 0.3s ease;
}

/* Tlačítko dole – vždy viditelné */
#back-to-menu-from-friends {
  width: 100%;
  border-radius: 0 0 16px 16px;
  padding: 1rem 0;

  position: sticky;
  bottom: 0;
  z-index: 50;
}


/* ======================================================
   🎮 Sekce Minihry
   ====================================================== */

#minigames-section {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  text-align: center;
  animation: fadeIn 0.4s ease;
}

.miniggames-container,
.minigames-container {
  background: rgba(0, 0, 0, 0.30);  /* sjednoceno s Nastavením */
  border: 1px solid #b79555;
  border-radius: 16px;
  padding: 2rem 3rem;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 0 20px rgba(183, 149, 85, 0.3);
  color: #f7e3a1;
  font-family: 'Poppins', sans-serif;
}

.minigames-container h2 {
  font-size: 2rem;
  font-family: 'Uncial Antiqua', cursive;
  color: #f7e3a1;
  text-shadow: 0 0 10px rgba(255, 255, 200, 0.3);
  margin-bottom: 2rem;
  letter-spacing: 1px;
}

.minigames-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}




/* ==============================
🎮 Prší sekce – stejný styl jako Nastavení
============================== */

#prsi-section {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  animation: fadeIn 0.6s ease forwards;
}

.prsi-container {
  background: rgba(0, 0, 0, 0.30);   /* 🔥 stejné jako nastavení */
  border: 1px solid #b79555;
  border-radius: 16px;
  padding: 2rem 3rem;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 0 20px rgba(183, 149, 85, 0.3);

  color: #f7e3a1;
  font-family: 'Poppins', sans-serif;

  animation: fadeInUp 0.4s ease;
}

.prsi-container h2 {
  font-family: 'Uncial Antiqua', cursive;
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: #f7e3a1;
}

.prsi-container p {
  color: #f7e3a1;
  margin-bottom: 1rem;
}

.prsi-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1rem;
}


/* ==============================
🎮 Had sekce 
============================== */

#snake-section {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  animation: fadeIn 0.6s ease forwards;
}

.snake-container {
  background: rgba(0, 0, 0, 0.30);
  border: 1px solid #b79555;
  border-radius: 16px;
  padding: 2rem 3rem 6rem; /* místo dole pro fixní tlačítka */
  max-width: 420px;
  width: 90%;
  box-shadow: 0 0 20px rgba(183, 149, 85, 0.3);

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;

  color: #f7e3a1;
  font-family: 'Poppins', sans-serif;

  animation: fadeInUp 0.4s ease;
}

.snake-container h2 {
  font-family: 'Uncial Antiqua', cursive;
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

.snake-container p {
  margin-bottom: 1rem;
}

.snake-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
}

/* ==============================
🐍 Map1 / Map2 sekce
============================== */

#snake-map1-section,
#snake-map2-section {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.6s ease forwards;
}

.snake-map-container {
  background: rgba(0, 0, 0, 0.30);
  border: 1px solid #b79555;
  border-radius: 16px;
  padding: 2rem 3rem 6rem; /* prostor dole na tlačítka */
  max-width: 420px;
  width: 90%;
  height: 80vh;
  box-shadow: 0 0 20px rgba(183,149,85,0.3);

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;

  position: relative; /* 🔥 rodič pro absolutní tlačítka */

  color: #f7e3a1;
  font-family: 'Poppins', sans-serif;

  animation: fadeInUp 0.4s ease;
}

.snake-map-container h2 {
  font-family: 'Uncial Antiqua', cursive;
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

/* Leaderboard box – max 5 hráčů a scroll */
.snake-leaderboard {
  max-height: 140px; /* ~5 lidí */
  overflow-y: auto;
  width: 100%;
  margin: 1rem 0;

    background: rgba(0, 0, 0, 0.12);
  border: 1px solid #b79555;
  border-radius: 10px;
  padding: 0.6rem;
  box-shadow: inset 0 0 6px rgba(0,0,0,0.3);

  display: flex;
  flex-direction: column;
  gap: 0.4rem;

  scrollbar-width: thin;
  scrollbar-color: #b79555 rgba(0,0,0,0.2);
}

.snake-leaderboard::-webkit-scrollbar {
  width: 6px;
}

.snake-leaderboard::-webkit-scrollbar-thumb {
  background: #b79555;
  border-radius: 10px;
}

.snake-lb-item {
    background: rgba(0, 0, 0, 0.12);
  border: 1px solid #b79555;
  border-radius: 8px;
  padding: 0.4rem 0.6rem;

  font-size: 0.95rem;
  color: #f7e3a1;
  display: flex;
  justify-content: space-between;
  align-items: center;

  box-shadow: inset 0 0 4px rgba(0,0,0,0.2);
}

/* FIXNÍ TLAČÍTKA UVNITŘ CONTAINERU */

#snake-start-map1,
#snake-start-map2,
#snake-map1-back,
#snake-map2-back {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  border-radius: 0;
  padding: 1.1rem 0;
  font-size: 1.1rem;
}

#snake-start-map1,
#snake-start-map2 {
  bottom: 3.4rem; /* nad tlačítkem Zpět */
  border-bottom: 2px solid #3e290d;
}

#snake-map1-back,
#snake-map2-back {
  bottom: 0;
  border-radius: 0 0 16px 16px;
}

.snake-myinfo {
  margin-top: 0.5rem;
  padding: 0.5rem 0.8rem;
  width: 100%;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid #b79555;
  border-radius: 10px;
  color: #f7e3a1;
  font-size: 0.95rem;
  text-align: left;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.25);
}