/* General reset and layout */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f7fa;
  color: #333;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 20px;
}

/* Central container */
main {
  background: #fff;
  border-radius: 10px;
  padding: 30px;
  max-width: 700px;
  width: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin: 40px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Title */
h1 {
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 20px;
  color: #1a73e8;
  text-align: center;
}

/* Textarea */
textarea {
  width: 100%;
  height: 180px;
  border-radius: 8px;
  border: 1.5px solid #ccc;
  padding: 12px;
  font-size: 1rem;
  resize: vertical;
  font-family: inherit;
  margin-bottom: 15px;
  transition: border-color 0.3s ease;
}

textarea:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 8px #1a73e8aa;
}

/* Buttons container */
.buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* Buttons */
button {
  background-color: #1a73e8;
  border: none;
  border-radius: 6px;
  color: white;
  padding: 12px 22px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-size: 1rem;
  user-select: none;
}

button:hover,
button:focus {
  background-color: #0f4fa3;
  outline: none;
}

/* Result section */
.result-message {
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
}

/* Explanation/details section */
.details {
  background: #eef4fb;
  border-radius: 8px;
  padding: 15px 20px;
  font-size: 0.9rem;
  color: #555;
  max-height: 200px;
  overflow-y: auto;
  line-height: 1.4;
  box-shadow: inset 0 0 5px #cfd8e6;
  width: 100%;
  transition: all 0.3s ease;
}

.details ul {
  padding-left: 20px;
}

/* Footer */
footer {
  margin-top: 30px;
  text-align: center;
  font-size: 0.9rem;
  color: #777;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  main {
    padding: 20px;
  }

  h1 {
    font-size: 1.5rem;
  }

  button {
    width: 100%;
  }
}
