/* ---- Pisava: Baloo 2 (gostimo lokalno, deluje povsod, podpira č š ž) ---- */
@font-face {
  font-family: "Baloo 2"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("assets/fonts/baloo2-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Baloo 2"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("assets/fonts/baloo2-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Baloo 2"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("assets/fonts/baloo2-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Baloo 2"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("assets/fonts/baloo2-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Baloo 2"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("assets/fonts/baloo2-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Baloo 2"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("assets/fonts/baloo2-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* Slog stripa: bel karo papir, svinčnik. */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #d9d6cf;
  font-family: "Baloo 2", "Comic Sans MS", "Marker Felt", cursive, sans-serif;
  color: #2b2b2b;
  -webkit-text-size-adjust: 100%;
}

#wrap {
  max-width: 940px;
  margin: 0 auto;
  padding: 12px;
  text-align: center;
}

#game-title {
  font-size: clamp(20px, 4.5vw, 34px);
  margin: 8px 0 12px;
  color: #1a1a1a;
  text-shadow: 1px 1px 0 #b9e3ff;
  letter-spacing: 1px;
}

#stage {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  border: 3px solid #2b2b2b;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 4px 6px 0 rgba(0,0,0,0.25);
  background: #fdfdf7;
}

canvas#game {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
}

#hint {
  font-size: clamp(11px, 2.5vw, 14px);
  color: #444;
  margin: 12px 6px 4px;
  line-height: 1.7;
}

#hint b { color: #0a6cc2; }

/* =========================================================
   SKUPNA GLAVA
   ========================================================= */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  max-width: 980px;
  margin: 0 auto;
  padding: 10px 14px;
}
.brand {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: #1a1a1a;
}
.brand-mark { font-size: 26px; }
.brand-name { font-weight: bold; font-size: clamp(16px, 3.5vw, 22px); letter-spacing: 1px; }
.header-actions { display: flex; align-items: center; gap: 8px; }

.lang-btn {
  font-family: inherit;
  font-weight: bold;
  cursor: pointer;
  border: 3px solid #2b2b2b;
  background: #fff;
  color: #1a1a1a;
  border-radius: 10px;
  padding: 6px 12px;
  box-shadow: 2px 3px 0 rgba(0,0,0,0.2);
}
.lang-btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(0,0,0,0.2); }

.donate-btn {
  font-family: inherit;
  font-weight: bold;
  cursor: pointer;
  border: 3px solid #2b2b2b;
  background: #ffd400;
  color: #1a1a1a;
  border-radius: 10px;
  padding: 6px 14px;
  box-shadow: 2px 3px 0 rgba(0,0,0,0.25);
}
.donate-btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(0,0,0,0.25); }
.donate-btn.big { font-size: 20px; padding: 12px 26px; }

.share-btn {
  font-family: inherit;
  font-weight: bold;
  cursor: pointer;
  border: 3px solid #2b2b2b;
  background: #fff;
  color: #1a1a1a;
  border-radius: 10px;
  padding: 6px 14px;
  box-shadow: 2px 3px 0 rgba(0,0,0,0.2);
}
.share-btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(0,0,0,0.2); }
.share-btn.big { font-size: 20px; padding: 12px 26px; }

.footer-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* potrditveni oblaček (kopirano) */
.azv-toast {
  position: fixed; left: 50%; bottom: 30px;
  transform: translateX(-50%) translateY(20px);
  background: #1a1a1a; color: #fff;
  padding: 11px 20px; border-radius: 22px;
  font-weight: bold; font-family: inherit;
  opacity: 0; transition: opacity .3s, transform .3s;
  z-index: 10000; box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}
.azv-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.back-link {
  display: inline-block;
  margin: 6px 0 4px;
  color: #0a6cc2;
  text-decoration: none;
  font-weight: bold;
}
.back-link:hover { text-decoration: underline; }

/* =========================================================
   DOMAČA STRAN (hub)
   ========================================================= */
