/* General Reset & Layout */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f0f2f5;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

#app {
  background-color: white;
  width: 100%;
  max-width: 450px;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  text-align: center;
}

/* Search Section */
#search-input {
  width: 70%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 8px 0 0 8px;
  outline: none;
  font-size: 1rem;
}

#search-input:focus {
  border-color: #ff4757;
}

#search-button {
  width: 30%;
  padding: 12px;
  background-color: #ff4757;
  color: white;
  border: 2px solid #ff4757;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
  margin-left: -1px;
}

#search-button:hover {
  background-color: #e84118;
}

/* Info Section */
p {
  margin: 10px 0;
  font-weight: bold;
  color: #2f3542;
  font-size: 1.1rem;
}

span {
  font-weight: normal;
  color: #57606f;
}

#creature-name {
  font-size: 1.8rem;
  color: #2f3542;
  letter-spacing: 1px;
}

#creature-id {
  color: #a4b0be;
  font-style: italic;
}

/* Types Section */
#types {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 15px 0;
  min-height: 32px; /* Prevents layout jump when empty */
}

/* Each type badge created by your JS */
#types span {
  padding: 5px 15px;
  background-color: #747d8c;
  color: white;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: bold;
  text-transform: uppercase;
}

/* Stat Grid Styling */
.stats-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

/* Making each stat line look organized */
#app p:nth-of-type(n + 5) {
  background: #f8f9fa;
  padding: 8px;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}
