body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f9f9f9;
}

header {
  display: flex;
  flex-direction: row;
  background-color:#4caf50;
  color: white;
  text-align: center;
  padding: 1rem;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #ddd;
}

.header h1 {
  font-size: 24px;
  margin: 0;
}

#help-button {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background-color: #007bff; /* Kék háttér */
  color: white;
  font-size: 16px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s;
}

#help-button:hover {
  background-color: #0056b3; /* Sötétebb kék hover */
}

main {
  margin: 1rem;
}

#sentence {
  font-size: 1.5rem;
  margin-bottom: 1rem;

}

#word-panel {
  text-align: center;
  line-height: 3; /* Megnövelt sorköz */
}

#word-counter {
  text-align: center;
  margin-top: 10px;
  margin-bottom: 20px;
  font-size: 1em;
  color: #555;
}

#button-panel {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

#word-panel span {
  font-size: 1.5rem;
  margin: 0 5px;
  cursor: pointer;
  padding: 3px 5px;
  display: inline-block;
  height: 50px;
}

/* OPTIONS PANEL FORMÁZÁS */
#options-panel {
  display: block !important;
  visibility: hidden; /* Láthatatlan induláskor, de a helye megvan */
  opacity: 0;
  transition: visibility 0.2s, opacity 0.2s ease-in-out;
  position: absolute !important;
  background: white !important;
  border: 1px solid black !important;
  padding: 10px !important;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1) !important;
  min-width: 200px !important;
  max-height: 440px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important; /* Vízszintes görgetés TILOS */
  z-index: 9999 !important;
}


/* 
#options-panel.hidden {
  display: none !important;
}
 */


#options-panel button {
  display: block;
  width: 100%;
  margin-bottom: 5px;
}


/* Alapgomb-stílus */
button {
  padding: 10px 20px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 5px;
  text-transform: none;
  color: white;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
  border: 1px solid #000000; /* Sötétebb sárga körvonal */
}


.hidden {
  display: none !important;
}

#original_sentence{
  text-align: center;
  font-size: 26px;
}

.word.active {
  background-color:yellow;
}

.word[data-label] {
  position: relative;
  display: inline-block;
  margin-right: 5px;

}

.word[data-label]::before {
  content: attr(data-label);
  display: flex;
  justify-content: center;  /* Vízszintesen középre igazítás */
  align-items: center;  /* Függőlegesen középre igazítás */
  position: relative;
  text-align: center;
  height: 30px;
  min-width: 100px;
  width: 100%;
  padding: 2px;
  font-size: 14px;
  white-space: nowrap;
  font-family: cursive;
  top: 20px;
  border: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  margin: 5px;
  color: white;
}



.word.correct::after {
  content: "✔";
  color: lime;
  font-size: 14px;
  margin-left: 5px; /* Kis távolság a címke után */
  vertical-align: middle;
}

.word.incorrect::after {
  content: "✘";
  color: red;
  font-size: 14px;
  margin-left: 5px; /* Kis távolság a címke után */
  vertical-align: middle;
}

.word .underline {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
}


#sentence .word {
  color: gray;
  cursor: not-allowed;
  line-height: 1.7;
}

/* Szófaji kategóriák */

/* 1. Alany - Kék */
#sentence .word-label.alanyclass {
  background-color: #007E8C;
  color: white;
}

button.alanyclass
{
  background-color: #007E8C;
}

button.alanyclass:hover {
  background-color: #006571;
}

/* 2. Tárgy - Narancs */
#sentence .word-label.tárgyclass {
  background-color: #E67E22;
  color: white;
}

button.tárgyclass {
  background-color: #E67E22;
}

button.tárgyclass:hover {
  background-color: #CF6D1C;
}


/* 3. Határozó - Piros */
#sentence .word-label.határozóclass {
  background-color: #C0392B;
  color: white;
}

button.határozóclass {
  background-color: #C0392B;
}

button.határozóclass:hover {
  background-color: #A33125;
}



/* 4. Állítmány - Lila */
#sentence .word-label.állítmányclass {
  background-color: #8E44AD;
  color: white;
}

button.állítmányclass {
  background-color: #8E44AD;
}

button.állítmányclass:hover {
  background-color: #7A3795;
}

.word.állítmányclass::before {
  background-color: #8E44AD;
  color: white;
}

/* 5. Jelző - Sötétzöld */
#sentence .word-label.jelzőclass {
  background-color: #27AE60;
  color: white;
}

button.jelzőclass {
  background-color: #27AE60;
}

button.jelzőclass:hover {
  background-color: #219150;
}


/* Címke formázás */
.word-label {
  display: inline-block;
  padding: 5px 10px;
  margin-left: 10px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  min-width: 80px;
  height: 20px;
  font-size: 16px;
  color: white;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
  border: 1px solid #000000; /* Sötétebb körvonal */
  cursor: not-allowed;
}

.inactive {
  color: gray; /* Szürke színnel jelöljük a nem elemezhető szavakat */
  pointer-events: none; /* Nem lehet rájuk kattintani */
  cursor: default; /* Nincs kattintási ikon */
  opacity: 0.5; /* Halványabb megjelenítés */
}

.word {
  color: black; /* Elemzésre alkalmas szavak színe */
  cursor: pointer; /* Kattintási ikon */
}

.word-container {
  height: 40px;
  padding: 5px 10px;
  font-size: 16px;
  
  display: flex;           /* Flexbox használata */
  align-items: center;      /* Függőleges középre igazítás */
}

.back-button, #check-button, #new-sentence-button {
  background-color: #3498db; /* Kék háttér */
  color: white;
  padding: 8px 12px;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
  border: 1px solid #000000; /* Sötétebb körvonal */
}

.back-button:hover, #check-button:hover, #new-sentence-button {
  background-color: #2980b9; /* Sötétebb kék hover */
}

.helyhatározó, 
.időhatározó, 
.módhatározó,
.állapothatározó,
.célhatározó,
.okhatározó,
.eszközhatározó,
.társhatározó,
.részeshatározó,
.fok-mértékhatározó,
.állandó_határozó {
  text-decoration-line: underline;
  text-decoration-style: wavy;
  text-underline-offset: 12px;
  text-decoration-thickness: 3px;
  text-decoration-color: #A33125;
}

.alany {
  border-bottom: 4px solid #007E8C;
}

.állítmány {
  border-bottom: 8px double #c24191;
}

.tárgy {
  position: relative;
}

.tárgy::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-image: repeating-linear-gradient(
    to right,
    #C54F06 0px,
    #C54F06 10px,
    transparent 10px,
    transparent 20px
  );
}

.minőségjelző, .mennyiségjelző, .birtokos_jelző {
  border-bottom: 4px dotted #27AE60;
}