/* Base Reset & Modern Defaults */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  line-height: 1.6;
  color-scheme: light dark;
}

body {
  background-color: #f8f9fa;
  color: #212529;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
}

/* Headings */
h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  text-align: center;
}

h1 + p {
  margin-bottom: 1.5rem;
}

/* Form */
form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  justify-content: center;
}

label {
  font-weight: 600;
}

input[type="text"] {
  padding: 0.5rem 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 8px;
  font-size: 1rem;
  min-width: 250px;
  transition: border-color 0.3s;
}

input[type="text"]:focus {
  outline: none;
  border-color: #495057;
}

button {
  padding: 0.5rem 1.25rem;
  background-color: #0d6efd;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #0b5ed7;
}

/* Results Section */
.results {
  max-width: 600px;
  width: 100%;
  background-color: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.results p {
  margin-bottom: 1rem;
}

.bold {
  font-weight: 700;
  margin-bottom: 1.25rem;
}

/* --- Dark Mode --- */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #121212;
    color: #e9ecef;
  }

  input[type="text"] {
    background-color: #1e1e1e;
    color: #e9ecef;
    border: 1px solid #333;
  }

  .results {
    background-color: #1e1e1e;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  }

  button {
    background-color: #0d6efd;
  }
}

/* --- Tablet --- */
@media (max-width: 768px) {
  h1 {
    font-size: 1.75rem;
  }

  input[type="text"] {
    min-width: 200px;
    flex: 1;
  }

  .results {
    padding: 1rem;
  }
}

/* --- Mobile --- */
@media (max-width: 480px) {
  body {
    padding: 1rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  form {
    flex-direction: column;
    align-items: stretch;
  }

  button {
    width: 100%;
  }
}
