:root { --hlavicka: #8a4b1f; --pozadie: #f6ead8; --pozadie2: #fff7ec; }
html, body, div, span, h1, h2, h3, h4, h5, h6 {
  border: 0;
  outline: 0;
}

body, div, p {
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  background-color: black;
  font-size: 11px;
  overflow: hidden;
  padding: 0;
  width: 1920px;
  height: 1080px;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

#container {
  position: relative;
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--hlavicka) 0, var(--hlavicka) 190px, var(--pozadie) 190px, var(--pozadie2) 100%);
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: #3b2a6b;
}

#navrat {
  position: absolute;
  top: 35px;
  left: 50px;
  z-index: 40;
  width: 120px;
  height: 120px;
  background-image: url('../images/navrat.png');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

#btn_reset {
  position: absolute;
  left: 220px;
  top: 35px;
  height: 120px;
  width: 120px;
  z-index: 40;
  background-image: url('../images/reload.png');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

#napis {
  position: absolute;
  left: 560px;
  top: 25px;
  height: 140px;
  width: 800px;
  z-index: 40;
}

#hviezdy {
  position: absolute;
  right: 60px;
  top: 50px;
  z-index: 40;
  padding: 0 34px;
  height: 90px;
  font: 900 64px/90px Inter, Arial, Helvetica, sans-serif;
  color: #3b2a6b;
  background: rgba(255, 255, 255, 0.85);
  border: 6px solid #3b2a6b;
  border-radius: 45px;
}
#hviezdy::before {
  content: "\2605";
  color: #ff9d00;
  -webkit-text-stroke: 2px #3b2a6b;
  margin-right: 14px;
}

#zadanie { position: absolute; left: 60px; top: 208px; width: 1200px; white-space: nowrap; overflow: hidden; font: 900 54px/66px Inter, Arial, Helvetica, sans-serif; }

/* pokrok k odznaku: 5 bodiek */
#pokrok { position: absolute; right: 70px; top: 214px; width: 560px; display: flex; justify-content: flex-end; gap: 16px; }
#pokrok span { width: 54px; height: 54px; box-sizing: border-box; border: 6px solid #3b2a6b; border-radius: 50%; background: #fff; transition: background-color 0.3s ease, transform 0.3s ease; }
#pokrok span.hotovo { background: #ffb000; transform: scale(1.15); }

/* odznak po 5 spravnych */
#odznak {
  position: absolute;
  left: 560px;
  top: 300px;
  width: 800px;
  box-sizing: border-box;
  padding: 36px 20px 40px;
  text-align: center;
  font: 900 72px/84px Inter, Arial, Helvetica, sans-serif;
  color: #3b2a6b;
  background: #fff6c9;
  border: 10px solid #ffb000;
  border-radius: 60px;
  box-shadow: 0 16px 0 rgba(0, 0, 0, 0.25);
  z-index: 60;
  display: none;
  animation: hIn 0.5s ease;
}
#odznak .hviezda { display: block; margin: 0 auto 10px; width: 160px; height: 160px; }
@keyframes hIn { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }


#psik { position: absolute; left: 40px; top: 300px; width: 310px; height: 450px; z-index: 3; }
#psik img { width: 100%; height: 100%; object-fit: contain; }
#psik.radost { animation: skok 0.5s ease 2; }
#psik.premysla img { filter: drop-shadow(0 0 22px #ffe600) drop-shadow(0 0 8px #fff); }
@keyframes skok { 0%, 100% { margin-top: 0; } 50% { margin-top: -30px; } }
#doska { position: absolute; left: 420px; top: 218px; width: 800px; height: 800px; box-sizing: border-box; padding: 16px; background: #5a3418; border: 8px solid #3b2a6b; border-radius: 28px; z-index: 3; touch-action: none; }
#polia, #figury { position: absolute; left: 8px; top: 8px; width: 768px; height: 768px; }
#polia .pole { position: absolute; width: 96px; height: 96px; }
#polia .sv { background: #f2d9a8; }
#polia .tm { background: #9b5b2e; }

