:root {
  --bg: #0f1214;
  --surface: #1a1f24;
  --surface-2: #242b32;
  --border: #2d363e;
  --text: #e8eaed;
  --text-muted: #8b949e;
  --accent: #4ade80;
  --accent-dim: #22c55e;
  --accent-bg: rgba(74, 222, 128, 0.08);
  --danger: #f87171;
  --radius: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Nav */
header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 1.5rem;
  font-size: 0.9rem;
}

.nav-links a.active,
.nav-links a:hover { color: var(--accent); }

/* Hero */
.hero {
  text-align: center;
  padding: 3rem 1rem 1.5rem;
}

.hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.hero em { color: var(--accent); font-style: normal; }

.subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Calculator Card */
.calculator {
  padding: 0 1rem 2rem;
  max-width: 700px;
  margin: 0 auto;
}

.calc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.calc-card h2 {
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

/* Form */
.form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.field {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.field.full-width { flex: 1 1 100%; }

label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

select, input[type="number"], input[type="text"] {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.6rem 0.8rem;
  font-size: 0.95rem;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
}

select:focus, input:focus {
  border-color: var(--accent);
}

select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Strain Search */
.strain-search { position: relative; }

.strain-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-height: 240px;
  overflow-y: auto;
  z-index: 100;
  margin-top: 4px;
}

.strain-dropdown.hidden { display: none; }

.strain-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  font-size: 0.9rem;
}

.strain-option:hover { background: var(--border); }

.strain-option img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.strain-option .days {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Strain Badge */
.strain-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-bg);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.8rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.strain-badge.hidden { display: none; }

.strain-badge img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.strain-badge #strain-days {
  color: var(--accent);
  margin-left: auto;
}

.strain-badge button {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 0.3rem;
}

/* Results */
.results {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.results.hidden { display: none; }

.results {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.results h3 { margin-bottom: 1rem; }

.results-grid {
  display: grid;
  gap: 1rem;
}

.result-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--accent-bg);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.result-label { color: var(--text-muted); }

.result-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
}

.result-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.breakdown-row {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  padding: 0.3rem 0;
}

.breakdown-row .muted { margin-left: auto; }

.result-stats {
  display: flex;
  gap: 2rem;
  font-size: 0.9rem;
}

.result-stats div { display: flex; gap: 0.5rem; }

.muted { color: var(--text-muted); }

/* Light Summary */
.light-summary {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.light-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.light-photo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 4px;
}

.light-photo.hidden { display: none; }

.light-info {
  display: flex;
  flex-direction: column;
}

.light-info span:first-child { font-weight: 600; }

.light-metrics {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.btn-buy {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: opacity 0.2s;
}

.btn-buy:hover { opacity: 0.85; }
.btn-buy.hidden { display: none; }

.btn-share {
  display: inline-block;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  cursor: pointer;
  margin-left: 0.5rem;
  transition: border-color 0.2s;
}

.btn-share:hover { border-color: var(--accent); }
.btn-share.hidden { display: none; }

.share-confirm {
  color: var(--accent);
  font-size: 0.85rem;
  margin-left: 0.5rem;
}

.share-confirm.hidden { display: none; }

/* Tent Filter */
.tent-filter {
  max-width: 700px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.tent-filter h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.tent-buttons {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tent-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.5rem 1.2rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
}

.tent-btn:hover, .tent-btn.active {
  border-color: var(--accent);
  background: var(--accent-bg);
  color: var(--accent);
}

.tent-results {
  display: grid;
  gap: 0.8rem;
}

.tent-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tent-card-info h4 { font-size: 0.95rem; margin-bottom: 0.2rem; }
.tent-card-info p { font-size: 0.8rem; color: var(--text-muted); }

.tent-card-stats {
  text-align: right;
  font-size: 0.85rem;
}

.tent-card-stats .price { color: var(--accent); font-weight: 600; }

/* Footer */
footer {
  text-align: center;
  padding: 2rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto;
}

footer p { margin-bottom: 0.4rem; }
footer a { color: var(--accent); text-decoration: none; }
.disclosure { font-size: 0.75rem; margin-top: 0.5rem; }

/* Hamburger Menu */
#menu-btn {
  position: fixed; top: 1rem; left: 1rem; z-index: 1002;
  width: 40px; height: 40px; border: none; border-radius: var(--radius-sm);
  background: var(--surface); box-shadow: 0 2px 12px rgba(0,0,0,0.4);
  font-size: 20px; cursor: pointer; display: flex;
  align-items: center; justify-content: center; color: var(--text);
}
#menu-btn:hover { background: var(--surface-2); }
#menu-overlay {
  position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,0.5);
  display: none; opacity: 0; transition: opacity 0.3s ease;
}
#menu-overlay.open { display: block; opacity: 1; }
#menu-panel {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 2001;
  width: 260px; max-width: 80vw; background: var(--bg);
  transform: translateX(-100%); transition: transform 0.3s ease;
  display: flex; flex-direction: column; padding: 20px 0;
  border-right: 1px solid var(--border);
}
#menu-panel.open { transform: translateX(0); }
#menu-panel .menu-header {
  display: flex; align-items: center; gap: 10px;
  padding: 0 20px 16px; border-bottom: 1px solid var(--border);
}
#menu-panel .menu-header span { color: var(--text); font-weight: 700; font-size: 1.1rem; }
#menu-panel .menu-header img { height: 20px; }
#menu-panel nav { flex: 1; padding: 16px 0; display: flex; flex-direction: column; }
#menu-panel nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; color: var(--text-muted); text-decoration: none; font-size: 0.95rem;
  transition: background 0.2s; margin-left: 0;
}
#menu-panel nav a:hover { background: var(--surface); color: var(--text); }
#menu-panel nav a i { width: 20px; text-align: center; color: var(--accent); }
#menu-panel .menu-legal {
  padding: 12px 20px; border-top: 1px solid var(--border);
  display: flex; gap: 8px; flex-wrap: wrap;
}
#menu-panel .menu-legal a { color: var(--text-muted); font-size: 0.75rem; text-decoration: none; }
#menu-panel .menu-legal a:hover { color: var(--accent); }
#menu-close {
  position: absolute; top: 12px; right: 12px; background: none;
  border: none; color: var(--text-muted); font-size: 20px; cursor: pointer;
}
#menu-close:hover { color: var(--text); }

/* Mobile */
@media (max-width: 600px) {
  header nav { padding: 0.8rem 1rem; }
  .nav-links { display: none; }
  .calc-card { padding: 1.2rem; }
  .form-row { flex-direction: column; gap: 0.8rem; }
  .result-stats { flex-direction: column; gap: 0.5rem; }
  .light-metrics { flex-wrap: wrap; }
}
