html, body {
  height: 99%;
}

body {
  display: flex;
  flex-direction: column;
  margin-top: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  justify-content: space-between;
}

.main{
  width: 80%;
  margin: 0 auto;
}

.header a {
  text-decoration: none;
  color: white;
}



.row-1, .row-2, .row-3, .row-4, .row-5, .row-6{
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.row-1 a, .row-2 a, .row-3 a, .row-4 a, .row-5 a, .row-6 a{
  flex-basis: 200px;
  flex-grow: 1;
  border-radius: 8px;
  background: #2563eb;
  border: none;
  color: #FFFFFF;
  font-size: 25px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  margin: 5px;
  text-align: center;
  text-decoration: none;
  padding: 20px 0px 20px 0px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  position: relative;
  overflow: hidden;
}

.row-1 a::before, .row-2 a::before, .row-3 a::before, .row-4 a::before, .row-5 a::before, .row-6 a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.row-1 a:hover, .row-2 a:hover, .row-3 a:hover, .row-4 a:hover, .row-5 a:hover, .row-6 a:hover {
  transform: translateY(-0.5px) scale(1.005);
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.3);
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.row-1 a:hover::before, .row-2 a:hover::before, .row-3 a:hover::before, .row-4 a:hover::before, .row-5 a:hover::before, .row-6 a:hover::before {
  opacity: 0.7;
}

.row-1 a:focus, .row-2 a:focus, .row-3 a:focus, .row-4 a:focus, .row-5 a:focus, .row-6 a:focus {
  outline: none;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3), 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.footer {
  flex-shrink: 0;
  padding: 5px;
  background: #42A5F5;
  color: black;
  background-color: rgb(239, 240, 239);
  border-radius: 4px;
  text-align: center;
  font-size: larger;
  margin-top: 5px;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  flex-basis: 80px;
  display: flex;
  align-items: center;
}


.header {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  color: #ffffff;
  border-radius: 12px;
  text-align: center;
  font-size: 65px;
  padding: 20px;
  letter-spacing: 1px;
  margin-bottom: 5px;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  position: relative;
}

.header a {
  border-radius: 5px;
  padding: 5px;
}

.header .admin-btn {
  position: absolute;
  right: 20px;
  font-size: 24px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  transition: all 0.3s ease;
  opacity: 0.8;
  backdrop-filter: blur(10px);
}

.header .admin-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  opacity: 1;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.header .admin-btn:focus {
  outline: 3px solid #fbbf24;
  outline-offset: 2px;
}


span {
  cursor: pointer;
  transition: 0.5s;
}

span:after {
  content: ' \00bb';
  opacity: 0;
  top: 0;
  right: -20px;
  transition: 0.5s;
}

a:hover span {
  padding-right: 25px;
}

a:hover span:after {
  opacity: 1;
  right: 0;
}

/* Ulazna animacija */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Izlazna animacija */
@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Primjena animacija na element s klasom "main" */
.main {
  animation: fadeIn 0.5s ease-in-out;
}

/* Primjena izlazne animacije pri navigaciji na drugu stranicu */
body.fade-out .main {
  animation: fadeOut 0.5s ease-in-out;
}

/* ========================================
   RESPONSIVE DESIGN - MEDIA QUERIES
   ======================================== */

/* Tablet (768px i manje) */
@media (max-width: 768px) {
  .header {
    font-size: 48px;
    padding: 15px;
    gap: 15px;
  }
  
  .header .admin-btn {
    font-size: 20px;
    padding: 8px 12px;
    right: 15px;
  }
  
  .row-1 a, .row-2 a, .row-3 a, .row-4 a, .row-5 a, .row-6 a {
    font-size: 22px;
    padding: 18px 0;
    flex-basis: 180px;
  }
  
  .main {
    width: 90%;
  }
}

/* Mobile (480px i manje) */
@media (max-width: 480px) {
  .header {
    font-size: 36px;
    padding: 12px;
    gap: 10px;
    border-radius: 8px;
  }
  
  .header .admin-btn {
    font-size: 18px;
    padding: 6px 10px;
    right: 10px;
  }
  
  .row-1 a, .row-2 a, .row-3 a, .row-4 a, .row-5 a, .row-6 a {
    font-size: 20px;
    padding: 16px 10px;
    flex-basis: 100%;
    margin: 5px 0;
  }
  
  .main {
    width: 95%;
  }
  
  .footer {
    font-size: 14px;
    padding: 8px;
  }
}

/* Extra small mobile (360px i manje) */
@media (max-width: 360px) {
  .header {
    font-size: 28px;
    padding: 10px;
  }
  
  .header .admin-btn {
    font-size: 16px;
    padding: 5px 8px;
    right: 8px;
  }
  
  .row-1 a, .row-2 a, .row-3 a, .row-4 a, .row-5 a, .row-6 a {
    font-size: 18px;
    padding: 14px 8px;
  }
}