#polia .moze::after { content: ""; position: absolute; left: 30px; top: 30px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 230, 0, 0.9); box-shadow: 0 0 14px #ffd23f; }
#polia .moze.skok::after { background: rgba(255, 90, 60, 0.95); box-shadow: 0 0 14px #ff5a3c; }
#polia .vybrate { box-shadow: inset 0 0 0 6px #ffe600; }
.fig { position: absolute; width: 96px; height: 96px; box-sizing: border-box; padding: 4px; transition: left 0.3s ease, top 0.3s ease, opacity 0.3s ease, transform 0.2s ease; pointer-events: none; }
.fig svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 6px 4px rgba(0, 0, 0, 0.4)); overflow: visible; }
.fig.zdvih { z-index: 5; transform: scale(1.12); }
.fig.chyt { animation: tep 0.9s ease-in-out infinite; }
@keyframes tep { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.fig.zmizni { opacity: 0; transform: scale(0.3); }
.fig.tahany { transition: none; z-index: 8; transform: scale(1.15); }
#panel { position: absolute; left: 1290px; top: 310px; width: 560px; z-index: 3; font-family: Inter, Arial, sans-serif; color: #3b2a6b; }
#stav { font: 900 54px/64px Inter, Arial, sans-serif; margin-bottom: 30px; min-height: 130px; }
#pocty { font: 800 44px/60px Inter, Arial, sans-serif; }
#pocty span { display: inline-block; vertical-align: middle; width: 40px; height: 40px; border-radius: 50%; border: 5px solid #3b2a6b; margin-right: 12px; box-sizing: border-box; }
#hlaska { position: absolute; left: 1290px; top: 620px; width: 560px; font: 900 44px/54px Inter, Arial, sans-serif; color: #d9372b; z-index: 3; }
#hlaska.dobre { color: #1f9d3d; }
#btn_pravidla { position: absolute; left: 390px; top: 35px; width: 120px; height: 120px; box-sizing: border-box; border: 8px solid #fff; border-radius: 50%; color: #fff; font: 900 80px/100px Inter, Arial, sans-serif; text-align: center; cursor: pointer; z-index: 40; touch-action: manipulation; }
#okno { position: absolute; left: 160px; top: 215px; width: 1600px; height: 790px; box-sizing: border-box; padding: 14px 60px 110px; background: #fff; border: 9px solid #3b2a6b; border-radius: 56px; z-index: 50; display: none; color: #3b2a6b; font-family: Inter, Arial, sans-serif; }
#okno h2 { margin: 0 0 14px; font: 900 64px/76px Inter, Arial, sans-serif; text-align: center; }
#okno .r { margin: 16px 0; font: 800 42px/52px Inter, Arial, sans-serif; }
#okno .ok { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); min-width: 340px; padding: 0 40px; height: 90px; line-height: 76px; text-align: center; font: 900 50px/76px Inter, Arial, sans-serif; color: #fff; background: #1f9d3d; border: 7px solid #17692a; border-radius: 30px; cursor: pointer; touch-action: manipulation; }

.fig.sach svg { filter: drop-shadow(0 5px 4px rgba(0, 0, 0, 0.45)); }
#polia .vcheku { box-shadow: inset 0 0 0 7px #ff3b30, inset 0 0 30px 6px rgba(255, 59, 48, 0.8); }
#okno .pr { display: flex; align-items: center; gap: 28px; margin: 2px 0; font: 800 34px/40px Inter, Arial, sans-serif; }
#okno .pr svg { flex: none; width: 70px; height: 70px; background: #9b5b2e; border-radius: 14px; padding: 6px; box-sizing: border-box; }
#okno .pr b { color: #b87000; }
#okno h2 { margin-bottom: 6px !important; }

.psikfig { position: absolute; left: 248px; top: 302px; width: 104px; height: 104px; z-index: 4; pointer-events: none; transform-origin: 50% 90%; animation: kyvF 2.4s ease-in-out infinite; }
.psikfig svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 5px 4px rgba(0, 0, 0, 0.4)); }
.psikfig .fig { left: 0; top: 0; width: 104px; height: 104px; padding: 0; transition: none; }
@keyframes kyvF { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(5deg); } }