.hub { max-width: 980px; margin: 0 auto; padding: 0 14px 40px; }
.hero { text-align: center; margin: 18px 0 28px; }
.hero h1 {
  font-size: clamp(28px, 7vw, 54px);
  margin: 6px 0;
  text-shadow: 2px 2px 0 #b9e3ff;
  letter-spacing: 1px;
}
.tagline { font-size: clamp(14px, 3vw, 19px); color: #444; margin: 0; }

.block { margin: 26px 0; }
.block h2 {
  text-align: center;
  font-size: clamp(20px, 4.5vw, 30px);
  margin: 0 0 16px;
  color: #1a1a1a;
}

.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.member {
  background: #fdfdf7;
  border: 3px solid #2b2b2b;
  border-radius: 14px;
  box-shadow: 3px 4px 0 rgba(0,0,0,0.2);
  padding: 18px 18px 16px;
  text-align: center;
  width: 200px;
}
.member-photo {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 10px;
  border: 3px solid #2b2b2b;
  border-radius: 50%;
  overflow: hidden;
  background: #e9e6df;
}
.member-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.member-initial {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  font-weight: bold;
  color: #9a958b;
}
.member-name { font-weight: bold; font-size: 19px; }
.member-bio { font-size: 13px; color: #555; margin-top: 6px; line-height: 1.4; }

.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.story-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: #1a1a1a;
  background: #fdfdf7;
  border: 3px solid #2b2b2b;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 4px 5px 0 rgba(0,0,0,0.22);
  transition: transform .08s ease;
}
.story-card:hover { transform: translate(-1px, -2px); }
.story-card:active { transform: translate(1px, 2px); }
.story-cover {
  position: relative;
  height: 150px;
  background-color: #e9e6df;
  background-size: cover;
  background-position: center top;
  border-bottom: 3px solid #2b2b2b;
}
.story-badges {
  position: absolute; top: 8px; left: 8px;
  display: flex; gap: 6px;
}
.story-badge {
  background: #ffd400;
  border: 2px solid #2b2b2b;
  border-radius: 8px;
  font-size: 12px; font-weight: bold;
  padding: 2px 8px;
}
.story-body { padding: 12px 14px 16px; display: flex; flex-direction: column; flex: 1; }
.story-title { margin: 0 0 2px; font-size: 19px; }
.story-author { font-size: 13px; color: #777; margin: 0 0 8px; }
.story-author b { color: #0a6cc2; }
.story-blurb { margin: 0 0 12px; font-size: 14px; color: #555; line-height: 1.4; flex: 1; }
.story-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.story-btn {
  text-decoration: none;
  color: #fff;
  border-radius: 10px;
  padding: 8px 16px;
  font-weight: bold;
}
.story-btn.play { background: #0a6cc2; border: 2px solid #08538f; }
.story-btn.read { background: #2e9e5b; border: 2px solid #227a45; }
.story-btn:active { transform: translate(1px, 1px); }

.story-card.soon {
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(45deg, #f2efe8, #f2efe8 12px, #e9e6df 12px, #e9e6df 24px);
  border-style: dashed;
  min-height: 220px;
  box-shadow: none;
}
.soon-inner { text-align: center; color: #777; font-weight: bold; }
.soon-inner span { display: block; margin-top: 6px; }

/* =========================================================
   NOGA
   ========================================================= */
.site-footer { text-align: center; padding: 24px 14px 40px; }
.site-footer p { color: #666; font-size: 13px; margin-top: 14px; }

/* =========================================================
   DONACIJSKO OKNO
   ========================================================= */
.modal {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 50;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal.open { display: flex; }
.modal-box {
  position: relative;
  background: #fdfdf7;
  border: 3px solid #2b2b2b;
  border-radius: 16px;
  box-shadow: 6px 8px 0 rgba(0,0,0,0.3);
  max-width: 420px;
  width: 100%;
  padding: 22px 22px 26px;
  text-align: center;
}
.modal-box h2 { margin: 0 0 10px; }
.modal-box p { color: #444; line-height: 1.5; }
.modal-x {
  position: absolute; top: 8px; right: 10px;
  border: none; background: none; cursor: pointer;
  font-size: 20px; color: #777;
}
.donate-links { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.donate-link {
  text-decoration: none;
  background: #ffd400;
  border: 3px solid #2b2b2b;
  border-radius: 12px;
  color: #1a1a1a;
  font-weight: bold;
  padding: 12px;
  box-shadow: 2px 3px 0 rgba(0,0,0,0.22);
}
.donate-link:active { transform: translate(1px,1px); }
.donate-bank {
  text-align: left;
  background: #fff;
  border: 2px dashed #2b2b2b;
  border-radius: 10px;
  padding: 12px;
  font-family: "Courier New", monospace;
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 6px 0 12px;
}
.donate-flik {
  background: #e8f9ee;
  border: 3px solid #2e9e5b;
  border-radius: 12px;
  color: #1a5d35;
  font-weight: bold;
  padding: 12px;
  text-align: center;
}
.donate-qr-wrap { text-align: center; margin: 4px 0 16px; }
.qr-label { font-size: 13px; color: #555; margin: 0 0 8px; }
.donate-qr {
  width: 180px; height: 180px;
  border: 3px solid #2b2b2b;
  border-radius: 12px;
  background: #fff;
  padding: 6px;
  box-shadow: 2px 3px 0 rgba(0,0,0,0.18);
}
.ghost-btn {
  font-family: inherit;
  cursor: pointer;
  border: 3px solid #2b2b2b;
  background: #fff;
  border-radius: 10px;
  padding: 8px 18px;
  font-weight: bold;
  box-shadow: 2px 3px 0 rgba(0,0,0,0.18);
}
.ghost-btn:disabled { opacity: 0.4; cursor: default; box-shadow: none; }

/* =========================================================
   STRIP BRALNIK
   ========================================================= */
.reader { max-width: 760px; margin: 0 auto; padding: 0 14px 40px; text-align: center; }
.reader-title { font-size: clamp(20px, 5vw, 30px); margin: 8px 0 2px; }
.reader-author { color: #777; margin: 0 0 14px; font-size: 14px; }
.reader-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.comic-page {
  max-width: 100%;
  max-height: 75vh;
  border: 3px solid #2b2b2b;
  border-radius: 10px;
  background: #fff;
  box-shadow: 4px 6px 0 rgba(0,0,0,0.25);
}
.comic-intro {
  width: 100%;
  max-width: 560px;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #2b2b2b;
  border-radius: 10px;
  background: #fdfdf7;
  box-shadow: 4px 6px 0 rgba(0,0,0,0.25);
  padding: 28px 26px;
}
.intro-inner { text-align: center; max-width: 460px; }
.intro-badge {
  display: inline-block;
  background: #ffd400;
  border: 2px solid #2b2b2b;
  border-radius: 8px;
  font-size: 13px; font-weight: bold;
  padding: 3px 12px;
  margin-bottom: 16px;
}
.intro-text { font-size: clamp(16px, 2.6vw, 19px); line-height: 1.6; color: #2b2b2b; margin: 0 0 22px; }
.intro-start { background: #0a6cc2; color: #fff; border-color: #08538f; }
.nav-arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  border: 3px solid #2b2b2b;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  width: 48px; height: 48px;
  font-size: 26px; font-weight: bold;
  cursor: pointer;
  box-shadow: 2px 3px 0 rgba(0,0,0,0.22);
}
.nav-arrow.left { left: 6px; }
.nav-arrow.right { right: 6px; }
.nav-arrow.disabled { opacity: 0.25; pointer-events: none; }
.reader-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}
.page-ind { font-weight: bold; color: #444; min-width: 70px; }

@media (max-width: 480px) {
  .nav-arrow { width: 40px; height: 40px; font-size: 22px; }
  .member { width: 44%; }
}

/* Na dotik napravah (telefon/tablica) skrij plavajoči puščici —
   za listanje se uporablja drsanje in spodnja gumba naprej/nazaj. */
@media (pointer: coarse) {
  .nav-arrow { display: none; }
}

/* =========================================================
   IGRALNI GUMBI (mobilni) + CELOZASLONSKO
   ========================================================= */
/* akcijska gumba v kotu canvasa — samo na dotik napravah */
.game-controls {
  display: none;
  position: absolute;
  right: 14px; bottom: 14px;
  align-items: flex-end;
  gap: 14px;
  z-index: 5;
}
@media (pointer: coarse) { .game-controls { display: flex; } }
.game-btn {
  border: 3px solid rgba(255,255,255,0.9);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  user-select: none; -webkit-user-select: none;
  touch-action: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  padding: 0; line-height: 1;
}
.game-btn.primary { width: 72px; height: 72px; border-radius: 50%; font-size: 32px; background: rgba(10,108,194,0.6); }
.game-btn.secondary { width: 58px; height: 58px; border-radius: 50%; font-size: 26px; background: rgba(226,59,59,0.55); }
.game-btn:active { transform: scale(0.92); }

/* joystick za premik (spodaj levo) — samo na dotik napravah */
.joystick {
  display: none;
  position: absolute; left: 14px; bottom: 14px;
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(0,0,0,0.28); border: 3px solid rgba(255,255,255,0.55);
  touch-action: none; z-index: 5;
}
@media (pointer: coarse) { .joystick { display: block; } }
.joystick-knob {
  position: absolute; left: 50%; top: 50%;
  width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%;
  background: rgba(255,255,255,0.55); border: 2px solid rgba(255,255,255,0.85);
}
.joy-arrow { position: absolute; color: rgba(255,255,255,0.7); font-size: 15px; line-height: 1; }
.joy-arrow.up { top: 5px; left: 50%; transform: translateX(-50%); }
.joy-arrow.down { bottom: 5px; left: 50%; transform: translateX(-50%); }
.joy-arrow.left { left: 7px; top: 50%; transform: translateY(-50%); }
.joy-arrow.right { right: 7px; top: 50%; transform: translateY(-50%); }
.joystick.vertical .joy-arrow.left, .joystick.vertical .joy-arrow.right { display: none; }

/* gumb za celozaslonsko (pod canvasom) */
.fs-enter { display: inline-block; margin-top: 12px; }

/* izhod iz celozaslonskega (zgoraj desno) */
.fs-exit {
  display: none;
  position: absolute; top: 10px; right: 10px; z-index: 6;
  width: 46px; height: 46px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.9);
  background: rgba(0,0,0,0.5); color: #fff; font-size: 22px; cursor: pointer;
  align-items: center; justify-content: center;
}
body.azv-fs .fs-exit { display: flex; }

/* native celozaslonsko: canvas naj zapolni zaslon (ležeče) */
#stage:fullscreen, #stage:-webkit-full-screen {
  width: 100vw; height: 100vh; max-width: none;
  border: none; border-radius: 0;
  display: flex; align-items: center; justify-content: center; background: #000;
}
#stage:fullscreen canvas, #stage:-webkit-full-screen canvas {
  width: auto; height: 100%; max-width: 100%; max-height: 100%;
}
/* nadomestno celozaslonsko (npr. iPhone, kjer Fullscreen API ni na voljo) */
body.azv-pseudofs { overflow: hidden; }
body.azv-pseudofs #stage {
  position: fixed; inset: 0; z-index: 9999;
  width: 100vw; height: 100vh; max-width: none;
  border: none; border-radius: 0;
  display: flex; align-items: center; justify-content: center; background: #000;
}
body.azv-pseudofs #stage canvas { width: auto; height: 100%; max-width: 100%; max-height: 100%; }
