/* ===== BODY & PAGE WRAPPER ===== */
body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
  background-color: #fff8f0; /* fallback */
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background overlay with translucent image and subtle white overlay for readability */
#background-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6)),
    url('/static/images/footprint.webp') repeat;
  background-size: 50px 50px;
  z-index: 0;
  pointer-events: none;
}

/* Wrapper around all page content to keep layout centered */
#page-wrapper {
  max-width: 700px;
  margin: 20px auto;
  padding: 2em 1em;
  position: relative;
  z-index: 1;
  background-color: white;
  border-radius: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ===== HEADER & FOOTER ===== */
header, footer {
  background: white;
  padding: 10px 0;
  border-radius: 20px;
  text-align: center;
}


h1 {
  font-size: 2em;
  margin-bottom: 0.2em;
}

/* ===== QUIZ CONTAINER ===== */
#quiz-container {
  background-color: #ffffff;
  padding: 2em;
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
}

/* ===== QUIZ QUESTION BOX ===== */
#question-box {
  margin-bottom: 1.5em;
}

#question-text {
  font-size: 1.2em;
  margin-bottom: 1em;
}

#options label {
  display: block;
  margin-bottom: 0.8em;
  background-color: #f5f5f5;
  padding: 0.6em 0.8em;
  border-radius: 8px;
  transition: background 0.2s ease;
  cursor: pointer;
}

#options label:hover {
  background-color: #e6e6e6;
}

input[type="radio"] {
  margin-right: 0.5em;
  cursor: pointer;
}

/* ===== NAVIGATION BUTTONS ===== */
.navigation {
  margin-top: 1.5em;
  display: flex;
  justify-content: space-between;
}

.navigation button {
  padding: 0.5em 1.5em;
  font-size: 1em;
  border: none;
  background-color: #4682B4;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.navigation button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.navigation button:hover:enabled {
  background-color: #35698a;
}

/* ===== PROGRESS BAR ===== */
#progress {
  margin-top: 2em;
  background: #eee;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
}

#progress-bar {
  height: 10px;
  background: #4CAF50;
  width: 0%;
  transition: width 0.3s ease;
}

/* ===== RESULT SECTION ===== */
.result {
  text-align: center;
  background: #f0f8ff;
  padding: 2em;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.result h2 {
  font-size: 1.5em;
  margin-bottom: 1em;
}

.result p {
  margin-bottom: 0.5em;
  font-size: 1.1em;
}

.result button {
  margin-top: 1em;
  padding: 0.6em 1.5em;
  font-size: 1em;
  background-color: #4682B4;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.result button:hover {
  background-color: #35698a;
}

/* ===== DOG BREED CARDS ===== */
.breed-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 2em;
}

.breed-card {
  background: #fff;
  border-radius: 10px;
  padding: 1em;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  width: 220px;
  text-align: center;
  transition: transform 0.2s ease;
}

.breed-card:hover {
  transform: scale(1.02);
}

.breed-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
}

.breed-card h3 {
  margin-top: 0.6em;
  font-size: 1.1em;
  color: #333;
}

.breed-card p {
  font-size: 0.95em;
  color: #444;
  margin-bottom: 0.4em;
}

.breed-card p.reason {
  font-weight: bold;
  margin-top: 0.5em;
  font-size: 0.9em;
  font-style: italic;
  color: #666;
}

/* ===== RECOMMENDED PET IMAGES ===== */
.pet-images {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1rem;
}

.pet-images img {
  height: 120px;
  width: auto;
  margin: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}

.pet-images img:hover {
  transform: scale(1.1);
}

/* ===== INTRO SCREEN ===== */
#intro-screen {
  text-align: center;
  padding: 2em;
}

#start-btn {
  margin-top: 1em;
  padding: 0.6em 1.5em;
  font-size: 1em;
  background-color: #4682B4;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#start-btn:hover {
  background-color: #35698a;
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 768px) {
  #page-wrapper {
    margin: 10px;
    padding: 1.5em 1em;
    max-width: 100%;
    border-radius: 12px;
  }

  header, footer {
    padding: 8px 10px;
    border-radius: 12px;
  }

  h1 {
    font-size: 1.5em;
  }

  #quiz-container {
    padding: 1.5em 1em;
  }

  #question-text {
    font-size: 1.1em;
  }

  .navigation {
    flex-direction: column;
    gap: 10px;
  }

  .navigation button {
    width: 100%;
    font-size: 1.1em;
    padding: 0.75em;
  }

  /* Breed cards stack vertically on smaller screens */
  .breed-cards {
    flex-direction: column;
    gap: 1em;
    margin-top: 1.5em;
  }

  .breed-card {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
  }

  /* Pet images wrap and scale smaller */
  .pet-images {
    gap: 8px;
  }

  .pet-images img {
    height: 100px;
    margin: 6px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.2em;
  }

  #question-text {
    font-size: 1em;
  }

  #start-btn, .navigation button, .result button {
    font-size: 1em;
    padding: 0.6em;
  }

  .breed-card img {
    height: 120px;
  }
}

