* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f3f3;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding-top: 80px; /* Add padding to prevent content from being hidden by the fixed navbar */
}

.container {
  width: min(95vw, 600px);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  justify-content: center;
}

.toolbar input[type="text"] {
  flex: 1 1 220px;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #ccc;
  font-size: 0.95rem;
  outline: none;
}

.toolbar input[type="text"]:focus {
  border-color: #222;
}

.flashcard {
  background: #ffffff;
  border-radius: 18px;
  padding: 40px 50px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: background-color 0.3s ease;
}

.word {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  min-height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

button {
  cursor: pointer;
  border-radius: 999px;
  border: none;
  padding: 0.6rem 1.4rem;
  font-size: 1rem;
  font-weight: 500;
  background: #222;
  color: white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.2s, background-color 0.2s;
  white-space: nowrap;
}

button.secondary {
  background: #666;
}

button.secondary.active {
  background: #007bff;
}

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

button:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

button:not(:disabled):active {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.solution {
  display: none;
  margin-top: 1.5rem;
  font-size: 1.2rem;
}

.solution-line {
  margin: 0.3rem 0;
}

.article {
  font-weight: 700;
  text-transform: lowercase;
}

.plural {
  font-weight: 700;
  text-transform: lowercase;
}

.translation {
  font-style: italic;
}

.counter {
  margin-top: 1rem;
  font-size: 0.9rem;
  opacity: 0.7;
  min-height: 1.1rem;
}

.status {
  text-align: center;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  opacity: 0.7;
}

/* --- Global styles for multi-page layout --- */
.page-container {
  background: #ffffff;
  border-radius: 18px;
  padding: 40px 50px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  margin-top: 1rem;
  text-align: left;
}

.page-container h1 {
  margin-top: 0;
}

/* Media query para dispositivos con un ancho máximo de 600px */
@media (max-width: 350px) {
  .page-container {
    padding: 10px 25px;
  }
}

.data-file-list ul {
  list-style: none;
  padding-left: 0;
}

.data-file-list li {
  background: #f9f9f9;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  font-family: monospace;
}