/* ================= */
/* APP TITLE & SUBTITLE */
/* ================= */
.app h1 {
    color: black; 
    font-family: 'Caveat', cursive;
    font-size: 60px;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(255,255,255,0.2);
}

.app .subtitle {
    color: #333;
    font-family: 'Caveat', cursive;  
    font-size: 24px;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.1);
}

/* ================= */
/* GLOBAL STYLES */
/* ================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;
  font-family: 'Poppins', sans-serif;
  background:
    linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.75)),
    url("assets/forest.png") center / cover no-repeat;
  color: #fff;
  overflow: hidden;
}

/* ================= */
/* FALLING LEAVES */
/* ================= */
.leaves::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(170,255,170,0.8) 2px, transparent 3px);
  background-size: 140px 140px;
  animation: fall 20s linear infinite;
  pointer-events: none;
}

@keyframes fall {
  from { background-position: 0 -600px; }
  to { background-position: 600px 1200px; }
}

/* ================= */
/* APP LAYOUT */
/* ================= */
.app {
  text-align: center;
  padding-top: 40px;
}

/* ================= */
/* FOREST GRID LAYOUT */
/* ================= */
.forest {
  display: grid;
  grid-template-columns: repeat(6, 1fr); /* 6 animals per row */
  gap: 30px; /* spacing between animal cards */
  justify-items: center; /* center cards in each cell */
  margin: 60px auto 0;
  max-width: 1200px; /* limits forest width */
}

/* Animal cards */
.animal-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.animal-card:hover {
    transform: scale(1.1);
}

/* ================= */
/* CIRCULAR ANIMAL IMAGES */
/* ================= */
.animal-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.3s ease;
}

.animal-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.animal-card:hover .animal-circle {
  box-shadow: 0 0 18px rgba(180,255,180,0.6);
}

.animal-name {
  margin-top: 8px;
  font-size: 16px;
  color: #dfffdc; /* soft forest green for readability */
}

/* ================= */
/* PROFILE, MATCH & SHUFFLE SCREENS */
/* ================= */
.profile,
.match-screen,
.shuffle-screen {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.75);
}

.profile-card,
.match-card {
  background: #1f3d2b;
  padding: 35px;
  border-radius: 30px;
  text-align: center;
  width: 420px;
}

/* Bigger profile image */
.profile-card .animal-circle {
  width: 150px;
  height: 150px;
  margin: 0 auto 15px;
}

.bio {
  font-style: italic;
  margin: 12px 0;
}

ul {
  list-style: none;
  padding: 0;
}

li {
  background: rgba(255,255,255,0.1);
  margin: 6px 0;
  padding: 8px;
  border-radius: 12px;
}

/* Buttons */
.vibe-btn,
.back-btn {
  margin-top: 20px;
  padding: 12px 30px;
  border-radius: 25px;
  border: none;
  font-size: 15px;
  cursor: pointer;
  background: #7cff9b;
}

.back-btn {
  background: linear-gradient(45deg, #7cff9b, #3cffea);
}

.close {
  float: right;
  cursor: pointer;
}

/* ================= */
/* SHUFFLE SCREEN */
/* ================= */
.shuffle-screen {
  flex-direction: column;
  font-size: 18px;
}

.shuffle-row {
  display: flex;
  gap: 25px;
  animation: shuffle 1s infinite;
}

.shuffle-row img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #7cff9b;
}

@keyframes shuffle {
  25% { transform: translateX(-20px); }
  50% { transform: translateX(20px); }
}

/* ================= */
/* MATCH SCREEN */
/* ================= */
.match-animals {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 15px 0;
}

.match-animals .animal-circle {
  width: 110px;
  height: 110px;
}

.score {
  opacity: 0.9;
  margin-top: 8px;
}

/* ================= */
/* RESPONSIVE DESIGN */
/* ================= */
@media (max-width: 1024px) {
  .forest {
    grid-template-columns: repeat(4, 1fr); /* 4 per row on tablets */
  }
}

@media (max-width: 768px) {
  .forest {
    grid-template-columns: repeat(3, 1fr); /* 3 per row on smaller tablets */
  }
}

@media (max-width: 480px) {
  .forest {
    grid-template-columns: repeat(2, 1fr); /* 2 per row on phones */
    gap: 15px;
  }

  .animal-circle {
    width: 80px;
    height: 80px;
  }

  .animal-card {
    width: auto;
    height: auto;
  }
}
