/* =====================================================
   TIMELINE JÁTÉK - MOBILE-FIRST CSS
   ===================================================== */

/* --- TUDÁS IKONOK (4 szint: !, szem, agy, szív) --- */
.knowledge-icon {
  --ki-size: 18px;
  width: var(--ki-size);
  height: var(--ki-size);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  flex-shrink: 0;
}

.knowledge-icon[knowledge="0"],
.knowledge-icon[knowledge="-1"] {
  background-image: url(../7streak/images/danger.svg);
}

.knowledge-icon[knowledge="1"] {
  background-image: url(./images/eye.svg);
}

/* Piros kártyán (beme-question-card) a szem ikon legyen fehér */
.beme-question-card .knowledge-icon[knowledge="1"],
.timeline-track .knowledge-icon[knowledge="1"] {
  filter: brightness(0) invert(1);
}

.knowledge-icon[knowledge="2"] {
  background-image: url(../7streak/images/orange_brain.svg);
}

.knowledge-icon[knowledge="3"] {
  background-image: url(../7streak/images/heart.svg);
}

/* --- IDŐVONAL MEGJELENÍTŐ --- */
.timeline-game-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  font-family: var(--main-font, Arial);
  padding-bottom: 40px;
}

/* --- HUD (instrukció + csillagsor) --- */
.hud .instruction {
  font-family: var(--main-font, Arial);
  font-size: var(--game-font-s);
}

.hud {
  padding: 4px 0;
}

/* Mobil nézetben ne vegyen el helyet a hosszú instrukció */
@media (max-width: 415px) {
  .hud .instruction {
    display: none;
  }
}

/* Streak csillagok (7streak stílusban) */
.star-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.streak-star {
  width: 32px;
  height: 32px;
  background-image: url(../7streak/images/star.svg);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: grayscale(1) opacity(0.4);
  transition: filter 0.25s;
}

.streak-star.done {
  filter: none;
  animation: starAppear 0.4s ease forwards;
}

