/* SCROLL diákalkalmazás – SPEC 22.1 wireframe */

:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #5c5c5c;
  --primary: #1a1a1a;
  --accent: #2f5bea;
  --feed-bg: #151515;
  --radius: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* img/gomb hidden attribútum – a képernyők osztályal kapcsolódnak */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

body {
  overscroll-behavior: none;
}

.app {
  min-height: 100%;
  min-height: 100dvh;
}

/* Alapból minden képernyő rejtve – a display:flex nem írhatja felül */
.screen {
  display: none;
  min-height: 100%;
  min-height: 100dvh;
  box-sizing: border-box;
}

.screen.is-active {
  display: block;
}

.screen.is-active.screen--feed,
.screen.is-active.screen--center {
  display: flex;
  flex-direction: column;
}

.screen--pad {
  padding: 1.5rem 1.25rem calc(1.5rem + var(--safe-b));
  max-width: 28rem;
  margin: 0 auto;
}

.screen--center.is-active {
  justify-content: center;
}

.screen--feed {
  position: relative;
  background: var(--feed-bg);
  color: #fff;
  padding: 0;
  max-width: none;
  overflow: hidden;
}

.title {
  font-size: 1.6rem;
  line-height: 1.25;
  margin: 0 0 0.75rem;
  font-weight: 700;
}

.subtitle {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
}

.lead {
  font-size: 1.05rem;
  line-height: 1.45;
  margin: 0 0 1rem;
}

.igazolas-box { margin: 1rem 0 1.5rem; }
.igazolas-kod {
  font-family: ui-monospace, monospace;
  font-size: 1.4rem;
  letter-spacing: 0.08em;
}

.kod-input {
  display: block;
  width: 100%;
  margin: 0.75rem 0 1rem;
  padding: 0.8rem 0.9rem;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  border: 2px solid #e5e5e5;
  border-radius: var(--radius);
}

.muted {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
  margin: 0 0 1rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.btn {
  display: block;
  width: 100%;
  border: 0;
  border-radius: var(--radius);
  padding: 0.9rem 1.2rem;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 1rem;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
}

.btn--light {
  background: #fff;
  color: var(--fg);
  width: auto;
  margin: 0;
  padding: 0.65rem 1.1rem;
}

.btn--ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.spinner {
  width: 2rem;
  height: 2rem;
  margin: 40vh auto 0;
  border: 3px solid #ddd;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: none;
  }
  .elemzes-lepesek li {
    transition: none !important;
  }
}

.hero-img-wrap {
  margin: 0 0 1.25rem;
}

.hero-img {
  width: 100%;
  max-height: 40vh;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

/* Feed */
.feed-kartya {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  touch-action: none;
}

.feed-kartya__kep {
  flex: 1;
  background: #2a2a2a center/cover no-repeat;
  min-height: 50vh;
}

.feed-kartya__meta {
  padding: 1rem 1.25rem 5.5rem;
}

.feed-kartya__alkoto {
  font-weight: 700;
  margin: 0 0 0.35rem;
}

.feed-kartya__felirat {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.feed-kartya__tags {
  margin: 0;
  opacity: 0.7;
  font-size: 0.9rem;
}

.feed-lajk {
  position: absolute;
  right: 1rem;
  bottom: 6.5rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.feed-lajk[aria-pressed="true"] {
  color: #ff4d6d;
}

.feed-lajk[aria-pressed="true"] path {
  fill: currentColor;
}

.feed-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding: 0.75rem 1.25rem calc(0.75rem + var(--safe-b));
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
  pointer-events: auto;
}

.feed-footer .btn {
  min-height: 44px;
  min-width: 7rem;
  touch-action: manipulation;
}

.feed-sorszam {
  font-size: 0.85rem;
  opacity: 0.85;
  min-width: 3.5rem;
}

.feed-huzas {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Elemzés */
.elemzes-lepesek {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.elemzes-lepesek li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
  opacity: 0.35;
  font-size: 1.1rem;
  transition: opacity 0.3s;
}

.elemzes-lepesek li.is-on {
  opacity: 1;
  color: var(--accent);
  font-weight: 600;
}

/* Ajánlat */
.ajanlat-kep {
  width: 100%;
  max-height: 28vh;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
}

.csomag-lista {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 1rem 0;
}

.csomag-opcio {
  display: block;
  border: 2px solid #e5e5e5;
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  cursor: pointer;
  background: #fff;
}

.csomag-opcio.is-kiemelt {
  border-color: var(--accent);
}

.csomag-opcio.is-hatter,
.csomag-opcio.is-hatter.is-selected {
  background: #d9e4fb;
  color: #1a1a1a;
}

.csomag-opcio.is-selected {
  border-color: var(--fg);
  background: #f7f7f7;
}

.csomag-opcio input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.csomag-opcio__sor {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-weight: 600;
}

.csomag-opcio__ar {
  white-space: nowrap;
}

.csomag-opcio__athuzott {
  opacity: 0.5;
  text-decoration: line-through;
  margin-right: 0.35rem;
  font-weight: 400;
}

.csomag-opcio__tartalom {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.csomag-opcio__cimke {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  vertical-align: middle;
}

/* Profil */
.profil-fej {
  text-align: center;
  margin-bottom: 0.5rem;
}

.profil-ikon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.5rem;
}

.profil-nev {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
}

.profil-savok {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.profil-sav {
  display: grid;
  grid-template-columns: minmax(0, 9rem) 1fr 3rem;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.9rem;
}

.profil-sav__lab {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.profil-sav__szerep {
  color: var(--muted);
  font-size: 0.75rem;
}

.profil-sav__bar {
  height: 10px;
  background: #eee;
  border-radius: 999px;
  overflow: hidden;
}

.profil-sav__fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  width: 0;
}

.profil-kartyak {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.profil-kartya {
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
}

.profil-kartya__felirat {
  margin: 0;
  font-weight: 600;
}

.profil-kartya__meta {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.profil-kartya__split {
  display: flex;
  height: 8px;
  margin-top: 0.55rem;
  border-radius: 999px;
  overflow: hidden;
  background: #eee;
}

.profil-kartya__split span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.skala-wrap {
  margin: 1rem 0;
}

.skala-gombok {
  display: flex;
  gap: 0.4rem;
  justify-content: space-between;
  margin: 0.5rem 0;
}

.skala-gombok button {
  flex: 1;
  aspect-ratio: 1;
  max-width: 3rem;
  border-radius: 12px;
  border: 2px solid #ddd;
  background: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}

.skala-gombok button.is-on {
  border-color: var(--fg);
  background: var(--fg);
  color: #fff;
}

.skala-label {
  font-size: 0.75rem;
  color: var(--muted);
}

.hiba {
  color: #b00020;
  margin: 0.75rem 0 0;
}

.kesz-menuk {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.kesz-menu {
  border: 1px solid #eee;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
}

.kesz-menu h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.kesz-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.kesz-menu li {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
  font-size: 0.9rem;
}

.kesz-menu li.is-sajat {
  font-weight: 700;
}
