/* Reset a základní styly */
* {
  box-sizing: border-box;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #f8fafc;
  min-height: 100vh;
  line-height: 1.6;
}

footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  color: #f8fafc;
}

footer a {
  color: #3b82f6;
  text-decoration: none;
}

/* Kontejner pro obsah */
body > div {
  max-width: 400px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
}

/* Nadpisy */
h1 {
  text-align: center;
  color: #f1f5f9;
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 2rem 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Formulářové prvky */
input,
select {
  display: block;
  width: 100%;
  margin: 1rem 0;
  padding: 1rem;
  font-size: 16px; /* Prevent zoom on iOS */
  border: 2px solid #334155;
  border-radius: 12px;
  background-color: #1e293b;
  color: #f8fafc;
  transition: all 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

input:focus,
select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background-color: #0f172a;
}

input::placeholder {
  color: #64748b;
}

/* Pomocný text pro pravidla */
.help-text {
  display: block;
  margin: 0.5rem 0 1rem 0;
  font-size: 0.9rem;
  color: #94a3b8;
  font-style: italic;
}

/* Chybová zpráva */
.error-message {
  display: block;
  margin: 0.5rem 0 1rem 0;
  font-size: 0.9rem;
  color: #ef4444;
  font-weight: 600;
  background: rgba(239, 68, 68, 0.1);
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid #ef4444;
}

/* Select šipka */
select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5rem;
  padding-right: 2.5rem;
}

/* Tlačítka */
button {
  display: block;
  width: 100%;
  margin: 1rem 0;
  padding: 1rem 1.5rem;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;

  /* Primární tlačítka */
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.39);
}

button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(59, 130, 246, 0.5);
}

button:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px 0 rgba(59, 130, 246, 0.4);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Tlačítka v kvízu - větší a s lepším spacingem */
div[x-show="$store.game.screen === 'game'"] button {
  margin: 0.75rem 0;
  padding: 1.25rem 1.5rem;
  font-size: 16px;
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
  box-shadow: 0 4px 14px 0 rgba(71, 85, 105, 0.3);
}

div[x-show="$store.game.screen === 'game'"] button:hover:not(:disabled) {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 6px 20px 0 rgba(59, 130, 246, 0.4);
}

/* Seznamy */
ul {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

li {
  background: rgba(30, 41, 59, 0.8);
  margin: 0.75rem 0;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  border: 1px solid #334155;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

li:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: #3b82f6;
}

/* Informační texty */
p {
  margin: 1rem 0;
  color: #cbd5e1;
  font-weight: 500;
}

p span {
  color: #f1f5f9;
  font-weight: 600;
}

/* Kód hry - speciální styl */
div[x-show="$store.game.screen === 'lobby'"] p:first-of-type span {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 1.1rem;
  letter-spacing: 2px;
  text-shadow: none;
}

/* Výsledky odpovědi */
.answer-result {
  margin: 1.5rem 0;
  padding: 1.25rem;
  border-radius: 12px;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.2);
  animation: slideIn 0.3s ease-out;
}

.answer-result.correct {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: 1px solid #047857;
}

.answer-result.wrong {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: 1px solid #b91c1c;
}

/* Animace pro výsledky */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Timer - speciální styl */
div[x-show="$store.game.screen === 'game'"] p:last-of-type {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  background: rgba(30, 41, 59, 0.8);
  padding: 1rem;
  border-radius: 12px;
  border: 2px solid #334155;
  margin: 1.5rem 0;
}

div[x-show="$store.game.screen === 'game'"] p:last-of-type span {
  color: #3b82f6;
  font-size: 1.4rem;
}

/* Responzivní úpravy pro větší obrazovky */
@media (min-width: 600px) {
  body > div {
    max-width: 500px;
    padding: 2rem;
  }

  h1 {
    font-size: 2.2rem;
  }

  button {
    padding: 1.25rem 2rem;
  }
}

/* Optimalizace pro starší prohlížeče */
@supports not (backdrop-filter: blur(10px)) {
  li {
    background: #1e293b;
    backdrop-filter: none;
  }
}

/* Touch optimalizace */
@media (hover: none) {
  button:hover {
    transform: none;
  }

  button:active {
    transform: scale(0.98);
  }

  li:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: #334155;
  }
}

/* Burger Menu */
.burger-menu {
  /*  position: fixed;
  top: 20px;
  left: 20px;*/
  z-index: 1000;
}

.burger-btn {
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
  color: white;
  border: none;
  padding: 0%;
  border: none;
  /* border-radius: 50%; */
  /* width: 50px; */
  /* height: 50px; */
  /* font-size: 200%; */
  cursor: pointer;
  box-shadow: 0 4px 14px 0 rgba(71, 85, 105, 0.3);
  transition: all 0.2s ease;
}

.burger-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px 0 rgba(71, 85, 105, 0.5);
}

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
}

.menu-content {
  background: #1e293b;
  padding: 2rem;
  /* border-radius: 12px; */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 300px;
  width: 90%;
  text-align: center;
}

.menu-content h3 {
  margin-top: 0;
  color: #f8fafc;
}

.menu-item {
  margin: 1rem 0;
}

.menu-item label {
  display: block;
  margin-bottom: 0.5rem;
  color: #cbd5e1;
  font-weight: 600;
}

.menu-item select {
  width: 100%;
}

.menu-button {
  display: block;
  width: 100%;
  margin: 0.5rem 0;
  padding: 0.75rem;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  /* border-radius: 8px; */
  cursor: pointer;
  transition: all 0.2s ease;
}

.menu-button:hover {
  transform: translateY(-2px);
  /* box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.5); */
}
