* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  height: 100vh;
  background-color: #f6fdf4;
  color: #2e4d2e;
}

header {
  background-color: #3b7d3b;
  color: white;
  padding: 20px;
  font-size: 24px;
  position: relative;
  overflow: hidden;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

#tekst {
  white-space: nowrap;
  font-size: 28px;
  user-select: none;
  will-change: transform;
}

nav {
  background-color: #a7d7a7;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  padding: 10px;
}

nav button {
  background-color: #dff0df;
  border: 2px solid #8bbf8b;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

nav button:hover {
  background-color: #bde5bd;
  transform: scale(1.05);
  border-color: #6ba86b;
}

nav a {
  text-decoration: none;
}

main {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background-color: #f6fdf4;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding-bottom: 55px;
}

.glowny {
  background-color: #ffffff;
  border: 2px solid #8bbf8b;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: bold;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  font-family: cursive;
  padding: 25px;
  line-height: 1.5;
  color: #2e4d2e;
}

.glowny:hover {
  background-color: #effaf0;
  transform: scale(1.01);
  border-color: #6ba86b;
}

.siatka {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px;
}

.box {
  background-color: #ffffff;
  border: 2px solid #cfe1cf;
  border-radius: 20px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  transition: all 0.3s ease;
  color: #2e4d2e;
  user-select: none;
}

.box:hover {
  background-color: #e4f7e4;
  transform: scale(1.03);
  border-color: #8bbf8b;
}

footer {
    background-color: #3b7d3b;
    color: white;
    padding: 15px 25px;
    position: fixed;
    bottom: 0;
    width: 100%;
    font-size: 14px;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  footer h4 {
    margin: 0;
    font-family: Arial, sans-serif;
    font-weight: normal;
  }

  footer .admin-btn {
    position: absolute;
    right: 25px;
    background-color: #8bbf8b;
    border: none;
    border-radius: 10px;
    padding: 8px 16px;
    color: white !important;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
  }

  footer .admin-btn:hover {
    background-color: #6ba86b;
    transform: scale(1.05);
  }

@media (max-width: 900px) {
  main {
    padding: 15px;
  }

  .glowny {
    font-size: 20px;
    padding: 20px;
  }

  .box {
    height: 170px;
    font-size: 18px;
  }
}

@media (max-width: 600px) {
  nav button {
    flex: 1 1 100%;
    max-width: 300px;
    margin: 5px auto;
  }

  .siatka {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .box {
    height: 150px;
    font-size: 16px;
  }

  .glowny {
    font-size: 18px;
    padding: 15px;
  }
}
