* {
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  background: linear-gradient(135deg, #1e1e2f, #2b2b40);
  color: #fff;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

.container {
  max-width: 520px;
  margin: 40px auto;
  padding: 20px;
}

h1 {
  text-align: center;
  margin-bottom: 5px;
  font-size: 26px;
}

.subtitle {
  text-align: center;
  color: #aaa;
  margin-bottom: 25px;
  font-size: 14px;
}

.card {
  background: #1f2033;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.form-group {
  margin-bottom: 15px;
}

label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  color: #ccc;
}

input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #2e3050;
  background: #2a2d45;
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

input:focus {
  border-color: #4f46e5;
}

input::placeholder {
  color: #555;
}

.btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

button {
  width: 100%;
  padding: 11px;
  background: #4f46e5;
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover {
  background: #4338ca;
}

button.secondary {
  background: #2e3050;
}

button.secondary:hover {
  background: #374169;
}

.error {
  display: none;
  margin-top: 12px;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
}

/* Results */

.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.metric {
  background: #2a2d45;
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-label {
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metric-value {
  font-size: 22px;
  font-weight: 600;
  color: #fff;
}

.metric-value.good {
  color: #22c55e;
}

.metric-value.bad {
  color: #ef4444;
}

.metric-value.info {
  color: #38bdf8;
}

.impact-section {
  border-top: 1px solid #2e3050;
  padding-top: 12px;
}

.impact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  font-size: 14px;
}

.impact-row + .impact-row {
  border-top: 1px solid #2e3050;
}

.impact-label {
  color: #aaa;
}

.impact-value {
  font-weight: 600;
}

.impact-value.good {
  color: #22c55e;
}

.impact-value.bad {
  color: #ef4444;
}

@media (max-width: 400px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .btn-row {
    grid-template-columns: 1fr;
  }
}
