:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #1a202c;
  --muted: #718096;
  --accent: #3182ce;
  --accent-dark: #2b6cb0;
  --danger: #e53e3e;
  --success: #38a169;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding: 20px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

header {
  text-align: center;
  margin-bottom: 30px;
}

header h1 {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 10px;
}

header p {
  color: var(--muted);
  font-size: 1.1rem;
}

form {
  background: var(--surface);
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
  margin-bottom: 30px;
}

section {
  margin-bottom: 30px;
}

section h2 {
  color: var(--accent);
  font-size: 1.3rem;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text);
}

input[type="text"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(49, 130, 206, 0.1);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

.criteria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.criteria-item {
  background: var(--bg);
  padding: 15px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.criteria-item h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--accent);
}

.decision-tree {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.decision-item {
  background: var(--bg);
  padding: 15px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.decision-item h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--accent);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 30px;
}

button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover {
  background: var(--accent-dark);
}

.results {
  background: var(--surface);
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
}

.results.hidden {
  display: none;
}

.score-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px;
}

.score-card {
  text-align: center;
  margin-bottom: 20px;
}

.score-card h3 {
  font-size: 1.2rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.score-value {
  font-size: 3rem;
  font-weight: bold;
  color: var(--accent);
  margin-bottom: 10px;
}

.score-recommendation {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text);
}

.score-details {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  width: 100%;
}

.score-item {
  background: var(--bg);
  padding: 15px;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.score-item span:first-child {
  font-weight: 500;
}

.score-item span:last-child {
  font-weight: bold;
  color: var(--accent);
}

@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .criteria-grid,
  .decision-tree,
  .score-details {
    grid-template-columns: 1fr;
  }
}