@keyframes starAppear {
  0%   { transform: scale(0.5) rotate(-15deg); opacity: 0; }
  70%  { transform: scale(1.25) rotate(5deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

[game-page="task-list"] {
  & .game-results {
    display: none;
  }

  & .task-container {
    border-radius: var(--border-radius, 12px);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    background: var(--color-white);
    font-family: var(--main-font, Arial);
  }

  & h2 {
    font-weight: 700;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;

    & .task-list-percent {
      font-size: var(--font-size-h5);
      font-weight: 500;
      color: var(--color-lighter-all);
      background: var(--overlay-border);
      border-radius: 20px;
      padding: 2px 12px;
      letter-spacing: 0;
    }
  }

  & .sticky-actions {
    position: sticky;
    bottom: 0;
    z-index: 10;
    background: transparent;
    border-top: none;
    padding: 12px 20px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 12px;
    max-height: none;

    & .button[action="check"] {
      display: none;
    }
  }
}

/* Mobil: áttetsző témához illeszkedő háttér a Vissza/Tovább gombok mögé */
@media (max-width: 700px) {
  [game-page="task-list"] .sticky-actions {
    width: 100%;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid var(--border-black-all);
  }
  [theme="light"] [game-page="task-list"] .sticky-actions {
    background: rgba(0, 0, 0, 0.5);
  }
  [theme="dark"] [game-page="task-list"] .sticky-actions {
    background: rgba(255, 255, 255, 0.5);
  }
}

/* Kiegészítő padding: a task-container scrollban ne légyen takarva a gomboktól */
[game-page="task-list"] .task-container {
  padding-bottom: 8px;
}

/* 3) Timeline játéknál a .game-content top margina megszünteti a sticky fejléc ugrálását */
[page="game"].game-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Saát eredmények (toplista) előző körök nem relevanss, nincs időnyomás */
[game-page="end"] .leaderboard-grid {
  display: none !important;
}

.timeline-area {
  padding: 0;
  border-radius: var(--border-radius, 12px);
  overflow: hidden;
}

/* --- STICKY FEJLÉC (csillagsor + kérdéskártya) --- */
.beme-sticky-header {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  background: var(--color-white);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

/* Évszám Streak: fejléc láthatatlanabb (nincs kártyakontent) */
.beme-sticky-header:has(.event-card-container.hide) {
  border-bottom-color: transparent;
  box-shadow: none;
}

/* HUD a sticky fejlécben */
.beme-sticky-header .hud {
  padding: 8px 12px 4px;
  background: transparent;
}

/* Kontraszt javítás: világos témában az instrukció látható legyen */
.beme-sticky-header .instruction {
  color: var(--color-darkest);
}
.beme-sticky-header .streak-star {
  filter: grayscale(1) opacity(0.7);
}
.beme-sticky-header .streak-star.done {
  filter: none;
}

/* --- Összecsukás / kinyitás gomb --- */
/* --- Szöveg kibontás gomb (a piros kártyán belül, jobb alsó sarok) --- */
.beme-toggle-btn {
  position: absolute;
  bottom: 5px;
  right: 6px;
  display: none;           /* JS mutatja ha túlcsordulás van */
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.28);
  border: none;
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 10px;
  color: white;
  cursor: pointer;
  line-height: 1;
  font-family: var(--main-font, Arial);
  transition: background 0.15s;
  z-index: 2;
}
.beme-toggle-btn:hover {
  background: rgba(0,0,0,0.45);
}

/* --- Görgethető fő tartalom --- */
.timeline-main-content {
  display: flex;
  flex-direction: column;
}

/* --- VERTIKÁLIS IDŐVONAL TRACK --- */
.timeline-track {
  display: flex;
  flex-direction: column;
  padding: 4px 0;
}

/* --- ALAP SOR --- */
.tl-row {
  display: grid;
  grid-template-columns: 76px 22px 1fr;
  min-height: 52px;
  position: relative;
}

.tl-row.tl-clickable,
.tl-row.tl-detail-clickable {
  cursor: pointer;
}



/* Dátum oszlop */
.tl-date {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 4px 5px 4px 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-darkest, #1a1a1a);
  text-align: right;
  line-height: 1.3;
  transition: color 0.15s, font-size 0.1s;
  word-break: break-word;
  hyphens: auto;
  font-family: var(--main-font, Arial);
}

/* Gerincvonal oszlop */
.tl-spine {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tl-spine-line {
  width: 2px;
  background: rgba(0, 0, 0, 0.12);
  flex: 1;
  min-height: 6px;
}

/* Első sor: ne lógjon ki felül a vonal */
.tl-row:first-child > .tl-spine > .tl-spine-line:first-child {
  opacity: 0;
}
/* Utolsó sor: ne lógjon ki alul a vonal */
.tl-row:last-child > .tl-spine > .tl-spine-line:last-child {
  opacity: 0;
}

.tl-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.18);
  border: 2px solid white;
  box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.18);
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

/* Tartalom oszlop */
.tl-content {
  display: flex;
  align-items: center;
  padding: 8px 14px 8px 6px;
  gap: 8px;
}

.tl-name {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-darkest, #1a1a1a);
  line-height: 1.4;
  transition: color 0.15s;
}

/* --- SOR ÁLLAPOTOK --- */
.tl-row.tl-correct .tl-dot {
  background: var(--color-success, #22c55e);
  box-shadow: 0 0 0 2px var(--color-success, #22c55e);
  transform: scale(1.35);
}

.tl-row.tl-correct .tl-date {
  color: var(--color-success, #22c55e);
}

.tl-row.tl-correct .tl-name {
  color: var(--color-success, #22c55e);
  font-weight: 600;
}

.tl-row.tl-wrong .tl-dot {
  background: var(--color-error, #ef4444);
  box-shadow: 0 0 0 2px var(--color-error, #ef4444);
}

.tl-row.tl-wrong .tl-date {
  color: var(--color-error, #ef4444);
}

.tl-row.tl-highlighted .tl-dot {
  background: var(--color-primary, #e55);
  box-shadow: 0 0 0 3px var(--color-primary, #e55);
  transform: scale(1.45);
}

.tl-row.tl-highlighted .tl-date {
  color: var(--color-primary, #e55);
}

.tl-row.tl-highlighted .tl-name {
  color: var(--color-primary, #e55);
  font-weight: 600;
}

/* --- KLASZTER SOR --- */
.tl-cluster .tl-date {
  color: rgba(0, 0, 0, 0.35);
  font-weight: 500;
  font-style: italic;
}

.tl-cluster .tl-dot.tl-cluster-dot {
  width: 20px;
  height: 20px;
  background: rgba(0, 0, 0, 0.22);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: white;
  font-family: var(--main-font, Arial);
}

.tl-cluster-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--color-primary, #e55);
  color: var(--color-primary, #e55);
  background: white;
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  font-family: var(--main-font, Arial);
  transition: background 0.15s, color 0.15s;
}

.tl-cluster-btn:hover {
  background: var(--color-primary, #e55);
  color: white;
}

.tl-cluster-lbl {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.4);
  font-style: italic;
}

/* --- ÉVSZÁM STREAK – dátum input a sorban --- */
.tl-date-input {
  width: 86px;
  height: 28px;
  border: 2px solid rgba(0, 0, 0, 0.18);
  border-radius: 6px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  padding: 0 4px;
  background: white;
  outline: none;
  transition: border-color 0.2s;
  font-family: var(--main-font, Arial);
}

.tl-date-input:focus {
  border-color: var(--color-primary, #e55);
}

.tl-date-input.input-correct {
  border-color: var(--color-success, #22c55e);
  background: rgba(34, 197, 94, 0.07);
}

.tl-date-input.input-wrong {
  border-color: var(--color-error, #ef4444);
  background: rgba(239, 68, 68, 0.07);
}

.tl-date-input.input-readonly {
  background: var(--color-background, #f5f5f5);
  color: var(--color-lighter, #888);
  cursor: default;
}

/* Maszkolt esemény dot (piros jelölő) */
.tl-dot.tl-masked-dot {
  background: var(--color-primary, #e55);
  box-shadow: 0 0 0 2px var(--color-primary, #e55);
}

/* --- ESEMÉNY RÉSZLET POPUP --- */
.event-detail-popup {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-bottom: 8px;
}

.event-detail-img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

/* 5) Popup: mindig fehér háttér + sötét szöveg (--color-white-all sosem invertálódik sötét módban) */
.popup.open .content {
  background: var(--color-white-all) !important;
}
.popup.open .title,
.popup.open .info,
.popup.open .event-detail-name,
.popup.open .beme-info-popup h4,
.popup.open .beme-info-popup p {
  color: var(--color-darkest-all) !important;
}

/* Popup gombok: turquoise gomb, fehér szöveg – mindkét módban látható, szabványos méret */
.beme-info-popup .button,
.event-detail-popup .button {
  background: rgb(14, 135, 153) !important;
  outline: none !important;
  border: none !important;
  border-radius: 8px;
  margin: 10px auto 0;
  padding: 10px 36px !important;
  display: block;
  width: fit-content;
  cursor: pointer;
}
.beme-info-popup .button *,
.event-detail-popup .button * {
  color: var(--color-white-all) !important;
}

.event-detail-name {
  font-weight: 700;
  color: var(--color-darkest-all);
  line-height: 1.3;
  margin: 0 0 2px 0;
  font-size: 16px;
}

.event-detail-date {
  color: rgb(14, 135, 153);
  font-weight: 800;
  margin: 0 0 8px 0;
  font-size: clamp(22px, 6vw, 32px);
  line-height: 1.15;
}

.event-detail-desc {
  font-size: 14px;
  font-weight: 400;
  color: rgb(80, 80, 80);
  line-height: 1.65;
  margin: 0;
  white-space: pre-wrap;
}

/* --- ESEMÉNY KÁRTYA (Event Streak) --- */
.event-card-container {
  border-radius: var(--border-radius, 12px);
  padding: 6px 8px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.event-card {
  background: var(--color-primary, #e55);
  border-radius: var(--border-radius, 12px);
  width: 100%;
  max-width: 400px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.event-image-wrapper {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  max-height: 280px;
}

.event-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.event-name {
  padding: 16px 20px;
  color: white;
  text-align: center;
  font-size: clamp(16px, 4vw, 24px);
  font-weight: 600;
  line-height: 1.3;
}

.question-knowledge {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  max-width: 400px;
}

/* --- VISSZAJELZÉS --- */
.feedback {
  padding: 12px 20px;
  border-radius: 8px;
  text-align: center;
  font-size: var(--font-size-small);
  font-weight: 600;
  display: none;
}

.feedback.show {
  display: block;
}

.feedback.correct {
  color: var(--color-success, #22c55e);
  background: rgba(34, 197, 94, 0.1);
}

.feedback.wrong {
  color: var(--color-error, #ef4444);
  background: rgba(239, 68, 68, 0.1);
}

/* --- FELADATLISTA (task-list page) --- */
.task-list .task-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-black-all, rgba(0,0,0,0.15));
  transition: background 0.15s;
}

.task-list .task-item:last-child {
  border-bottom: none;
}



.task-item-date {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-darkest, #1a1a1a);
  min-width: 115px;
  flex-shrink: 0;
  letter-spacing: 0.01em;
  font-family: var(--main-font, Arial);
}

.task-item-name {
  font-size: 15px;
  font-weight: 400;
  color: var(--color-darkest, #1a1a1a);
  flex: 1;
  line-height: 1.4;
}

.task-item-knowledge {
  flex-shrink: 0;
}

/* --- FLASHKÁRTYÁK (popupban) --- */
.flashcards-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  padding: 10px 0;
  max-height: 60vh;
  overflow-y: auto;
}

.flashcard {
  width: 150px;
  height: var(--card-height, 80px);
  position: relative;
  cursor: default;
}

.flashcard.flippable {
  cursor: pointer;
  perspective: 600px;
}

.flashcard-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.35s;
}

.flashcard.flipped .flashcard-inner {
  transform: rotateY(180deg);
}

.flashcard-front,
.flashcard-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 8px;
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
}

.flashcard-front {
  background: var(--color-primary, #e55);
  color: white;
}

.flashcard-back {
  background: var(--color-secondary, #5b5ea6);
  color: white;
  transform: rotateY(180deg);
}

.flashcard-knowledge {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
}

/* @keyframes starAppear és .streak-star.done a HUD szekció tetején van definiálva */

/* --- RESPONSIVE (tablet+) --- */
@media (min-width: 600px) {
  .event-card {
    max-width: 480px;
  }

  .tl-row {
    grid-template-columns: 106px 28px 1fr;
  }

  .tl-date {
    padding: 4px 10px 4px 8px;
    font-size: 12px;
  }

  .tl-name {
    font-size: 15px;
  }

  .tl-date-input {
    width: 96px;
    font-size: 13px;
  }
}

@media (min-width: 900px) {
  .event-name {
    font-size: var(--font-size-h1);
  }
}

/* =====================================================
   BEMELEGÍTÉS - kérdés kártya + táblázatos idővonal
   ===================================================== */

/* Felső kérdés kártya (100×100 kép + cím + leírás) */
.beme-question-card {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 8px 10px;
  background: var(--color-primary, #e55);
  border-radius: var(--border-radius, 12px);
  color: white;
  min-height: 80px;
  position: relative;
}

.beme-question-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  display: block;
}

.beme-question-thumb.hide {
  display: none !important;
}

.beme-question-thumb-placeholder {
  display: none !important;
}

.beme-question-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
  max-height: 64px;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

/* Kibontott állapot: teljes szöveg látszik */
.beme-question-card.info-expanded .beme-question-info {
  max-height: 240px;
}

/* Popup a szem ikon megnyomásakor (max szint) */
.beme-info-popup {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 4px;
  font-family: var(--main-font, Arial);
}
.beme-info-popup h4 {
  margin: 0;
  font-family: inherit;
}
.beme-info-popup p {
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
  font-weight: 400;
  font-family: inherit;
}

.beme-question-name {
  font-size: clamp(14px, 3.5vw, 19px);
  font-weight: 700;
  color: white;
  margin: 0;
  padding: 0;
  line-height: 1.25;
  font-family: var(--main-font, Arial);
  text-align: left;
}

.beme-question-desc {
  font-size: 13px;
  font-weight: 300;
  color: rgba(255,255,255,0.88);
  margin: 0;
  line-height: 1.45;
  font-family: var(--main-font, Arial);
  text-align: left;
  /* Hosszú leírás csonkítása */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Üres választó sor (csak évszám, kattintható) */
.tl-row.tl-empty-choice {
  cursor: pointer;
  height: 72px;
  overflow: hidden;
}

@media (max-width: 599px) {
  .tl-row.tl-empty-choice,
  .tl-row.tl-visible-row {
    height: 60px;
  }
  .tl-visible-thumb,
  .tl-visible-thumb-placeholder {
    width: 44px;
    height: 44px;
  }
  .beme-question-thumb,
  .beme-question-thumb-placeholder {
    width: 52px;
    height: 52px;
  }
}

.tl-row.tl-empty-choice .tl-dot {
  background: rgba(0,0,0,0.25);
  box-shadow: 0 0 0 1.5px rgba(0,0,0,0.25);
}

.tl-row.tl-empty-choice .tl-date {
  color: var(--color-darkest, #1a1a1a);
}



/* Az üres választó sor tartalomcellja */
.tl-empty-placeholder {
  height: 36px;
  width: 60%;
  max-width: 200px;
  background: rgba(0,0,0,0.055);
  border-radius: 4px;
  align-self: center;
}

/* Látható (megoldott) sor — év + kép + cím + leírás */
.tl-row.tl-visible-row {
  height: 72px;
  overflow: hidden;
  cursor: pointer;
}

.tl-row.tl-visible-row .tl-content {
  padding: 8px 12px 8px 4px;
  gap: 10px;
  align-items: center;
}

.tl-visible-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.tl-visible-thumb-placeholder {
  width: 56px;
  height: 56px;
  background: rgba(0,0,0,0.07);
  border-radius: 6px;
  flex-shrink: 0;
}

.tl-visible-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.tl-visible-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-darkest, #1a1a1a);
  line-height: 1.3;
  font-family: var(--main-font, Arial);
}

.tl-visible-desc {
  font-size: 12px;
  font-weight: 300;
  color: var(--color-dark, rgba(0,0,0,0.5));
  line-height: 1.35;
  font-family: var(--main-font, Arial);
  /* Leírás max 2 sor */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Helyes válasz után az üres sor simán mutatja a tartalmat */
.tl-row.tl-just-answered .tl-dot {
  background: var(--color-success, #22c55e);
  box-shadow: 0 0 0 2px var(--color-success, #22c55e);
  transform: scale(1.35);
}

.tl-row.tl-just-answered .tl-date {
  color: var(--color-success, #22c55e);
}

/* 300ms-os visszaállás: transition csak a fadeout irányban */
.tl-row.tl-answer-settling .tl-dot {
  transition: background 300ms ease, box-shadow 300ms ease, transform 300ms ease;
}

.tl-row.tl-answer-settling .tl-date {
  transition: color 300ms ease;
}

/* Évszám lüktető animáció light módban (2 mp) */
[theme="light"] .tl-row.tl-just-answered .tl-date {
  animation: tlDatePulse 2s ease forwards;
}

@keyframes tlDatePulse {
  0%   { transform: scale(1);    color: var(--color-success, #22c55e); }
  15%  { transform: scale(1.18); color: #166534; }
  45%  { transform: scale(1.12); color: #166534; }
  70%  { transform: scale(1.08); color: #166534; }
  100% { transform: scale(1);    color: #166534; }
}

/* Helyes tétel neve felvillan az üres sorban */
[theme="light"] .tl-empty-placeholder.tl-name-flash {
  color: #166534;
  filter: none !important;
  background: rgba(255, 255, 255, 0.82);
  padding: 2px 6px;
  border-radius: 4px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.12);
  animation: tlNameFlashLight 0.55s ease forwards;
}

.tl-empty-placeholder.tl-name-flash {
  background: transparent;
  height: auto;
  width: auto;
  max-width: none;
  border-radius: 0;
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-success, #22c55e);
  animation: tlNameFlash 0.55s ease forwards;
}

@keyframes tlNameFlashLight {
  0%   { opacity: 0; transform: scale(0.85); }
  30%  { opacity: 1; transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1);    }
}

@keyframes tlNameFlash {
  0%   { opacity: 0; transform: scale(0.8);   filter: drop-shadow(0 0 0px transparent); }
  30%  { opacity: 1; transform: scale(1.12);  filter: drop-shadow(0 0 8px #22c55e) drop-shadow(0 0 16px rgba(34,197,94,.5)); }
  100% { opacity: 1; transform: scale(1);     filter: none; }
}

/* Hibás click jelölése */
.tl-row.tl-wrong-click .tl-dot {
  background: var(--color-error, #ef4444);
  box-shadow: 0 0 0 2px var(--color-error, #ef4444);
}

.tl-row.tl-wrong-click .tl-date {
  color: var(--color-error, #ef4444);
}

/* Helyes sor kiemelése rossz válasz után */
.tl-row.tl-highlighted-correct .tl-dot {
  background: var(--color-primary, #e55);
  box-shadow: 0 0 0 3px var(--color-primary, #e55);
  transform: scale(1.45);
}

.tl-row.tl-highlighted-correct .tl-date {
  color: var(--color-primary, #e55);
  font-weight: 700;
}

/* Inline válasz visszajelzés a soron (✓ / ✗) */
.tl-answer-badge {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: badgeAppear 0.2s ease forwards;
}

.tl-badge-correct {
  background: var(--color-success, #22c55e);
  color: #fff;
  box-shadow: 0 2px 6px rgba(34, 197, 94, 0.45);
}

.tl-badge-wrong {
  background: var(--color-error, #ef4444);
  color: #fff;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
}

@keyframes badgeAppear {
  from { transform: scale(0.4); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* =====================================================
   ÉVSZÁM STREAK v3 — header input area
   ===================================================== */

/* Input terület a beme-sticky-header event-card-container-ben */
.ys-input-area {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 8px 4px;
}

.ys-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ys-action-btn {
  flex-shrink: 0;
  min-width: 70px !important;
  padding: 0 10px !important;
  height: 42px;
  border-radius: 8px !important;
  border: 2px solid rgba(0, 0, 0, 0.18) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.ys-date-input {
  flex: 1;
  min-width: 0;
  height: 42px;
  border: 2.5px solid rgba(0, 0, 0, 0.18);
  border-radius: 8px;
  text-align: center;
  font-size: clamp(17px, 4vw, 22px);
  font-weight: 700;
  padding: 0 10px;
  background: var(--color-white-all, #fff);
  color: var(--color-darkest-all, rgb(20, 20, 20));
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  font-family: var(--main-font, Arial);
  box-sizing: border-box;
}

.ys-date-input:focus {
  border-color: var(--color-primary, #e55);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb, 238, 85, 85), 0.15);
}

.ys-date-input.ys-correct {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
  color: #15803d;
}

.ys-date-input.ys-wrong {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
  animation: ysShake 0.35s ease;
}

@keyframes ysShake {
  0%  { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
  100%{ transform: translateX(0); }
}

.ys-format-hint {
  font-size: 11px;
  color: rgba(0, 0, 0, 0.45);
  text-align: center;
  font-family: var(--main-font, Arial);
  line-height: 1.3;
  min-height: 14px;
}

/* Blank (kérdéses) sor — dátum cella üres, halvány pont */
.tl-row.ys-blank .tl-date {
  opacity: 0;
}

/* Az aktuálisan feltett kérdés sora */
.tl-row.tl-highlighted .tl-dot {
  background: var(--color-primary, #e55);
  box-shadow: 0 0 0 4px rgba(238, 85, 85, 0.25);
  transform: scale(1.5);
}

/* Helyesen megválaszolt sor */
.tl-row.tl-row-correct .tl-date {
  color: #15803d;
  font-weight: 700;
}

.tl-dot.tl-dot-correct {
  background: #22c55e;
  box-shadow: 0 0 0 2.5px #22c55e;
}

@media (max-width: 599px) {
  .ys-date-input {
    height: 38px;
    font-size: 17px;
  }
  .ys-action-btn {
    height: 38px;
    min-width: 60px !important;
  }
}
