/* ===========================================================================
   Terminia Games — hub / landing (ekran 2a)
   Brend: prava Terminia zelena (#0F6E56). Font: Instrument Sans + Fredoka.
   =========================================================================== */
:root {
  --brand: #0F6E56;
  --brand-dark: #085041;
  --brand-light: #E1F5EE;
  --accent: #5DCAA5;
  --blue: #185FA5;

  --ink: #173A31;
  --text: #3C554C;
  --muted: #7C948B;

  --bg: #FFFFFF;
  --bg-soft: #F2F7F4;
  --bg-tint: #F6F9FC;
  --cream: #F1EFE8;
  --border: #E2ECE7;
  --border-soft: #EEF3F1;

  --radius: 16px;
  --shadow: 0 12px 34px rgba(15, 110, 86, 0.12);
  --shadow-sm: 0 4px 14px rgba(15, 110, 86, 0.10);

  --font: 'Instrument Sans', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-play: 'Fredoka', var(--font);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
html { max-width: 100%; overflow-x: hidden; }
body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;         /* R14: nikad horizontalni preliv */
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}
h1, h2, h3 { color: var(--ink); line-height: 1.15; margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.section { padding: 68px 0; }
.section.tinted { background: var(--bg-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 15px;
  padding: 12px 18px; border-radius: 12px; cursor: pointer; white-space: nowrap;
  border: 1px solid transparent; transition: transform .06s ease, background .15s ease, opacity .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { background: #fff; color: var(--brand); border-color: var(--border); }
.btn-outline:hover { background: var(--brand-light); border-color: var(--accent); }
.btn-ghost { background: transparent; color: var(--ink); padding: 10px 14px; }
.btn-white { background: #fff; color: var(--brand); }
.btn-white:hover { background: var(--cream); }
.btn-icon { width: 40px; height: 40px; padding: 0; justify-content: center; font-size: 17px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,0.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.site-header .container { display: flex; align-items: center; gap: 14px; height: 66px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); font-size: 18px; }
.logo .dot { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); position: relative; }
.logo .dot::after { content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); top: 4px; right: 4px; }
.logo-text { font-weight: 700; letter-spacing: -0.2px; }
.logo b { color: var(--brand); font-weight: 700; }
.nav { display: flex; gap: 16px; margin-left: 8px; }
.nav a { color: var(--text); font-size: 15px; font-weight: 500; white-space: nowrap; }
.nav a:hover { color: var(--brand); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.lang-select {
  font: inherit; font-size: 14px; color: var(--ink); background: #fff;
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; cursor: pointer;
}

/* ---------- Auth (prijava roditelja) ---------- */
.auth-area { display: flex; align-items: center; }
/* ID pravila (viši specifičnost) drže „Sign in" dostupnim uvek kad nije skriven —
   i na uskom telefonu i u instaliranoj PWA (app-mode) — a pouzdano ga sakrivaju
   kad je prijavljen (nadjačavaju .btn display i class-pravila u app-mode/media). */
#signinBtn:not([hidden]) { display: inline-flex; }
#signinBtn[hidden] { display: none; }
.user-chip { display: none; align-items: center; gap: 8px; max-width: 46vw; }
.user-chip:not([hidden]) { display: inline-flex; }
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
  background: var(--brand); color: #fff; background-size: cover; background-position: center;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.user-name {
  font-size: 14px; font-weight: 600; color: var(--ink);
  max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.btn-signout {
  font: inherit; font-size: 13px; font-weight: 600; color: var(--brand-dark);
  background: var(--brand-light); border: 1px solid #CBEBD8; border-radius: 10px;
  padding: 7px 11px; cursor: pointer; white-space: nowrap;
}
.btn-signout:hover { background: #D6F0E4; }

/* Modal (overlay + dialog) */
.auth-modal { position: fixed; inset: 0; z-index: 60; }
.auth-modal[hidden] { display: none; }
.auth-modal:not([hidden]) {
  display: flex; align-items: center; justify-content: center;
  background: rgba(15, 58, 49, 0.45); padding: 20px;
}
.auth-dialog {
  position: relative; width: 100%; max-width: 360px;
  background: #fff; border-radius: 20px; box-shadow: var(--shadow);
  padding: 30px 24px 24px; text-align: center;
}
.auth-close {
  position: absolute; top: 12px; right: 12px; width: 32px; height: 32px;
  border: none; background: transparent; color: var(--muted); font-size: 24px; line-height: 1;
  border-radius: 8px; cursor: pointer;
}
.auth-close:hover { background: var(--bg-soft); color: var(--ink); }
.auth-title { font-size: 22px; margin-bottom: 20px; }
.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  font: inherit; font-size: 15px; font-weight: 600; color: #3C4043;
  background: #fff; border: 1px solid #DADCE0; border-radius: 12px;
  padding: 12px 16px; cursor: pointer; transition: background .15s ease, box-shadow .15s ease;
}
.google-btn:hover { background: #F7F8F8; box-shadow: var(--shadow-sm); }
.google-g {
  display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 auto;
  border-radius: 50%; background: #fff; border: 1px solid #DADCE0;
  font-family: var(--font-play); font-weight: 700; font-size: 14px; color: #4285F4;
}
.email-btn {
  width: 100%; margin-top: 12px; font: inherit; font-size: 13.5px; font-weight: 500;
  color: var(--muted); background: var(--bg-soft); border: 1px dashed var(--border);
  border-radius: 12px; padding: 11px 16px; cursor: not-allowed;
}

/* Email prijava/registracija */
.google-btn[hidden] { display: none; }
.auth-form { display: flex; flex-direction: column; gap: 14px; text-align: left; margin-top: 4px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-label { font-size: 13px; font-weight: 600; color: var(--ink); }
.auth-input {
  width: 100%; max-width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 11px 14px; transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-input::placeholder { color: var(--muted); }
.auth-input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 110, 86, 0.16);
}
.auth-error {
  margin: 0; font-size: 13.5px; font-weight: 500; color: #B42318;
  background: #FEF3F2; border: 1px solid #FDA29B; border-radius: 10px; padding: 9px 12px;
}
.auth-error[hidden] { display: none; }
.auth-submit { width: 100%; justify-content: center; margin-top: 2px; }
.auth-submit:hover { background: var(--brand-dark); }
.auth-submit:disabled { opacity: .6; cursor: default; }
.auth-switch {
  display: inline-block; width: 100%; margin-top: 16px; font: inherit; font-size: 13.5px; font-weight: 600;
  color: var(--brand-dark); background: transparent; border: none; cursor: pointer; padding: 4px;
}
.auth-switch:hover { text-decoration: underline; }

/* Toast (nenametljiva poruka o grešci prijave) */
.auth-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70;
  max-width: calc(100% - 32px);
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 500;
  padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow);
}
.auth-toast[hidden] { display: none; }
body.modal-open { overflow: hidden; }

/* ---------- Segmentni izbor tipa naloga (u registraciji) ---------- */
#authAcctField[style*="none"] { display: none; }
.seg {
  display: flex; gap: 6px; background: var(--bg-soft);
  border: 1px solid var(--border); border-radius: 12px; padding: 4px;
}
.seg-btn {
  flex: 1 1 0; min-width: 0; font: inherit; font-size: 13.5px; font-weight: 600;
  color: var(--text); background: transparent; border: none; border-radius: 9px;
  padding: 9px 8px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background .15s ease, color .15s ease;
}
.seg-btn.is-active { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }

/* ---------- Prebacivač Igra↔Roditelj (header) ---------- */
.view-switch {
  display: inline-flex; gap: 3px; background: var(--bg-soft);
  border: 1px solid var(--border); border-radius: 999px; padding: 3px;
}
.view-switch[hidden] { display: none; }
.vm-btn {
  font: inherit; font-size: 13px; font-weight: 600; color: var(--text);
  background: transparent; border: none; border-radius: 999px;
  padding: 6px 12px; cursor: pointer; white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.vm-btn.is-active { background: var(--brand); color: #fff; }
/* Kad je prijavljen, „Start free" nije potreban — oslobodi mesto u zaglavlju. */
body.is-signed-in .header-actions > a.btn-primary { display: none; }

/* ---------- Roditeljski panel ---------- */
#parentPanel { display: none; }
body.parent-view #parentPanel { display: block; }
/* U roditeljskom režimu sakrij marketing/katalog sekcije. */
body.parent-view .hero,
body.parent-view #getapp,
body.parent-view #how,
body.parent-view #controls,
body.parent-view #catalog,
body.parent-view #faq,
body.parent-view .install-band,
body.parent-view .section:has(.cta-band) { display: none; }
/* Širok, centriran dashboard (dizajn 1c) — koristi punu širinu ekrana. */
.pp-wrap { max-width: 1200px; }
.pp-wrap .pp-head { max-width: none; margin: 0 0 22px; text-align: left; }
.pp-head h2 { font-size: 30px; }
.pp-head p { color: var(--muted); margin-top: 10px; }
.pp-error { max-width: 560px; margin: 0 auto 20px; }
.pp-empty { text-align: center; color: var(--muted); font-size: 15px; padding: 24px 0; }

/* Red dece: pilule-tabovi (izbor deteta) + „Dodaj dete" desno. */
.pp-childbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.pp-childbar[hidden] { display: none; }
.pp-child-tabs { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.pp-child-tab {
  display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--text); background: #fff; border: 1.5px solid var(--border); border-radius: 999px;
  padding: 6px 15px 6px 6px; cursor: pointer; white-space: nowrap;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.pp-child-tab:hover { border-color: var(--accent); }
.pp-child-tab.is-active { border-color: var(--brand); color: var(--ink); }
.pp-tab-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
  background: var(--brand-light); display: grid; place-items: center; font-size: 15px; line-height: 1;
}
.pp-tab-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; }
.pp-add-btn { margin-left: auto; flex: 0 0 auto; }

/* Dashboard: vertikalne sekcije. */
.pp-dash { display: flex; flex-direction: column; gap: 16px; }
.pp-dash[hidden] { display: none; }

/* Summary kartice (4 u redu na desktopu). */
.pp-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pp-sum-card {
  display: block; text-align: left; width: 100%; font: inherit;
  background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 15px 17px;
}
.pp-sum-card.is-clickable { cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.pp-sum-card.is-clickable:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.pp-sum-card.is-soon { opacity: .7; }
.pp-sum-label { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.pp-sum-value { font-size: 20px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.pp-sum-value.pp-sum-soonval { color: var(--muted); font-size: 16px; }
.pp-sum-used { font-size: 13px; font-weight: 500; color: var(--brand); }
.pp-sum-days { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 2px; }
.pp-day-sq {
  width: 28px; height: 28px; border-radius: 8px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 600; background: #EEF3F1; color: var(--muted);
}
.pp-day-sq.is-on { background: var(--brand); color: #fff; }

/* Editor pravila (otvoren na klik summary kartice / „Izmeni pravila"). */
.pp-rules-editor {
  background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px;
}
.pp-rules-editor[hidden] { display: none; }
.pp-rules-editor .child-rules { border-top: none; padding-top: 0; }

/* Tabela/lista igrica za izabrano dete. */
.pp-games-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.pp-games-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px;
  padding: 14px 20px; border-bottom: 1px solid var(--border-soft);
}
.pp-games-title { font-size: 15px; font-weight: 700; color: var(--ink); }
.pp-games-count { font-weight: 500; color: var(--muted); }
.pp-games-note { font-size: 12px; color: var(--muted); }
.pp-games-list { display: flex; flex-direction: column; }
.pp-game-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 20px;
  border-bottom: 1px solid var(--border-soft);
}
.pp-game-row:last-child { border-bottom: none; }
.pp-game-cover { flex: 0 0 auto; width: 46px; height: 34px; border-radius: 8px; background: linear-gradient(135deg,#5DCAA5,#0F6E56); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.pp-game-name {
  flex: 0 1 auto; min-width: 60px; max-width: 220px; font-size: 14.5px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pp-game-age { flex: 0 0 auto; font-size: 12px; font-weight: 600; color: var(--muted); background: #F2F5F4; border-radius: 8px; padding: 3px 9px; }
.pp-game-spacer { flex: 1 1 auto; min-width: 8px; }

/* Toggle Dozvoljeno/Blokirano (44×24, zeleno=on). */
.pp-toggle {
  position: relative; flex: 0 0 auto; width: 44px; height: 24px; border-radius: 999px;
  border: none; padding: 0; cursor: pointer; background: #D5DDE5; transition: background .15s ease;
}
.pp-toggle.is-on { background: var(--brand); }
.pp-toggle-knob {
  position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: left .15s ease;
}
.pp-toggle.is-on .pp-toggle-knob { left: 23px; }
.pp-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Per-igrica maksimum (min): usko polje + jedinica; aktivno samo kad je dozvoljeno. */
.pp-game-max { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; margin: 0; }
.pp-game-max-input {
  width: 58px; padding: 6px 8px; font: inherit; font-size: 13.5px; text-align: center;
  border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--ink);
  -moz-appearance: textfield;
}
.pp-game-max-input::-webkit-outer-spin-button,
.pp-game-max-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pp-game-max-input:disabled { background: #F2F5F4; color: var(--muted); opacity: .6; cursor: not-allowed; }
.pp-game-max-input:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.pp-game-max-unit { font-size: 12px; color: var(--muted); }

/* Kompaktna kontrola „Dani" po igrici — čip; „Prati dane deteta" ili sažetak dana. */
.pp-game-days-btn {
  flex: 0 1 auto; min-width: 0; max-width: 148px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--brand-dark);
  background: var(--brand-light); border: 1px solid #CBEBD8; border-radius: 999px;
  padding: 6px 12px; cursor: pointer; transition: background .15s ease, border-color .15s ease;
}
.pp-game-days-btn:hover:not(:disabled) { border-color: var(--brand); }
.pp-game-days-btn.is-follow { color: var(--muted); background: var(--bg-soft); border-color: var(--border-soft); font-weight: 500; }
.pp-game-days-btn.is-open { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-light); }
.pp-game-days-btn:disabled { opacity: .45; cursor: not-allowed; }
.pp-game-days-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Mini-editor „Dani" po igrici — red ispod reda igrice; prelama se na telefonu. */
.pp-gd-pop {
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px 20px 16px; background: var(--bg-soft);
  border-bottom: 1px solid var(--border-soft);
}
.pp-gd-head { font-size: 13px; font-weight: 700; color: var(--ink); }
.pp-gd-follow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); cursor: pointer; }
.pp-gd-follow input { width: 16px; height: 16px; accent-color: var(--brand); flex: 0 0 auto; cursor: pointer; }
.pp-gd-days { display: flex; flex-wrap: wrap; gap: 6px; }
.pp-gd-days.is-disabled { opacity: .4; pointer-events: none; }
.pp-gd-day {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; cursor: pointer;
  background: #fff; border: 1px solid var(--border-soft); border-radius: 999px; padding: 5px 11px;
}
.pp-gd-day input { width: 15px; height: 15px; accent-color: var(--brand); flex: 0 0 auto; cursor: pointer; }
.pp-gd-day:has(input:checked) { background: var(--brand-light); border-color: #CBEBD8; font-weight: 600; }
.pp-gd-actions { display: flex; gap: 8px; }
.pp-gd-actions .btn { padding: 7px 16px; font-size: 13px; }

/* Kratko objašnjenje ispod „Ukupno dnevno vreme" vrednosti. */
.pp-sum-hint { display: block; margin-top: 5px; font-size: 11.5px; font-weight: 500; color: var(--muted); line-height: 1.3; }

/* Akcije dashboard-a: start dečji režim, izmeni pravila, izmeni/obriši dete. */
.pp-dash-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.pp-actions-spacer { flex: 1 1 auto; }
.pp-start-hint { flex-basis: 100%; margin: 0; text-align: left; }

/* Ikonična dugmad (izmeni/obriši dete, PIN akcije). */
.pp-icon-btn {
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--brand-dark);
  background: var(--brand-light); border: 1px solid #CBEBD8; border-radius: 9px;
  padding: 8px 12px; cursor: pointer; white-space: nowrap;
}
.pp-icon-btn:hover { background: #D6F0E4; }
.pp-icon-btn.danger { color: #B42318; background: #FEF3F2; border-color: #FDA29B; }
.pp-icon-btn.danger:hover { background: #FEE4E2; }
.cg-title { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin-bottom: 10px; }
.pp-add-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 22px; max-width: 560px; margin: 0 auto;
}
.pp-add-card h3 { font-size: 18px; margin-bottom: 16px; }
.pp-form { display: flex; flex-direction: column; gap: 14px; }
.pp-field { display: flex; flex-direction: column; gap: 6px; }
.pp-field-age .auth-input { max-width: 140px; }
.avatar-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.avatar-opt {
  width: 42px; height: 42px; border-radius: 12px; border: 2px solid var(--border);
  background: var(--bg-soft); font-size: 22px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; transition: border-color .15s ease, background .15s ease;
}
.avatar-opt:hover { border-color: var(--accent); }
.avatar-opt.is-active { border-color: var(--brand); background: var(--brand-light); }
.pp-form-actions { display: flex; gap: 10px; margin-top: 4px; }
.pp-form-actions .btn { flex: 0 0 auto; }

/* ---------- Pravila po detetu (limit + prozor + dani) ---------- */
.child-rules { border-top: 1px solid var(--border-soft); padding-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.cr-row { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.cr-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.cr-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cr-limit { width: 96px; max-width: 100%; padding: 8px 10px; font-size: 14px; }
.cr-time {
  font: inherit; font-size: 14px; color: var(--ink); background: #fff;
  border: 1px solid var(--border); border-radius: 10px; padding: 7px 9px; max-width: 100%; min-width: 0;
}
.cr-time:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 110, 86, 0.16); }
.cr-time:disabled, .cr-limit:disabled { opacity: .5; }
.cr-dash { color: var(--muted); }
.cr-toggle, .cr-day {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink);
  background: var(--bg-soft); border: 1px solid var(--border-soft); border-radius: 999px;
  padding: 6px 10px; cursor: pointer; white-space: nowrap;
}
.cr-toggle input, .cr-day input { width: 16px; height: 16px; accent-color: var(--brand); flex: 0 0 auto; cursor: pointer; }
.cr-toggle:has(input:checked), .cr-day:has(input:checked) { background: var(--brand-light); border-color: #CBEBD8; font-weight: 600; }
.cr-days { display: flex; flex-wrap: wrap; gap: 6px; }
.cr-error { margin: 0; }
.cr-save { align-self: flex-start; padding: 9px 16px; font-size: 14px; }

/* ---------- Roditeljski PIN ---------- */
.pp-pin-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 22px; max-width: 560px; margin: 18px auto 0;
}
.pp-pin-card h3 { font-size: 18px; margin-bottom: 6px; }
.pp-pin-hint { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; }
.pp-pin-body { display: flex; flex-direction: column; gap: 12px; }
.pp-pin-status { margin: 0; font-size: 15px; font-weight: 700; color: var(--brand-dark); }
.pp-pin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-pin-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pp-pin-input { width: 150px; max-width: 100%; letter-spacing: 3px; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, var(--bg-tint), #fff 70%); }
.hero .container { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  color: var(--brand-dark); background: var(--brand-light); border: 1px solid #CBEBD8;
  padding: 6px 12px; border-radius: 999px;
}
.hero h1 { font-size: 46px; font-weight: 700; margin: 18px 0 14px; letter-spacing: -0.5px; }
.hero .lead { font-size: 18px; color: var(--text); max-width: 30em; }
.hero .cta-row { display: flex; gap: 12px; margin: 26px 0 14px; flex-wrap: wrap; }
.micro { font-size: 13.5px; color: var(--muted); }
.micro b { color: var(--brand-dark); font-weight: 600; }

/* Hero floating cards */
.hero-visual { position: relative; min-height: 340px; }
.float-card {
  position: absolute; background: #fff; border: 1px solid var(--border);
  border-radius: 20px; box-shadow: var(--shadow); padding: 16px;
}
.fc-catalog { inset: 0 30px 60px 0; }
.fc-catalog h4 { font-family: var(--font-play); color: var(--ink); font-size: 15px; margin-bottom: 10px; }
.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-game { border-radius: 12px; padding: 8px 6px; text-align: center; background: var(--cream); }
.mini-cover { height: 42px; border-radius: 8px; margin-bottom: 6px; }
.mini-game span { font-size: 11px; color: var(--ink); font-weight: 600; }
.fc-rules { right: 0; bottom: 0; width: 230px; background: #fff; }
.fc-rules .rules-head { font-family: var(--font-play); color: var(--ink); font-weight: 600; margin-bottom: 10px; }
.rule { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 6px 0; border-top: 1px solid var(--border-soft); }
.rule .k { color: var(--muted); }
.rule .v { color: var(--brand-dark); font-weight: 600; }
.switch { width: 40px; height: 22px; border-radius: 999px; background: var(--brand); position: relative; }
.switch::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; top: 3px; right: 3px; }

/* ---------- Install band (na telefonu) ---------- */
.install-band { background: var(--brand-light); }
.install-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.install-text { flex: 1 1 320px; }
.install-text h2 { font-size: 28px; }
.install-text p { color: var(--text); margin: 8px 0 18px; font-size: 16px; }
.install-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ios-hint { font-size: 13.5px; color: var(--brand-dark); }
.install-qr { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.install-qr .qr-box { background: #fff; padding: 12px; border-radius: 16px; box-shadow: var(--shadow-sm); }
.install-qr .qr-box img { display: block; width: 150px; height: 150px; image-rendering: pixelated; }
.install-qr > span { font-size: 13px; color: var(--brand-dark); font-weight: 600; }

/* ---------- How it works ---------- */
.center-title { text-align: center; max-width: 40em; margin: 0 auto 44px; }
.center-title h2 { font-size: 32px; }
.center-title p { color: var(--muted); margin-top: 10px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { text-align: center; padding: 8px; }
.step .num { width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; display: grid; place-items: center; margin: 0 auto 14px; }
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--text); font-size: 15px; }

/* ---------- Controls grid ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm);
}
.card .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-light); color: var(--brand-dark);
  display: grid; place-items: center; margin-bottom: 12px; font-size: 20px; }
.card h3 { font-size: 17px; margin-bottom: 6px; }
.card p { font-size: 14.5px; color: var(--text); }

/* ---------- Catalog ---------- */
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.game-card {
  background: #fff; border: 1px solid var(--border); border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .12s ease, box-shadow .12s ease;
}
.game-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.game-cover { height: 130px; background: linear-gradient(135deg, var(--accent), var(--brand)); position: relative; }
.game-cover .ball { position: absolute; width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #fff, var(--brand-dark)); left: 50%; top: 50%; transform: translate(-50%,-50%);
  box-shadow: 0 4px 10px rgba(0,0,0,.25); }
.game-body { padding: 16px; }
.game-body h3 { font-size: 18px; }
.game-body p { font-size: 13.5px; color: var(--muted); margin: 4px 0 14px; }
.game-body .row { display: flex; align-items: center; justify-content: space-between; }
.age-chip { font-size: 12px; font-weight: 600; color: var(--brand-dark); background: var(--brand-light); padding: 4px 10px; border-radius: 999px; }

/* ---------- Trust ---------- */
.trust { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.trust-card { border-radius: var(--radius); padding: 26px; border: 1px solid; }
.trust-green { background: #F0FAF4; border-color: #CBEBD8; }
.trust-blue { background: #F5F8FC; border-color: #D8E4F0; }
.trust-card .ico { font-size: 26px; margin-bottom: 12px; }
.trust-card h3 { font-size: 19px; margin-bottom: 8px; }
.trust-card p { color: var(--text); font-size: 15px; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--brand-dark); color: #fff; border-radius: 22px; padding: 44px; text-align: center; }
.cta-band h2 { color: #fff; font-size: 30px; }
.cta-band p { color: #CFE9DE; margin: 10px 0 22px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #C6D6CF; padding: 44px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
.site-footer h4 { color: #fff; font-size: 14px; margin-bottom: 12px; text-transform: uppercase; letter-spacing: .5px; }
.site-footer a { display: block; color: #B7CBC3; font-size: 14px; padding: 4px 0; }
.site-footer a:hover { color: #fff; }
.footer-brand .logo { color: #fff; margin-bottom: 10px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 28px; padding-top: 18px; font-size: 13px; color: #93AAA1; }

/* ---------- App mode: instalirana PWA = launcher sa igricama (ne marketing) ---------- */
.app-mode .hero,
.app-mode #getapp,
.app-mode #how,
.app-mode #controls,
.app-mode #faq,
.app-mode .nav,
.app-mode .section:has(.cta-band) { display: none; }
.app-mode .header-actions .btn-ghost,
.app-mode .header-actions .btn-primary,
.app-mode .header-actions [data-install] { display: none; }
.app-mode #catalog { padding-top: 26px; }

/* ---------- Dečji režim (kid-mode) + izlaz PIN-om ---------- */
#kidView { display: none; }
/* Kad je aktivan dečji režim: sakrij SVE osim dečjeg prikaza i PIN modala. */
body.kid-mode { overflow-x: hidden; }
body.kid-mode > *:not(#kidView):not(#kidPinModal) { display: none !important; }
body.kid-mode #kidView { display: block; }

.kid-view {
  min-height: 100vh; min-height: 100dvh; width: 100%; max-width: 100%; overflow-x: hidden;
  background: linear-gradient(180deg, var(--brand-light), #fff 62%);
  padding-top: env(safe-area-inset-top);
}
.kid-inner { width: 100%; max-width: 940px; margin: 0 auto; padding: 24px 18px 48px; }
.kid-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.kid-profile { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1 1 auto; }
.kid-id { min-width: 0; }
.kid-avatar {
  width: 68px; height: 68px; border-radius: 50%; flex: 0 0 auto;
  background: #fff; border: 3px solid var(--brand); box-shadow: var(--shadow-sm);
  display: grid; place-items: center; font-size: 38px; line-height: 1;
}
.kid-welcome { margin: 0; font-size: 15px; font-weight: 600; color: var(--brand-dark); }
.kid-nick {
  font-family: var(--font-play); font-size: 30px; color: var(--ink); margin: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 62vw;
}
.kid-exit-btn {
  flex: 0 0 auto; font: inherit; font-size: 15px; font-weight: 700; color: #fff;
  background: var(--brand); border: none; border-radius: 999px; padding: 12px 22px;
  cursor: pointer; box-shadow: var(--shadow-sm); margin-left: auto;
}
.kid-exit-btn:hover { background: var(--brand-dark); }
.kid-remaining-chip {
  display: inline-block; margin-bottom: 18px; font-size: 14px; font-weight: 600;
  color: var(--brand-dark); background: #fff; border: 1px solid #CBEBD8;
  border-radius: 999px; padding: 8px 15px;
}
.kid-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.kid-tile {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border);
  border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-sm); cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.kid-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.kid-tile-cover { height: 100px; display: grid; place-items: center; font-size: 44px; }
.kid-tile-name {
  padding: 12px 10px; text-align: center; font-family: var(--font-play);
  font-size: 17px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.kid-locked {
  text-align: center; background: #fff; border: 1px solid var(--border); border-radius: 20px;
  box-shadow: var(--shadow-sm); padding: 46px 22px; max-width: 460px; margin: 24px auto 0;
}
.kid-lock-ico { font-size: 54px; line-height: 1; }
.kid-locked h2 { font-size: 24px; margin: 14px 0 8px; }
.kid-locked p { color: var(--text); font-size: 16px; margin: 0; }

/* PIN modal (start + izlaz) */
.kid-pin-modal { position: fixed; inset: 0; z-index: 80; }
.kid-pin-modal[hidden] { display: none; }
.kid-pin-modal:not([hidden]) {
  display: flex; align-items: center; justify-content: center;
  background: rgba(15, 58, 49, 0.5); padding: 20px;
}
.kid-pin-dialog {
  position: relative; width: 100%; max-width: 320px; background: #fff;
  border-radius: 20px; box-shadow: var(--shadow); padding: 30px 22px 22px; text-align: center;
}
.kid-pin-dialog h2 { font-size: 20px; margin-bottom: 16px; }
.kid-pin-dialog .auth-input { text-align: center; letter-spacing: 6px; font-size: 22px; }
#kidPinSubmit { width: 100%; justify-content: center; margin-top: 14px; }
#kidPinError { margin-top: 12px; text-align: left; }

/* Dugme „Pokreni dečji režim" u kartici deteta */
.child-start { width: 100%; justify-content: center; margin-top: 4px; }
.child-start:disabled { opacity: .55; cursor: default; }
.child-start-hint { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); text-align: center; }

/* ---------- Responsive ---------- */
/* Nav se sakriva kad nema mesta (duži jezici traže više prostora u zaglavlju). */
@media (max-width: 1100px) { .nav { display: none; } }
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { min-height: 300px; margin-top: 10px; }
  .steps, .grid-3, .trust, .footer-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  /* Summary kartice: 2 u redu na tabletu. */
  .pp-summary { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .section { padding: 48px 0; }
  .header-actions .btn-ghost { display: none; }
  .cta-band { padding: 30px 20px; }
  /* Kompaktan prebacivač da zaglavlje ne prelije na uskom telefonu (R14). */
  .vm-btn { padding: 6px 9px; font-size: 12px; }
  .pp-head h2 { font-size: 25px; }
  /* Summary kartice u jednu kolonu; „Dodaj dete" ispod tabova. */
  .pp-summary { grid-template-columns: 1fr; }
  .pp-add-btn { margin-left: 0; }
  /* Red igrice na uskom telefonu: naziv ellipsis + kompaktno max polje + toggle. */
  .pp-game-row { padding: 12px 14px; gap: 8px; }
  .pp-game-cover, .pp-game-age { display: none; }
  .pp-game-name { max-width: none; }
  .pp-games-head { padding: 14px 14px; }
  .pp-game-max { gap: 3px; }
  .pp-game-max-input { width: 46px; padding: 6px 4px; font-size: 13px; }
  .pp-game-max-unit { font-size: 11px; }
  /* „Dani" čip uži na telefonu (ellipsis) da red ne prelije na 360px. */
  .pp-game-days-btn { max-width: 96px; padding: 6px 9px; font-size: 12px; }
  .pp-gd-pop { padding: 12px 14px 14px; }
  .pp-gd-actions .btn { flex: 1 1 auto; }
}

/* --- Filter kataloga po kategoriji (čipovi) --- */
.cat-filter { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 0 22px; }
.cat-chip {
  border: 1px solid rgba(15, 110, 86, .28); background: #fff; color: #0F6E56;
  border-radius: 999px; padding: 7px 14px; font: inherit; font-size: .92rem; font-weight: 600;
  cursor: pointer; transition: background .15s, color .15s, border-color .15s; -webkit-tap-highlight-color: transparent;
}
.cat-chip:hover { background: #E1F5EE; }
.cat-chip.is-active { background: #0F6E56; color: #fff; border-color: #0F6E56; }
.cat-chip .cat-star { margin-left: 6px; opacity: .7; font-size: .95em; line-height: 1; }
.cat-chip .cat-star.is-fav { opacity: 1; color: #F3A712; }
.cat-chip.is-active .cat-star { color: #FFD466; opacity: 1; }
/* Srce (favorit) na kartici igrice */
.fav-heart {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255, 255, 255, .82); color: #A32D2D; font-size: 18px; line-height: 1;
  display: flex; align-items: center; justify-content: center; padding: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25); transition: transform .12s, background .12s;
  -webkit-tap-highlight-color: transparent;
}
.fav-heart:hover { transform: scale(1.1); }
.fav-heart.is-fav { color: #E0245E; background: #fff; }
