:root {
  --bg-0: #0b1020;
  --bg-1: #0f1626;
  --card: rgba(255, 255, 255, 0.97);
  --ink: #11182a;
  --ink-soft: #5a6580;
  --line: #e7eaf2;
  --gold: #e8b339;
  --gold-2: #f5c451;
  --blue: #4d8dff;
  --blue-2: #6aa1ff;
  --ok: #2fbf7a;
  --warn: #f0a500;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(4, 8, 20, 0.45);
  --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body { min-height: 100%; }

body {
  font-family: var(--font);
  color: #f1f3f8;
  background: radial-gradient(1200px 800px at 50% -10%, #1a2742 0%, var(--bg-1) 45%, var(--bg-0) 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* dekoratív háttér-foltok */
.bg-orbs { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-orbs span {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.35;
}
.bg-orbs span:nth-child(1) { width: 340px; height: 340px; background: #3a64c8; top: -80px; left: -60px; }
.bg-orbs span:nth-child(2) { width: 300px; height: 300px; background: var(--gold); bottom: -90px; right: -60px; opacity: 0.22; }
.bg-orbs span:nth-child(3) { width: 260px; height: 260px; background: #5b8bff; bottom: 30%; left: 40%; opacity: 0.15; }

.app {
  position: relative; z-index: 1;
  max-width: 560px; margin: 0 auto;
  padding: 22px 16px 120px;
  min-height: 100vh;
}

/* ---- Képernyők ---- */
.screen.center {
  min-height: 88vh; display: flex; align-items: center; justify-content: center;
}
.hidden { display: none !important; }

/* ---- Kártya ---- */
.card.glass {
  width: 100%;
  background: var(--card);
  color: var(--ink);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 34px 26px;
}
.card.narrow { max-width: 440px; text-align: center; }

.badge {
  display: inline-block;
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); background: rgba(232, 179, 57, 0.12);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 16px;
}

h1 { font-size: 26px; font-weight: 800; line-height: 1.2; margin-bottom: 12px; letter-spacing: -0.02em; }
h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.muted { color: var(--ink-soft); line-height: 1.6; font-size: 15px; }

/* ---- Űrlap ---- */
.field-label {
  display: block; text-align: left; font-weight: 600; font-size: 14px;
  color: var(--ink); margin: 22px 0 8px;
}
.card.glass input[type=text],
.card.glass input[type=password] {
  width: 100%; font-family: var(--font); font-size: 17px; color: var(--ink);
  padding: 16px 16px; border: 1.5px solid var(--line); border-radius: 14px;
  background: #fafbff; outline: none; transition: border-color .15s, box-shadow .15s;
}
.card.glass input[type=text]:focus,
.card.glass input[type=password]:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(77, 141, 255, 0.15); }
.card.glass input.error { border-color: #ec5b5b; box-shadow: 0 0 0 4px rgba(236, 91, 91, 0.12); }

/* ---- Gombok ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font); font-weight: 700; font-size: 16px; line-height: 1.2; cursor: pointer;
  border: none; border-radius: 14px; padding: 16px 20px; text-decoration: none;
  transition: transform .08s, filter .15s, background .15s;
}
.btn:active { transform: translateY(1px) scale(0.995); }
.btn-block { display: flex; width: 100%; }
.btn-primary {
  color: #1c1303;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  box-shadow: 0 10px 24px rgba(232, 179, 57, 0.35);
}
.btn-primary:hover { filter: brightness(1.04); }
.btn-primary:disabled { background: #d9dde8; color: #9aa3b8; box-shadow: none; cursor: not-allowed; }
.btn-ghost { background: #eef1f8; color: var(--ink); }
.btn-block.btn-primary { margin-top: 26px; }

/* ---- Pontozó fejléc ---- */
.vote-header {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-bottom: 6px; color: #fff;
}
.vote-header .badge { margin-bottom: 8px; }
.progress-pill {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14);
  padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; white-space: nowrap;
}
.hint { color: #aab4cc; font-size: 14px; line-height: 1.55; margin: 6px 2px 18px; }

/* ---- Előadó kártyák ---- */
.cards { display: flex; flex-direction: column; gap: 14px; }
.presenter {
  background: var(--card); color: var(--ink); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(4, 8, 20, 0.28); overflow: hidden;
  border: 1.5px solid transparent; transition: border-color .2s;
}
.presenter.complete { border-color: rgba(47, 191, 122, 0.5); }
.presenter-head {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 18px 16px; background: none; border: none; cursor: pointer; text-align: left;
}
.p-index {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 14px;
  background: #eef1f8; color: var(--ink-soft);
}
.presenter.complete .p-index { background: rgba(47, 191, 122, 0.15); color: var(--ok); }
.p-name { flex: 1 1 auto; font-weight: 700; font-size: 16.5px; }
.p-status {
  flex: 0 0 auto; font-size: 11.5px; font-weight: 700; padding: 5px 9px; border-radius: 999px;
}
.status-empty   { background: #f0f1f5; color: #8b94aa; }
.status-partial { background: rgba(240, 165, 0, 0.14); color: #b97f00; }
.status-done    { background: rgba(47, 191, 122, 0.16); color: var(--ok); }
.chev { flex: 0 0 auto; color: #aab2c6; transition: transform .25s; font-size: 14px; }
.presenter-head[aria-expanded=true] .chev { transform: rotate(180deg); }

.presenter-body {
  display: grid; grid-template-rows: 0fr; transition: grid-template-rows .28s ease;
}
.presenter-body-inner { overflow: hidden; min-height: 0; }
.presenter.open .presenter-body { grid-template-rows: 1fr; }
.criteria { padding: 4px 16px 16px; border-top: 1px solid var(--line); }
.criteria:first-child { margin-top: 2px; }
.c-name { font-size: 14px; font-weight: 600; color: #3a445f; margin: 12px 0 10px; line-height: 1.4; }

.rating { display: flex; gap: 8px; }
.dot {
  flex: 1 1 0; aspect-ratio: 1 / 1; max-height: 56px; border-radius: 12px;
  border: 1.5px solid var(--line); background: #fafbff; color: var(--ink-soft);
  font-weight: 800; font-size: 17px; cursor: pointer; transition: all .12s;
}
.dot:hover { border-color: var(--blue); }
.dot[aria-checked=true] {
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  border-color: var(--gold); color: #1c1303;
  box-shadow: 0 6px 14px rgba(232, 179, 57, 0.4); transform: translateY(-1px);
}

/* ---- Leadás sáv ---- */
.submit-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  background: linear-gradient(180deg, rgba(11,16,32,0) 0%, var(--bg-0) 38%);
  padding: 26px 16px max(18px, env(safe-area-inset-bottom));
}
.submit-bar .btn { max-width: 560px; margin-left: auto; margin-right: auto; display: block; margin-top: 0; }
.fineprint { text-align: center; color: #8c97b3; font-size: 12.5px; margin-top: 10px; }
.fineprint strong { color: #c9d2e6; }

/* ---- Köszönő / pipa ---- */
.done .check {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 18px;
  display: grid; place-items: center; font-size: 38px; color: #fff;
  background: linear-gradient(135deg, #34d186, var(--ok));
  box-shadow: 0 12px 30px rgba(47, 191, 122, 0.45);
}

/* ---- Modal ---- */
.modal {
  position: fixed; inset: 0; z-index: 20; display: grid; place-items: center;
  background: rgba(6, 10, 22, 0.6); backdrop-filter: blur(4px); padding: 20px;
}
.modal-card {
  background: var(--card); color: var(--ink); border-radius: 20px; padding: 26px 22px;
  max-width: 380px; width: 100%; text-align: center; box-shadow: var(--shadow);
}
.modal-card h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.modal-actions { display: flex; gap: 12px; margin-top: 22px; }
.modal-actions .btn { flex: 1; }

/* ---- Toast ---- */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  background: #1b2438; color: #fff; padding: 13px 20px; border-radius: 12px;
  font-weight: 600; font-size: 14px; z-index: 30; box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.08); max-width: 90%; text-align: center;
}

@media (min-width: 600px) {
  h1 { font-size: 30px; }
}
