body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: linear-gradient(to bottom right, #e0f7f4, #f9f9f9);
  color: #2d3a3a;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* prevents sideways scrolling */
}

main {
  color: #2d3a3a;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 0;
}



/* ===== Main Container ===== */
#form, .articles {
  background: #ffffffcc;
  border-radius: 20px;
  padding: 30px 40px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  text-align: center;
  max-width: 300px;
  width: 100%;
}

h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #236f5f;
  margin-top: 50px;
}

p {
  font-size: 1rem;
  color: #4a4a4a;
  margin-bottom: 1.5rem;
}

/* ===== Form Fields ===== */
label {
  font-weight: 600;
  color: #2c5c52;
  display: block;
  text-align: center;
}

select,
input[type="number"] {
  font-size: 1rem;
  border: 1px solid #b8dcd3;
  border-radius: 8px;
  padding: 8px 12px;
  margin: 5px 0 15px 0;
  background-color: #f9fffd;
  color: #2d3a3a;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

select:focus,
input[type="number"]:focus {
  border-color: #6ec5b8;
  box-shadow: 0 0 5px rgba(110, 197, 184, 0.6);
  outline: none;
}

span {
  margin: 0 6px;
  color: #3a5650;
}

#ageDiv, #speciesDiv {
    text-align: left;
}

/* ===== Submit Button ===== */
button {
  background-color: #6ec5b8;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.1s ease;
}

button:hover {
  background-color: #58b0a5;
}

button:active {
  transform: scale(0.97);
}

/* ===== Result Section ===== */
#result {
  margin-top: 20px;
  margin-bottom: 100px;
  font-size: 1.8rem;
  font-weight: 600;
  color: #2c5c52;
}

/* ===== Articles Section ===== */
.articles {
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
    align-content: space-evenly;
    gap: 30px;
    max-width: 90vw;
    margin: 50px 0;
}

.article {
    border-radius: 5px;
    box-shadow: 0 0 8px 3px rgb(212, 212, 212);
    width: 20vw;
    min-width: 170px;
    max-width: 220px;
    cursor: pointer;
    transition: box-shadow 1s ease;
}

.article:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.856);
}

.article img {
    border-radius: 5px 5px 0 0;
    min-width: 170px;
    max-width: 220px;
    width: 20vw;
}

.article h3 {
    padding: 8px;
}

.articlep {
  display: inline;
  background: #ffffffcc;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  width: 100%;
  text-align: left;
  max-width: 70vw;
  margin: 50px;
  height: auto;
}

.articlep a:hover {
  text-decoration: underline;
}

/* ===== Footer ===== */
footer {
  width: 100%;
  padding: 100px;
  background-color: #236f5ec4;
}

nav {
  display: flex;
  justify-content: center;
  gap: 50px;
  flex-direction: row;
  flex-wrap: wrap;
}

a {
  text-decoration: none;
  font-weight: 500;
  color: black;
}

nav a:hover {
  color: white;
}

/* ===== Cookies ===== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: #222222;
  padding: 1em 1.5em;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
  max-width: 90%;
  z-index: 9999;
  font-size: 0.95em;
  text-align: center;
  display: none;
  animation: fadeIn 0.4s ease;
}

.cookie-banner p {
  color: white;
  font-size: 0.95em;
  padding: 0.5em;
  margin: 0;
}

.cookie-banner p a {
  color: #3b98bd;
}

.cookie-banner p a:hover {
  color: #58b0a5;
}

.cookie-banner button {
  margin-top: 0.7em;
  margin-inline: 0.3em;
  padding: 0.5em 0.9em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9em;
  color: black;
}

.btn-accept { background: #4CAF50; color: white; }
.btn-reject { background: #f44336; color: white; }
.btn-dismiss { background: #2196F3; color: white; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===== Manage Cookies Button ===== */
#manage-cookies {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #333;
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  z-index: 10000;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: background 0.3s ease;
}

#manage-cookies:hover {
  background: #555;
}

.hidden { display: none !important; 
}

td {
  padding-left: 10px;
  padding-right: 10px;
}


/* ===== Menu Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: -35px;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 15px 50px 0 0 ;
  margin-right: 20px;
  z-index: 1000;
}

/* ===== Menu Button ===== */
.menu-btn {
  width: 35px;
  height: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  z-index: 1001;
}

.menu-btn span {
  display: block;
  height: 4px;
  width: 100%;
  background-color: #236f5f;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ===== Menu Hidden Checkbox ===== */
.menu-toggle {
  display: none;
}

/* ===== Menu Navigation Links ===== */
.nav-links {
  position: fixed;
  top: 0;
  right: -260px;
  width: 250px;
  height: 100vh;
  background-color: #f0f8f6;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  transition: right 0.3s ease-in-out;
  box-shadow: -4px 0 10px rgba(0, 0, 0, 0.1);
}

.nav-links li {
  margin: 20px 0;
}

.nav-links a {
  text-decoration: none;
  color: #236f5f;
  font-size: 1.2rem;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: #58b0a5;
}

/* ===== When Menu is Open (checkbox checked) ===== */
.menu-toggle:checked ~ .nav-links {
  right: 0;
}

/* Animate hamburger to X */
.menu-toggle:checked + .menu-btn span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle:checked + .menu-btn span:nth-child(2) {
  opacity: 0;
}

.menu-toggle:checked + .menu-btn span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}


/* ===== Responsive Design ===== */
@media (max-width: 600px) {
  #form {
    padding: 25px;
  }

  h1 {
    font-size: 1.6rem;
  }

  p {
    font-size: 0.95rem;
  }
}