* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: #172033;
  background:
    linear-gradient(rgba(12, 20, 35, 0.72), rgba(12, 20, 35, 0.72)),
    url('../images/background.png'),
    linear-gradient(135deg, #2d4566, #7f9eb8);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.app-card {
  width: min(760px, 100%);
  background: rgba(255, 255, 255, 0.93);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  padding: 30px;
}

.login-card {
  max-width: 450px;
}

h1 {
  margin: 0 0 6px;
  text-align: center;
  font-size: 1.7rem;
}

h2 {
  margin: 0 0 14px;
  font-size: 1.2rem;
}

.subtitle {
  margin: 0 0 22px;
  text-align: center;
  color: #4d5a70;
}

label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 700;
}

input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #b9c3d1;
  border-radius: 10px;
  font-size: 1rem;
  outline: none;
}

input:focus {
  border-color: #4169e1;
  box-shadow: 0 0 0 3px rgba(65, 105, 225, 0.15);
}

button {
  width: 100%;
  margin-top: 16px;
  padding: 12px 14px;
  border: 0;
  border-radius: 10px;
  background: #4169e1;
  color: white;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  filter: brightness(0.95);
}

button.secondary {
  width: auto;
  margin: 0;
  padding: 10px 18px;
  background: #5d6678;
}

.message {
  min-height: 22px;
  margin: 14px 0 0;
  text-align: center;
  font-weight: 700;
}

.message.error {
  color: #b00020;
}

.message.success {
  color: #0b7a2a;
}

.hint {
  margin-top: 18px;
  padding: 14px;
  border-radius: 12px;
  background: #eef3ff;
  color: #35415a;
  line-height: 1.5;
}

.top-row {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e2e7ef;
  padding-bottom: 18px;
  margin-bottom: 20px;
}

.top-row h1,
.top-row .subtitle {
  text-align: left;
}

.panel {
  background: #f5f7fb;
  border: 1px solid #e2e7ef;
  border-radius: 14px;
  padding: 18px;
  margin-top: 18px;
}

.results {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.color-item {
  background: white;
  border: 1px solid #e2e7ef;
  border-radius: 10px;
  padding: 10px 12px;
}

@media (max-width: 600px) {
  .top-row {
    flex-direction: column;
    align-items: stretch;
  }

  button.secondary {
    width: 100%;
  }
}
