/* ===== RESET ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ===== TĚLO STRÁNKY ===== */
body {
  font-family: Arial, Helvetica, sans-serif;
  background: radial-gradient(circle at top, #111, #000);
  color: #ddd;
  line-height: 1.6;
  padding-top: 60px;
  overflow-x: hidden;
}

/* ===== TEMNÝ POHYB POZADÍ ===== */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 40%, rgba(255,255,255,0.03), transparent 60%);
  animation: bgMove 8s linear infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes bgMove {
  from { background-position: 0 0; }
  to { background-position: 400px 400px; }
}

/* ===== HORNÍ MENU ===== */
#horni-menu {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(0,0,0,0.9);
  border-bottom: 2px solid #222;
  z-index: 1000;
}

#horni-menu ul {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 15px;
  gap: 30px;
}

#horni-menu a {
  color: #ccc;
  text-decoration: none;
  font-weight: bold;
  letter-spacing: 2px;
  transition: 0.3s;
}

#horni-menu a:hover {
  color: white;
  text-shadow: 0 0 10px white;
}

/* ===== HLAVIČKA ===== */
header {
  text-align: center;
  padding: 50px 20px;
  background: linear-gradient(to bottom, #111, #000);
  border-bottom: 2px solid #222;
}

header h1 {
  font-size: 2.5em;
  letter-spacing: 4px;
  text-shadow: 0 0 20px black;
}

/* ===== HLAVNÍ OBSAH ===== */
main {
  max-width: 1100px;
  margin: auto;
  padding: 30px 20px;
}

/* ===== SEKCE ===== */
section {
  background: rgba(20,20,20,0.9);
  margin-bottom: 40px;
  padding: 25px;
  border-radius: 15px;
  border: 1px solid #222;
  box-shadow: 0 0 20px rgba(0,0,0,0.8);
  transition: 0.3s;
}

section:hover {
  transform: scale(1.01);
  box-shadow: 0 0 40px rgba(0,0,0,1);
}

/* ===== NADPISY ===== */
h2 {
  margin-bottom: 15px;
  color: #fff;
  letter-spacing: 2px;
  border-bottom: 2px solid #222;
  padding-bottom: 5px;
}

/* ===== TEXT ===== */
p {
  margin-bottom: 15px;
  color: #bbb;
}

/* ===== OBRÁZKY ===== */
.obrazek {
  max-width: 100%;
  border-radius: 15px;
  transition: 0.4s;
  filter: brightness(0.9) contrast(1.1);
}

.obrazek:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* ===== FIGURE ===== */
figure {
  text-align: center;
  margin-bottom: 20px;
}

figcaption {
  font-size: 0.85em;
  color: #777;
  margin-top: 5px;
}

/* ===== SEZNAMY ===== */
ul, ol {
  padding-left: 20px;
}

li {
  margin-bottom: 8px;
}

/* ===== TABULKA ===== */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

th, td {
  border: 1px solid #333;
  padding: 10px;
  text-align: center;
}

th {
  background: #111;
  color: white;
}

tr:nth-child(even) {
  background: rgba(255,255,255,0.03);
}

/* ===== GALERIE ===== */
.galerie {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.galerie img {
  cursor: pointer;
  box-shadow: 0 0 20px black;
}

/* ===== OVERLAY GALERIE ===== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3000;
  animation: fadeIn 0.3s;
}

.overlay.hidden {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.overlay img {
  max-width: 90%;
  max-height: 90%;
  box-shadow: 0 0 50px black;
}

/* ===== OVLÁDÁNÍ GALERIE ===== */
.nav, .close {
  position: absolute;
  color: white;
  font-size: 45px;
  cursor: pointer;
  user-select: none;
  opacity: 0.8;
  transition: 0.2s;
}

.nav:hover, .close:hover {
  opacity: 1;
}

#prev { left: 30px; }
#next { right: 30px; }
.close { top: 20px; right: 30px; }

/* ===== PATIČKA ===== */
footer {
  text-align: center;
  padding: 20px;
  background: #000;
  color: #666;
  letter-spacing: 3px;
  border-top: 1px solid #222;
  /* ===== SCÉNA ===== */
.scene {
  position: relative;
  height: 200px;
  margin-top: 60px;
  overflow: hidden;
}

/* ===== STICKMAN ===== */
.stickman {
  position: absolute;
  left: -60px;
  bottom: 20px;
  width: 40px;
  height: 120px;
  animation: walk 6s linear infinite;
}

/* ===== HLAVA ===== */
.head {
  width: 30px;
  height: 30px;
  border: 3px solid cyan;
  border-radius: 50%;
  margin: auto;
}

/* ===== TĚLO ===== */
.body {
  width: 4px;
  height: 40px;
  background: cyan;
  margin: auto;
}

/* ===== RUCE ===== */
.arm {
  width: 30px;
  height: 4px;
  background: cyan;
  position: absolute;
  top: 45px;
  transform-origin: left center;
}

.arm.left {
  left: 20px;
  animation: armLeft 1s infinite alternate;
}

.arm.right {
  left: 20px;
  animation: armRight 1s infinite alternate;
}

/* ===== NOHY ===== */
.leg {
  width: 35px;
  height: 4px;
  background: cyan;
  position: absolute;
  top: 85px;
  transform-origin: left center;
}

.leg.left {
  left: 20px;
  animation: legLeft 1s infinite alternate;
}

.leg.right {
  left: 20px;
  animation: legRight 1s infinite alternate;
}

/* ===== ANIMACE ===== */
@keyframes walk {
  from { left: -60px; }
  to { left: 100%; }
}

@keyframes armLeft {
  from { transform: rotate(30deg); }
  to { transform: rotate(-30deg); }
}

@keyframes armRight {
  from { transform: rotate(-30deg); }
  to { transform: rotate(30deg); }
}

@keyframes legLeft {
  from { transform: rotate(-40deg); }
  to { transform: rotate(40deg); }
}

@keyframes legRight {
  from { transform: rotate(40deg); }
  to { transform: rotate(-40deg); }
}

}
