:root {
  --bg: #0f172a;
  --panel: #121c36;
  --card: #0c1226;
  --accent: #8ef1a9;
  --accent-2: #61b8ff;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --border: #1f2a44;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at 20% 20%, #1c2b4f, #0b1021 45%), #0b1021;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: inherit;
}

main {
  max-width: 1100px;
  margin: 0 auto 64px;
  padding: 0 20px 20px;
}

.page-header {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

h1 {
  margin: 0 0 8px;
  font-size: 32px;
}

h2 {
  margin: 0;
  font-size: 24px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 6px;
}

.lead {
  margin: 6px 0 0;
  color: var(--muted);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  margin-top: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.input-with-slider {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-with-slider input[type="range"] {
  accent-color: var(--accent);
  width: 100%;
  height: 10px;
  border-radius: 10px;
  background: linear-gradient(90deg, #c24a4a 0%, #f0b23e 20%, #8ef1a9 50%, #f0b23e 80%, #c24a4a 100%);
  appearance: none;
}

.input-with-slider input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0b1021;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 2px rgba(142, 241, 169, 0.25);
}

.input-with-slider input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0b1021;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 2px rgba(142, 241, 169, 0.25);
}

.range-hint {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.scale-bar {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
  align-items: end;
  padding: 14px 16px;
  margin-top: 16px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: #0d152b;
}

.scale-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.scale-controls--inline {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.scale-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.recipe-summary {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
  margin-top: 16px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.insights ul {
  list-style: disc;
  padding-left: 20px;
  margin: 8px 0 0;
}

label {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}

input,
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0b132b;
  color: var(--text);
  font-size: 14px;
}

input:focus,
select:focus {
  outline: 2px solid var(--accent-2);
}

.unit-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.unit-toggle__label {
  color: var(--muted);
  font-size: 13px;
}

.unit-toggle__value {
  font-weight: 700;
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #1f2a44;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-2);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.temperature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.timer {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  align-items: start;
}

.timer__controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.minutes-input {
  display: flex;
  gap: 10px;
  align-items: center;
}

.timer__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.button {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #162240;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.button--primary {
  background: linear-gradient(135deg, var(--accent), #4fe3ff);
  color: #0b1021;
  border: none;
}

.button--ghost {
  background: transparent;
  color: var(--text);
  border: 1px dashed var(--border);
}

.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.note {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.tip {
  background: #101b34;
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 12px;
  color: var(--text);
  min-height: 48px;
}

.timer__display {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}

.timer__time {
  font-size: 64px;
  margin: 0 0 10px;
  font-variant-numeric: tabular-nums;
}

.progress {
  background: #0b132b;
  border: 1px solid var(--border);
  border-radius: 10px;
  height: 12px;
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.3s ease;
}

.progress__bar--done {
  background: linear-gradient(90deg, #8ef1a9, #f5d547);
}

.timer__hint {
  color: var(--muted);
  margin-top: 10px;
}

@media (max-width: 900px) {
  .timer {
    grid-template-columns: 1fr;
  }

  .recipe-summary {
    grid-template-columns: 1fr;
  }

  .scale-bar {
    grid-template-columns: 1fr;
  }
}
