:root {
  --bg-primary: #06130d;
  --bg-card: #0c1f17;
  --bg-card-hover: #122b20;
  --border: #1a382a;
  --text-main: #f0fdf4;
  --text-muted: #86efac;
  --text-dim: #94a3b8;
  --accent: #10b981;
  --accent-glow: rgba(16, 185, 129, 0.25);
  --accent-hover: #059669;
  --warning: #f59e0b;
  --danger: #ef4444;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  padding-bottom: 60px;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 16px;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 40%, #a7f3d0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}

.subtitle {
  color: #94a3b8;
  font-size: 1rem;
  max-width: 680px;
  margin: 0 auto;
}

/* Preset buttons */
.presets-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 24px 0;
}

.preset-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  color: #ffffff;
}

.preset-btn.active {
  background: var(--accent);
  color: #06130d;
  font-weight: 700;
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* Main Grid */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

@media (min-width: 820px) {
  .calc-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #ffffff;
}

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

label {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

.hint {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 400;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

input[type="number"], select {
  width: 100%;
  background: #081710;
  border: 1px solid var(--border);
  color: #ffffff;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 1rem;
  font-family: var(--font-mono);
  outline: none;
  transition: border-color 0.2s;
}

input[type="number"]:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-suffix {
  position: absolute;
  right: 12px;
  color: #94a3b8;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  pointer-events: none;
}

/* Result Hero */
.result-hero {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.08));
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 14px;
  padding: 22px;
  text-align: center;
  margin-bottom: 20px;
}

.result-number {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 800;
  font-family: var(--font-mono);
  color: #34d399;
  line-height: 1.1;
  margin: 6px 0;
}

.result-label {
  font-size: 0.85rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.metric-mm {
  font-size: 1rem;
  font-family: var(--font-mono);
  color: #a7f3d0;
  margin-top: 4px;
}

/* Stats grid */
.result-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.stat-item {
  background: #081710;
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 10px;
  text-align: center;
}

.stat-val {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: #ffffff;
}

.stat-desc {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Alert badge */
.status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 6px;
}

.status-ok {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.status-warn {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

/* Amazon Supplies Card */
.supplies-card {
  background: #0c1f17;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin: 28px 0;
}

.supplies-card h3 {
  font-size: 1.1rem;
  color: #f0fdf4;
  margin-bottom: 12px;
}

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

.supply-item {
  background: #122b20;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.supply-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 4px;
}

.supply-desc {
  font-size: 0.76rem;
  color: #94a3b8;
  margin-bottom: 8px;
}

.btn-amazon {
  display: inline-block;
  text-align: center;
  background: #10b981;
  color: #06130d;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.btn-amazon:hover {
  opacity: 0.9;
}

/* Guide section */
.guide-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  margin-top: 36px;
}

.guide-section h2 {
  font-size: 1.35rem;
  margin-bottom: 14px;
  color: #ffffff;
}

.guide-section p {
  color: #94a3b8;
  font-size: 0.92rem;
  margin-bottom: 12px;
}

/* FAQ section */
.faq-section {
  margin-top: 36px;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.faq-q {
  font-weight: 600;
  font-size: 1rem;
  color: #ffffff;
  margin-bottom: 6px;
}

.faq-a {
  color: #94a3b8;
  font-size: 0.9rem;
}

footer {
  text-align: center;
  margin-top: 40px;
  color: #94a3b8;
  font-size: 0.8rem;
}

footer a {
  color: var(--accent);
  text-decoration: none;
}
