:root {
  --bg: #121826;
  --card-bg: #1e293b;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-hover: #0284c7;
  --border: #334155;
  --th-bg: #0f172a;
}

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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  padding: 2rem 1rem;
  max-width: 800px;
  margin: 0 auto;
}

header {
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.back-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
}

.back-link:hover {
  text-decoration: underline;
}

h1 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.recipe-section {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.recipe-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--accent);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

th, td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background-color: var(--th-bg);
  font-weight: 600;
  color: var(--text-muted);
}

input[type="number"] {
  width: 90px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background-color: #0f172a;
  color: #fff;
  font-size: 1rem;
}

input[type="number"]:focus {
  outline: 2px solid var(--accent);
}

.calc-action {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

button {
  background-color: var(--accent);
  color: #0f172a;
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

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

.result-badge {
  font-weight: 600;
  font-size: 1.1rem;
  color: #4ade80;
}

.to-buy {
  color: #fbbf24;
  font-weight: 600;
}
