:root {
  --bg-dark: #0a0f0d;
  --bg-card: rgba(18, 28, 23, 0.75);
  --border-color: rgba(46, 125, 90, 0.25);
  --border-focus: #28a745;
  --primary: #10b981;
  --primary-hover: #059669;
  --primary-glow: rgba(16, 185, 129, 0.35);
  --accent: #34d399;
  --accent-blue: #38bdf8;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Background Glow */
.glow-bg {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
}
.glow-bg.top-left {
  top: -200px;
  left: -200px;
  background: radial-gradient(circle, #059669, #064e3b);
}
.glow-bg.bottom-right {
  bottom: -200px;
  right: -200px;
  background: radial-gradient(circle, #0284c7, #065f46);
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Navbar */
.navbar {
  background: rgba(10, 15, 13, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
}
.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
.brand-logo-container {
  background: #ffffff;
  padding: 4px 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 0 1px rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.95);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.brand-logo-img {
  height: 42px;
  width: auto;
  object-fit: contain;
  display: block;
}
.brand:hover .brand-logo-container {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4), 0 0 12px rgba(255, 255, 255, 0.4);
}
.brand-name {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 1.5px;
  background: linear-gradient(135deg, #34d399, #10b981, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-tagline {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}
.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-link:hover {
  color: var(--accent);
}
.nav-btn-highlight {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--accent);
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}
.nav-btn-highlight:hover {
  background: rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 16px var(--primary-glow);
}
.store-link {
  color: var(--accent-blue);
}

/* Hero */
.hero {
  padding: 44px 0 28px;
  text-align: center;
}
.hero-logo-wrapper {
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 20px rgba(255, 255, 255, 0.2);
  margin-bottom: 22px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hero-logo-wrapper:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 36px rgba(16, 185, 129, 0.35), 0 0 25px rgba(255, 255, 255, 0.3);
}
.hero-logo-img {
  height: 72px;
  width: auto;
  display: block;
}
.badge {
  display: inline-block;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 16px;
  background: linear-gradient(180deg, #ffffff, #d1d5db);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-desc {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 680px;
  margin: 0 auto;
}
.hero-desc strong {
  color: var(--accent);
}

/* Main Layout Grid */
.main-layout {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 28px;
  padding-bottom: 72px;
}
@media (max-width: 992px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
}

/* Card Style */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
}
.card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.chat-icon {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.35);
}
.card-header h2 {
  font-size: 20px;
  font-weight: 700;
}
.subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

/* Forms */
.calc-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}
.help-text {
  font-size: 11px;
  color: var(--text-dim);
}
input, select {
  background: rgba(10, 15, 13, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
input:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}
select option {
  background-color: #121c17;
  color: #fff;
}
.input-unit {
  position: relative;
  display: flex;
  align-items: center;
}
.input-unit input {
  width: 100%;
  padding-right: 38px;
}
.input-unit .unit {
  position: absolute;
  right: 12px;
  font-size: 13px;
  color: var(--text-muted);
  pointer-events: none;
}

/* Advanced Parameters */
.advanced-params {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}
.advanced-params summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  outline: none;
}
.params-grid {
  margin-top: 14px;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 768px) {
  .params-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #062419;
  font-weight: 700;
  font-size: 15px;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 20px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px var(--primary-glow);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--primary-glow);
  filter: brightness(1.05);
}
.btn-secondary {
  display: inline-block;
  background: #0284c7;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  margin-top: 10px;
}
.btn-secondary:hover {
  background: #0369a1;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
}

/* Results Area */
.divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 28px 0;
}
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.results-header h3 {
  font-size: 18px;
  font-weight: 700;
}
.badge-accent {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--accent-blue);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

.dosing-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
.dosing-card {
  background: rgba(10, 15, 13, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.dosing-card.secondary {
  border-left-color: var(--accent-blue);
}
.dosing-info h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}
.dosing-info h4 a {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s;
}
.dosing-info h4 a:hover {
  color: var(--accent);
}
.dosing-schedule {
  font-size: 12px;
  color: var(--text-muted);
}
.dosing-dose {
  text-align: right;
  min-width: 140px;
}
.dose-clicks {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
}
.dose-ml {
  font-size: 11px;
  color: var(--text-dim);
}
.btn-buy-mini {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
}
.btn-buy-mini:hover {
  text-decoration: underline;
}

.advice-box {
  background: rgba(16, 185, 129, 0.07);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-size: 13px;
  margin-bottom: 20px;
  color: #e5e7eb;
}
.advice-box strong {
  color: var(--accent);
}

/* Lab Banner */
.lab-banner {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.15), rgba(16, 185, 129, 0.15));
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.lab-banner-icon {
  font-size: 32px;
}
.lab-banner-content h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #fff;
}
.lab-banner-content p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Chat Assistant Panel */
.card-chat {
  height: 720px;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 12px;
  background: rgba(10, 15, 13, 0.4);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.msg {
  display: flex;
  flex-direction: column;
  max-width: 85%;
}
.msg-agent {
  align-self: flex-start;
}
.msg-user {
  align-self: flex-end;
}
.msg-bubble {
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.55;
}
.msg-agent .msg-bubble {
  background: rgba(18, 28, 23, 0.9);
  border: 1px solid rgba(46, 125, 90, 0.4);
  color: #f3f4f6;
  border-bottom-left-radius: 4px;
}
.msg-agent .msg-bubble a {
  color: var(--accent-blue);
  text-decoration: underline;
}
.msg-user .msg-bubble {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-input-row {
  display: flex;
  gap: 10px;
}
.chat-input-row input {
  flex: 1;
}
.btn-send {
  background: var(--primary);
  color: #062419;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0 18px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-send:hover {
  background: var(--accent);
}
.chat-disclaimer {
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
}

/* Diagnostic Section */
.diagnostic-section {
  padding: 48px 24px 80px;
  position: relative;
  z-index: 1;
}
.diagnostic-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 36px;
}
.diagnostic-header h2 {
  font-size: 32px;
  font-weight: 800;
  margin: 12px 0 10px;
  background: linear-gradient(180deg, #ffffff, #d1d5db);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.subtitle-diag {
  color: var(--text-muted);
  font-size: 15px;
}
.diag-tabs {
  display: inline-flex;
  gap: 10px;
  background: rgba(18, 28, 23, 0.9);
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  margin-top: 24px;
}
.diag-tab {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 10px 20px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}
.diag-tab:hover {
  color: #fff;
}
.diag-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #062419;
  box-shadow: 0 4px 14px var(--primary-glow);
}
.diag-search-wrap {
  margin-top: 22px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.diag-search-wrap input {
  width: 100%;
  border-radius: 999px;
  padding: 12px 22px;
  background: rgba(18, 28, 23, 0.85);
  border: 1px solid var(--border-color);
  font-size: 14px;
}
.diag-search-wrap input:focus {
  border-color: var(--accent);
}

.diag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 22px;
}
@media (max-width: 768px) {
  .diag-grid {
    grid-template-columns: 1fr;
  }
}
.diag-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.diag-card:hover {
  transform: translateY(-2px);
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}
.diag-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.diag-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.diag-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.diag-badge.plants {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent);
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.diag-badge.algae {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.diag-badge.fish {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.diag-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.diag-field {
  font-size: 13px;
  line-height: 1.5;
}
.diag-label {
  font-weight: 700;
  color: var(--text-muted);
  display: block;
  margin-bottom: 2px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.diag-field.symptom {
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-blue);
}
.diag-field.solution {
  background: rgba(16, 185, 129, 0.05);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
}
.diag-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.btn-diag-product {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: var(--accent);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-diag-product:hover {
  background: rgba(16, 185, 129, 0.35);
  color: #fff;
  box-shadow: 0 0 12px var(--primary-glow);
}
.btn-diag-lab {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: var(--accent-blue);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-diag-lab:hover {
  background: rgba(56, 189, 248, 0.3);
  color: #fff;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  background: rgba(10, 15, 13, 0.9);
  padding: 24px 0;
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
}
.footer-links {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  gap: 14px;
}
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--accent);
}
