/* Alap stílusok */
:root {
  --highlight-warm: #d5b08b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
  padding: 0;
  margin: 0;
}

/* Fejléc */
header {
  background: linear-gradient(90deg, #3498db, #2c3e50);
  color: white;
  text-align: center;
  padding: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

/* Fő tartalom */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.main-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.page {
  display: none;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 18px;
  padding: 2rem 1.75rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  opacity: 0;
}

.page.active {
  display: block;
  animation: fadeIn 0.35s ease forwards;
}

.main-content > .page + .page {
  margin-top: 1.5rem;
}

.topic-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.topic-header-row h2 {
  margin: 0;
  color: #2c3e50;
}

.topics-grid {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.main-content {
  flex: 1 1 auto;
  max-width: 820px;
    align-items: flex-start;
  background: #f9fbfc;
}

.navigation-panel {
  margin-top: 2rem;
  display: flex;
  justify-content: flex-start;
}

.analytics-error {
  color: #e74c3c;
  font-weight: 500;
}

.topic-card {
  background: white;
  border-radius: 10px;
  padding: 1.2rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.topic-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.topic-card--completed {
  background: #82e398;
  border: 2px solid #19af0b;
  box-shadow: 0 6px 16px rgba(25, 175, 11, 0.25);
}

.topic-card--completed:hover {
  box-shadow: 0 6px 20px rgba(25, 175, 11, 0.35);
}

.topic-card--completed .topic-name {
  color: #145a32;
}

.topic-card--completed .progress-info,
.topic-card--completed .progress-stats span {
  color: #155724;
}

.topic-card--completed .progress-fill {
  background: linear-gradient(90deg, #27ae60, #19af0b);
}

.topic-completed-note {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.9rem;
  font-size: 0.85rem;
  color: #0b5d1e;
  font-weight: 600;
}

.topic-completed-note i {
  color: #0b5d1e;
}

.topic-name {
  font-weight: bold;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

/* Előrehaladás sáv */
.progress-container {
  margin-top: 0.8rem;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.3rem;
  font-size: 0.85rem;
  color: #7f8c8d;
}

.progress-stats {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.8rem;
  font-weight: 500;
}

.progress-info span:last-child {
  margin-left: 1rem;
}

.stat-total {
  color: #2c3e50;
}

.stat-learned {
  color: #27ae60;
}

.stat-remaining {
  color: #3498db;
}

.progress-bar {
  height: 10px;
  background-color: #ecf0f1;
  border-radius: 5px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #e74c3c, #2ecc71);
  border-radius: 5px;
  transition: width 0.5s ease;
}

/* Kártya stílus */
.card-container {
  perspective: 1000px;
  margin: 1.5rem auto;
  max-width: 500px;
}

.card {
  position: relative;
  width: 100%;
  height: 300px;
  transform-style: preserve-3d;
  transition: transform 0.6s;
  cursor: pointer;
  touch-action: pan-y;
  color-scheme: light;
}

.card-index {
  position: absolute;
  right: 10px;
  bottom: 10px;
  font-family: Arial, sans-serif;
  font-size: 0.66rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.6);
  background: rgba(255, 255, 255, 0.65);
  border-radius: 6px;
  padding: 2px 6px;
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  transform: translateZ(1px);
  backface-visibility: hidden;
}

.card.flipped .card-index {
  transform: translateZ(1px) rotateY(180deg);
}

.card.flipped {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 15px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  background: #ffffff;
  transition: background-color 0.3s ease;
  color: #2f2a24;
}

.card-face.learned {
  background: #82e398;
  border: 2px solid #19af0b;
}

.card-back {
  transform: rotateY(180deg);
  overflow-y: auto;
}

.stanza-text {
  font-size: 1.3rem;
  text-align: center;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.translation {
  margin-bottom: 0.8rem;
  text-align: center;
}

.translation-title {
  font-weight: bold;
  color: #3498db;
  margin-bottom: 0.3rem;
}

@media (prefers-color-scheme: dark) {
  .card,
  .card-face {
    color-scheme: light;
    background-color: #fbf5eb !important;
    background-image: none !important;
  }

  .card-face,
  .card-face .stanza-text,
  .card-face .translation,
  .card-face .translation p {
    color: #2f2a24 !important;
    -webkit-text-fill-color: #2f2a24 !important;
  }

  .card-face .translation-title {
    color: #2a6ead !important;
  }
}

/* Vissza gomb */
.back-button {
  background: #7f8c8d;
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 5px;
  cursor: pointer;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.3s;
}

.back-button:hover {
  background: #95a5a6;
}

/* Vezérlő gombok */
.controls {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.control-button {
  padding: 0.8rem 1.2rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.play-button {
  background: #3498db;
  color: white;
}

.play-button:hover {
  background: #2980b9;
}

.slow-button {
  background: #9b59b6;
  color: white;
}

.slow-button:hover {
  background: #8e44ad;
}

.learned-button {
  background: #2ecc71;
  color: white;
}

.learned-button:hover {
  background: #27ae60;
}

.next-button {
  background: #e67e22;
  color: white;
}

.next-button:hover {
  background: #d35400;
}

.previous-button {
  background: #7f8c8d;
  color: white;
}

.previous-button:hover {
  background: #95a5a6;
}

.edit-button {
  background: #f39c12;
  color: white;
}

.edit-button:hover {
  background: #d35400;
}

.delete-button {
  background: #e74c3c;
  color: white;
}

.delete-button:hover {
  background: #c0392b;
}

/* Saját kártya létrehozása */
.create-card {
  background: white;
  border-radius: 10px;
  padding: 1.5rem;
  margin-top: 1.5rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: inherit;
}

.add-card-button {
  background: #2ecc71;
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

.add-card-button:hover {
  background: #27ae60;
}

/* Hangvizualizáció */
.visualization {
  display: none;
  position: absolute;
  top: 15px;
  right: 15px;
  width: 30px;
  height: 20px;
  align-items: flex-end;
  justify-content: space-between;
}

.bar {
  width: 4px;
  background-color: #3498db;
  border-radius: 2px;
}

.playing .visualization {
  display: flex;
}

/* Szerkesztés modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: clamp(24px, 6vh, 72px) 20px clamp(40px, 12vh, 112px);
  box-sizing: border-box;
  overflow-y: auto;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex: 0 0 auto;
}

.close-modal {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #7f8c8d;
}

.close-modal:hover {
  color: #34495e;
}

/* Média elemek */
textarea {
  resize: vertical;
}

/* Reszponzív design */
@media (min-width: 992px) {
  .main-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: 2.5rem;
  }

  .main-content {
    flex: 1 1 0;
    max-width: 820px;
  }

  .ad-container {
    flex: 0 0 320px;
    max-width: 320px;
  }

  .ad-box {
    position: sticky;
    top: 1.5rem;
  }
}

@media (max-width: 600px) {
  .page {
    padding: 1.5rem 1.25rem;
  }

  .topic-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .topics-grid {
    gap: 0.9rem;
  }

  .card {
    height: 250px;
  }

  .stanza-text {
    font-size: 1.1rem;
  }

  .controls {
    flex-direction: column;
  }

  .control-button {
    width: 100%;
    justify-content: center;
  }

  .progress-stats {
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.75rem;
  }

  .progress-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .show-learned-toggle {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    font-size: 0.85rem;
  }
}

/* Animációk */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Témakör fejléc */
.topic-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.topic-title-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.topic-title {
  font-size: 1.5rem;
  color: #2c3e50;
}

.card-info-button {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #2ecc71;
  color: #0b5ed7;
  font-weight: 700;
  font-size: 1.25rem;
  font-family: 'Georgia', 'Times New Roman', serif;
  font-style: italic;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-info-button.is-visible {
  display: inline-flex;
}

.card-info-button:hover,
.card-info-button:focus {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.card-info-button:focus {
  outline: 2px solid #0b5ed7;
  outline-offset: 2px;
}

.card-info-button span {
  display: inline-block;
  line-height: 1;
}

.show-learned-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: #2c3e50;
}

.show-learned-toggle input {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.show-learned-toggle label {
  cursor: pointer;
}

/* Kártya műveletek */
.card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  justify-content: center;
}

/* --- Új landing oldal és fejlécek stílusai --- */

.landing {
  background: linear-gradient(135deg, #eef2f3 0%, #8e9eab 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.auth-panel-open {
  overflow: hidden;
}

.landing-header {
  background: linear-gradient(90deg, #1d976c, #93f9b9);
  color: white;
  padding: 2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  text-align: left;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 2;
}

.landing-header .brand {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1 1 240px;
}

.landing-header .brand h1 {
  font-size: 2.2rem;
  margin: 0;
}

.landing-header .tagline {
  font-size: 1rem;
  opacity: 0.9;
}

.landing-auth-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.landing-auth-link {
  color: #145a32;
  font-weight: 700;
  font-family: 'Arial', 'Helvetica', sans-serif;
  font-size: 12px;
  text-decoration: none;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: #ffffff;
  padding: 0.25rem 0.65rem;
  border-radius: 8px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.landing-auth-link::after {
  display: none;
}

.landing-auth-link:hover,
.landing-auth-link:focus {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
}

.landing-auth-link:hover::after,
.landing-auth-link:focus::after {
  transform: none;
}

.landing-content {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  display: grid;
  gap: 2rem;
}

.info-footer {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto 3rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.developer-info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.95rem;
  color: var(--highlight-warm);
}

.developer-email {
  color: var(--highlight-warm);
  text-decoration: none;
}

.developer-email:hover,
.developer-email:focus {
  color: #c6935a;
}

.app-version {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: #7f8c8d;
}

.app-version--footer {
  width: 100%;
  text-align: center;
  margin: 0.75rem 0 1rem;
}

.info-links {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.info-link {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.95rem;
  color: #2c3e50;
  line-height: 1.6;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.faq-modal__body {
  max-height: clamp(320px, 70vh, 540px);
  padding-right: 0.75rem;
}

.faq-modal__content {
  max-width: 640px;
}

.info-modal__content {
  max-width: 420px;
  text-align: center;
}

.info-modal__body {
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 1.05rem;
}

.info-modal__body p {
  margin: 0;
}

.info-modal__emoji {
  font-size: 2.5rem;
}

.faq-item {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 0.85rem 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.faq-item strong {
  color: #1f2d3d;
}

.modal-body a {
  color: var(--highlight-warm);
}

.modal-body a:hover,
.modal-body a:focus {
  color: #c6935a;
}

.intro {
  background: rgba(255, 255, 255, 0.9);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.programs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.program-card {
  background: white;
  padding: 1.8rem;
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.program-card h3 {
  font-size: 1.4rem;
  color: #2c3e50;
}

.program-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  background: #2ecc71;
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s;
}

.program-link:hover {
  background: #27ae60;
}
.progress-percent {
  margin-left: 1rem;
}



.auth-panels {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.2s ease;
  z-index: 1000;
}

.auth-panels.is-active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.auth-panel {
  display: none;
  justify-content: center;
  width: 100%;
}

.auth-panel.is-active {
  display: flex;
}


.auth-card {
  background: white;
  border-radius: 16px;
  padding: 2.4rem 2rem 2.9rem;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  width: min(520px, 100%);
  max-height: min(680px, calc(100vh - 120px));
  overflow-y: auto;
}


.auth-panel__close {
  position: absolute;
  top: 0.8rem;
  right: 0.95rem;
  background: transparent;
  border: none;
  color: #7f8c8d;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.1rem;
}

.auth-panel__close:hover,
.auth-panel__close:focus {
  color: #c0392b;
}

@media (max-width: 640px) {
  .landing-header {
    justify-content: center;
    text-align: center;
  }

  .landing-header .brand {
    align-items: center;
  }

  .landing-auth-links {
    justify-content: center;
    margin-left: 0;
  }
}

.auth-card form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.auth-card input,
.auth-card textarea {
  border: 1px solid #dcdde1;
  border-radius: 8px;
  padding: 0.7rem;
}

.consent-field {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: #2c3e50;
}

.consent-field input[type="checkbox"] {
  margin-top: 0.25rem;
}

.consent-field label a {
  color: #1f618d;
  text-decoration: underline;
}

.consent-field label a:hover,
.consent-field label a:focus {
  color: #154360;
}

.form-note {
  font-size: 0.85rem;
  color: #7f8c8d;
}

.form-message {
  font-size: 0.9rem;
  min-height: 1.2rem;
}

.form-message.success {
  color: #27ae60;
}

.form-message.error {
  color: #c0392b;
}

.link-button {
  background: none;
  border: none;
  color: #2980b9;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  padding: 0;
  font-size: 0.9rem;
}

.link-button:hover {
  text-decoration: underline;
}

/* --- Alkalmazás fejléc és felhasználói panel --- */

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.5rem;
  background: linear-gradient(90deg, #3498db, #2c3e50);
  color: white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.app-header .brand h1 {
  margin-bottom: 0.2rem;
}

.app-header .tagline {
  font-size: 0.95rem;
  opacity: 0.85;
}

.app-menu {
  position: relative;
  display: flex;
  align-items: center;
}

.app-menu__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.2);
  color: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.app-menu__toggle:hover,
.app-menu__toggle:focus {
  background: rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.app-menu__toggle i {
  font-size: 0.85rem;
}

.app-menu__list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: #ffffff;
  color: #2c3e50;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
  padding: 0.6rem 0;
  list-style: none;
  display: none;
  z-index: 1500;
}

.app-menu__list.is-open {
  display: block;
}

.app-menu__link {
  display: block;
  padding: 0.6rem 1.1rem;
  text-decoration: none;
  color: inherit;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.app-menu__link:hover,
.app-menu__link:focus {
  background: rgba(52, 152, 219, 0.12);
  color: #1b4f72;
}

.user-panel {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.6rem 1rem;
  border-radius: 999px;
  flex-wrap: wrap;
}

.user-email {
  font-size: 0.95rem;
}

.user-stats {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: #d9f0ff;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-family: 'Arial', 'Helvetica', sans-serif;
  align-items: flex-start;
}

.user-stat {
  color: #1e8449;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.user-stat__value {
  font-weight: 700;
}

.user-metrics {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: rgba(255, 255, 255, 0.8);
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.2;
  color: #1b4f72;
  min-width: 160px;
  box-shadow: inset 0 0 0 1px rgba(198, 219, 239, 0.6);
}

.user-metric {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  white-space: nowrap;
}

.user-metric__value {
  font-weight: 700;
}

.user-metric__value.metric-tier-red {
  color: #c0392b;
}

.user-metric__value.metric-tier-blue {
  color: #1f4e79;
}

.user-metric__value.metric-tier-brown {
  color: #7d4b1f;
}

.user-metric__value.metric-tier-green {
  color: #1f7d3a;
}

.user-metric__value.metric-tier-gold {
  color: #b8860b;
}

.logout-button {
  background: #e74c3c;
  color: white;
}

.logout-button:hover {
  background: #c0392b;
}

.adfree-button {
  background: #5e8669;
  color: #ffffff;
}

.adfree-button:hover {
  background: #3a8014;
}

.account-delete-container {
  display: flex;
  justify-content: flex-end;
  margin: 50px 0 2.5rem;
}

.account-delete-link {
  color: #c0392b;
  font-size: 10px;
  font-family: 'Arial', 'Helvetica', sans-serif;
  text-decoration: none;
}

.account-delete-link:hover,
.account-delete-link:focus {
  text-decoration: underline;
}

.account-delete-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.account-delete-modal__content {
  background: #fff6f6;
  border-radius: 12px;
  padding: 2.2rem;
  max-width: 520px;
  width: 90%;
  box-shadow: 0 14px 36px rgba(192, 57, 43, 0.25);
  text-align: center;
  border: 2px solid #c0392b;
}

.account-delete-modal__content h2 {
  color: #c0392b;
  font-weight: 700;
  font-family: 'Arial', 'Helvetica', sans-serif;
  font-size: 12px;
  margin-bottom: 1rem;
}

.account-delete-modal__content p {
  color: #c0392b;
  font-family: 'Arial', 'Helvetica', sans-serif;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.account-delete-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.account-delete-modal__confirm {
  display: inline-block;
  padding: 0.85rem 1.2rem;
  border-radius: 8px;
  background: rgba(192, 57, 43, 0.12);
  color: #1f618d;
  font-weight: 700;
  font-family: 'Arial', 'Helvetica', sans-serif;
  font-size: 12px;
  text-decoration: none;
}

.account-delete-modal__confirm:hover,
.account-delete-modal__confirm:focus {
  background: rgba(192, 57, 43, 0.2);
}

.account-delete-modal__cancel {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  cursor: pointer;
  font-size: 0.85rem;
}

.account-delete-modal__cancel:hover,
.account-delete-modal__cancel:focus {
  background: rgba(0, 0, 0, 0.08);
}

body.account-delete-open {
  overflow: hidden;
}

.card-info-modal__body {
  max-height: 320px;
  overflow-y: auto;
  padding-right: 0.75rem;
  color: #2c3e50;
  line-height: 1.6;
  font-size: 0.95rem;
}

.card-info-modal__body p {
  margin: 0;
}

body.card-info-open {
  overflow: hidden;
}

.adfree-modal__body {
  max-height: 260px;
  overflow-y: auto;
  padding-right: 0.5rem;
  line-height: 1.6;
  font-size: 0.95rem;
  color: #2c3e50;
}

body.adfree-modal-open {
  overflow: hidden;
}

body.faq-modal-open {
  overflow: hidden;
}

body.info-modal-open {
  overflow: hidden;
}

/* --- Modal ablakok láthatósága --- */

.modal.show {
  display: flex;
}

/* --- Toast értesítés --- */

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 0.9rem 1.2rem;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
  pointer-events: none;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 600px) {
  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  .control-button {
    width: 100%;
    justify-content: center;
  }

  .toast {
    left: 50%;
    right: auto;
    bottom: 16px;
    width: calc(100% - 32px);
    max-width: 360px;
    transform: translate(-50%, 20px);
  }

  .toast.visible {
    transform: translate(-50%, 0);
  }
}

.toast[data-type="success"] {
  background: rgba(39, 174, 96, 0.95);
}

.toast[data-type="error"] {
  background: rgba(192, 57, 43, 0.95);
}

.toast[data-type="info"] {
  background: rgba(52, 152, 219, 0.95);
}

/* --- Reszponzív módosítások az új felülethez --- */

@media (max-width: 768px) {
  .landing-content {
    padding: 1.5rem 1rem 2.5rem;
  }

  .app-header {
    gap: 1.25rem;
  }

  .app-menu {
    width: 100%;
    justify-content: flex-start;
  }

  .app-menu__toggle {
    width: 100%;
    justify-content: center;
  }

  .app-menu__list {
    position: static;
    width: 100%;
    margin-top: 0.5rem;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
  }

  .info-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .app-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .user-panel {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .user-stats,
  .user-metrics {
    width: 100%;
  }

  .user-panel {
    align-self: stretch;
    justify-content: space-between;
  }
}

/* ============================================================
   Jelszó visszaállítás oldal (reset-password.php)
   ============================================================ */

.rp-page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  box-sizing: border-box;
}

.rp-card {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
  padding: 2.25rem 2rem 2rem;
  box-sizing: border-box;
}

@media (prefers-color-scheme: dark) {
  .rp-card {
    background: #1a1d27;
    box-shadow: 0 4px 28px rgba(0, 0, 0, 0.45);
  }
}

.rp-header {
  margin-bottom: 1.25rem;
}

.rp-header h1 {
  margin: 0 0 0.3rem 0;
  font-size: 1.45rem;
  line-height: 1.2;
}

.rp-header p {
  margin: 0;
  font-size: 0.92rem;
  opacity: 0.75;
}

.rp-card form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.rp-card label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  margin-top: 0.85rem;
}

.rp-card label:first-of-type {
  margin-top: 0;
}

.rp-card input[type="email"],
.rp-card input[type="password"],
.rp-card input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  padding: 0.7rem 0.9rem;
  border: 1px solid #dcdde1;
  border-radius: 8px;
  font-size: 1rem;
  background: #f7f8fc;
  transition: border-color 0.18s;
}

@media (prefers-color-scheme: dark) {
  .rp-card input[type="email"],
  .rp-card input[type="password"],
  .rp-card input[type="text"] {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
    color: #e8e8e8;
  }
}

.rp-card input:focus {
  outline: none;
  border-color: #3498db;
}

/* Password field wrapper a szem ikonhoz */
.rp-password-field {
  position: relative;
}

.rp-password-field > input {
  padding-right: 2.85rem;
}

.rp-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.6rem;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #7f8c8d;
  cursor: pointer;
  line-height: 1;
  z-index: 2;
  touch-action: none;
}

.rp-password-toggle svg {
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.rp-password-toggle:focus-visible {
  outline: 2px solid #3498db;
  outline-offset: 2px;
}

.rp-card .form-note {
  margin-top: 0.75rem;
}

.rp-card .control-button {
  width: 100%;
  justify-content: center;
  margin-top: 1.1rem;
}

.rp-card .form-message {
  margin-top: 0.6rem;
}

.rp-divider {
  border: none;
  border-top: 1px solid #eee;
  margin: 1.25rem 0 1rem;
}

@media (prefers-color-scheme: dark) {
  .rp-divider {
    border-color: rgba(255, 255, 255, 0.1);
  }
}

.rp-back-link {
  display: block;
  margin-top: 1.25rem;
  font-size: 0.9rem;
  text-align: center;
}

/* Tablet (álló és fekvő) */
@media (max-width: 600px) {
  .rp-page {
    align-items: flex-start;
    padding: 1.25rem 0.75rem 2rem;
  }

  .rp-card {
    padding: 1.5rem 1.1rem 1.5rem;
    border-radius: 10px;
  }

  .rp-header h1 {
    font-size: 1.25rem;
  }
}

/* Fekvő orientáció kis képernyőn */
@media (max-height: 500px) and (orientation: landscape) {
  .rp-page {
    align-items: flex-start;
    padding: 0.75rem 1rem 1.5rem;
  }

  .rp-card {
    padding: 1rem 1.25rem 1.1rem;
    max-width: 560px;
  }

  .rp-header {
    margin-bottom: 0.6rem;
  }

  .rp-header h1 {
    font-size: 1.15rem;
  }

  .rp-card label {
    margin-top: 0.5rem;
  }

  .rp-card .control-button {
    margin-top: 0.7rem;
    padding: 0.6rem 1rem;
  }
}
