/* --- Alap stílusok --- */
body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f0f2f5;
  color: #222;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  box-sizing: border-box;
}

/* --- Felső menü (header) --- */
header {
  background-color: #005f99;
  color: white;
  padding: 15px 15px 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
}

header .logo {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 1px;
}

/* Menü stílus és korlátozott szélesség */
nav {
  max-width: 250px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  overflow: hidden;
  white-space: nowrap;
  box-sizing: border-box;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100px;
  display: inline-block;
  vertical-align: middle;
  transition: color 0.3s ease;
}

nav a:hover,
nav a.active {
  color: #3399ff;
}

/* --- Fő tartalom (main) --- */
main {
  flex: 1;
  padding: 80px 20px 30px;
  max-width: 700px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* Címsor */
h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  color: #005f99;
  text-align: center;
}

/* Leírás */
p.description {
  font-size: 1.1rem;
  color: #444;
  margin-bottom: 30px;
  line-height: 1.5;
  white-space: pre-line;
  text-align: center;
}

/* Input mező */
input[type="text"] {
  width: 100%;
  max-width: 400px;
  padding: 14px 20px;
  font-size: 1.2rem;
  border: 2px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
  outline: none;
  margin: 0 auto 15px auto;
  display: block;
}

input[type="text"]:focus {
  border-color: #3399ff;
  box-shadow: 0 0 8px rgba(51, 153, 255, 0.5);
}

/* --- „Ezt írtad be” és Mentés gomb konténer --- */
#inputResultContainer {
  display: flex;
  justify-content: center; /* vízszintesen középre */
  align-items: center;     /* függőlegesen középre */
  gap: 10px;               /* távolság a szöveg és gomb között */
  margin-top: 20px;
}

/* Eredmény szöveg */
#result {
  font-size: 1.1rem;
  color: #333;
  min-height: 1.5em;
  white-space: nowrap;
}

/* --- Gombok általános stílusa --- */
button {
  margin-top: 15px;
  padding: 10px 24px;
  font-size: 1.1rem;
  background-color: #005f99;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: inline-block;
  vertical-align: middle;
  min-width: 140px;
}

button:hover {
  background-color: #3399ff;
}

button:disabled {
  background-color: #a0a0a0;
  cursor: not-allowed;
}

/* --- Mentés gomb külön stílusa (kevésbé kiemelt) --- */
#saveButton {
  background-color: #e0e5eb; /* Világosabb háttér */
  color: #333;               /* Sötétebb betűszín */
  border: 1px solid #ccc;    /* Vékony szegély */
  margin-top: 0;             /* A konténer miatt nincs külön margó */
  min-width: 100px;
  padding: 8px 20px;
}

#saveButton:hover {
  background-color: #c0c5cb;
}

/* Mentés gomb alapból rejtve */
#saveButton {
  display: none;
}

/* --- Üzenetek --- */
#message,
#missingVowelFilter {
  margin-top: 20px;
  font-size: 1.1rem;
  color: #333;
  min-height: 1.5em;
  text-align: center;
}

/* --- Javaslatok és elmentett szavak listája --- */
#suggestionList,
#savedWords {
  margin-top: 20px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

h3 {
  margin-bottom: 10px;
}

/* Listák */
ul {
  list-style: none;
  padding-left: 0;
}

li {
  background: white;
  margin-bottom: 8px;
  padding: 10px 15px;
  border-radius: 8px;
  border: 1px solid #ccc;
  cursor: pointer;
  transition: background-color 0.25s ease;
}

li:hover {
  background-color: #e6f0ff;
  border-color: #3399ff;
  color: #005f99;
}

/* Kattintható elemek */
.clickable {
  cursor: pointer;
  color: #005f99;
  text-decoration: underline;
}

/* Szűrőgombok */
.filter-button {
  display: inline-block;
  margin: 5px 8px 5px 0;
  padding: 6px 14px;
  border: 2px solid #005f99;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  color: #005f99;
  user-select: none;
  transition: all 0.3s ease;
}

.filter-button.active {
  background-color: #005f99;
  color: white;
}

/* --- Lábléc (footer) --- */
footer {
  background-color: #005f99;
  color: white;
  text-align: center;
  padding: 15px 20px;
  font-size: 0.9rem;
  margin-top: auto;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
}

/* --- Reszponzív kisebb képernyőkre --- */
@media (max-width: 600px) {
  h1 {
    font-size: 2.2rem;
  }
  input[type="text"] {
    max-width: 100%;
  }
  #suggestionList,
  #savedWords {
    max-width: 100%;
    padding: 0 10px;
  }
  nav a {
    font-size: 0.85rem;
    max-width: 80px;
  }
}
