* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  color: #333;
  padding: 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

h1 {
  color: #007acc;
  font-size: 2.5em;
  margin-bottom: 30px;
}

.exercise-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.item {
  background: white;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  text-align: center;
}

.item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}

.fill-in-text {
  font-size: 1.3em;
  font-weight: bold;
  color: #007acc;
}

.fill-in-text input {
  width: 30px;
  height: 30px;
  margin: 0 2px;
  text-align: center;
  font-size: 1.1em;
  border: 2px solid #ccc;
  border-radius: 5px;
  font-family: ;
}

.fill-in-text input:focus {
  outline: none;
  border-color: #007acc;
  background-color: #f0f8ff;
}

#check-btn {
  background-color: #007acc;
  color: white;
  border: none;
  padding: 12px 30px;
  font-family: Abril Fatface;
  font-size: 1.2em;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#check-btn:hover {
  background-color: #005a9c;
}

#result {
  margin-top: 20px;
  font-size: 1.2em;
  font-weight: bold;
  min-height: 20px;
}

.fill-in-text input.word-input {
  width: 120px;
  height: 36px;
  margin-left: 8px;
  padding: 0 8px;
  text-align: center;
  font-size: 1.1em;
  border: 2px solid #ccc;
  border-radius: 5px;
  font-family: inherit;
}

.fill-in-text input.word-input:focus {
  outline: none;
  border-color: #007acc;
  background-color: #f0f8ff;
}

.letter-group {
  display: inline-flex;
  gap: 6px;
  margin-left: 10px;
}

.letter-input {
  width: 32px;
  height: 32px;
  text-align: center;
  font-size: 1.1em;
  border: 2px solid #ccc;
  border-radius: 6px;
  font-family: monospace;
}

.letter-input:focus {
  outline: none;
  border-color: #007acc;
  background-color: #f0f8ff;
}

.letter-input.correct {
  border-color: green;
  background-color: #e8f5e8;
}

.letter-input.incorrect {
  border-color: red;
  background-color: #ffe8e8;
}

.word-container {
  display: inline-block;
  max-width: 200px; /* korlátozzuk a szélességet */
  overflow-x: auto; /* csak vízszintes görgetés */
  overflow-y: hidden;
  white-space: nowrap;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 5px 8px;
  background-color: #f9f9f9;
  margin-left: 10px;

  /* Lágy görgetés (ha támogatott) */
  scroll-behavior: smooth;

  /* Csúszka stílusa (opcionális, modern böngészők) */
  scrollbar-width: thin;
  scrollbar-color: #007acc #f0f0f0;
}

/* Webkit alapú böngészők (Chrome, Edge, Safari) */
.word-container::-webkit-scrollbar {
  height: 6px;
}

.word-container::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 3px;
}

.word-container::-webkit-scrollbar-thumb {
  background: #007acc;
  border-radius: 3px;
}

.letter-group {
  display: inline-flex;
  gap: 6px;
  white-space: nowrap;
}

.letter-input {
  width: 32px;
  height: 32px;
  text-align: center;
  font-size: 1.1em;
  border: 2px solid #ccc;
  border-radius: 6px;
  font-family: monospace;
}

.letter-input:focus {
  outline: none;
  border-color: #007acc;
  background-color: #f0f8ff;
}

.letter-input.correct {
  border-color: green;
  background-color: #e8f5e8;
}

.letter-input.incorrect {
  border-color: red;
  background-color: #ffe8e8;
}