:root {
  --primary-color: #005ea2; /* Blue */
  --secondary-color: #f5a623; /* Orange */
  --background-color: #ffffff;
  --text-color: #333333;
  --border-radius: 5px;
  --transition-speed: 0.3s;
  --font-family: 'Arial', sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background-color: #1e1e1e;
    --text-color: #f0f0f0;
  }
}

body {
  margin: 0;
  font-family: var(--font-family);
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.5;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

h1 {
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.description {
  font-size: 1rem;
  text-align: center;
  margin-bottom: 20px;
}

form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  width: 100%;
  max-width: 500px;
}

input,
button {
  padding: 10px;
  border-radius: var(--border-radius);
  border: 1px solid var(--primary-color);
  transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
  font-size: 1rem;
  width: 100%;
}

input:focus,
button:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 5px var(--secondary-color);
}

input:hover,
button:hover {
  border-color: var(--secondary-color);
}

input:active,
button:active {
  box-shadow: inset 0 0 5px var(--secondary-color);
}

button {
  background-color: var(--primary-color);
  color: #fff;
  cursor: pointer;
}

button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.result {
  padding: 15px;
  background-color: var(--secondary-color);
  color: #fff;
  border-radius: var(--border-radius);
  text-align: center;
  font-size: 1.2rem;
}

.error {
  border-color: red;
}

.error-message {
  color: red;
  font-size: 0.9rem;
  margin-top: -10px;
}

@media (min-width: 768px) {
  form {
    grid-template-columns: repeat(2, 1fr);
  }

  h1 {
    font-size: 2rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 40px;
  }

  h1 {
    font-size: 2.5rem;
  }
}

@media print {
  body {
    color: #000;
    background-color: #fff;
  }

  .container {
    padding: 0;
  }

  h1,
  .description {
    color: #000;
  }

  button,
  input {
    display: none;
  }

  .result {
    background-color: #fff;
    color: #000;
  }
}