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

:root {
  --green: #1D9E75;
  --green-dark: #0F6E56;
  --green-light: #E1F5EE;
  --green-mid: #9FE1CB;
  --text-primary: #1a1a1a;
  --text-secondary: #555;
  --text-muted: #888;
  --bg: #f8f9f6;
  --white: #ffffff;
  --border: #e2e8e4;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 14px;
  --radius-sm: 8px;
}

html {
  scroll-behavior: smooth;
}

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

/* NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  padding: 0 24px;
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
  text-decoration: none;
}

.logo-mark {
  width: 32px;
  height: 32px;
  background: var(--green);
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.logo-mark-sm {
  width: 24px;
  height: 24px;
  font-size: 13px;
  border-radius: 6px;
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--green);
}

/* HERO */
.hero {
  background: linear-gradient(135deg, #0F6E56 0%, #1D9E75 50%, #5DCAA5 100%);
  color: white;
  padding: 80px 24px;
}

.hero-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.hero-sub {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 36px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 36px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-num {
  font-size: 28px;
  font-weight: 700;
}

.stat-label {
  font-size: 13px;
  opacity: 0.8;
}

/* BUTTONS */
.btn-primary {
  background: white;
  color: var(--green-dark);
  border: none;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.btn-secondary {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.btn-ghost:hover {
  border-color: var(--green);
  color: var(--green);
}

.btn-full {
  width: 100%;
  text-align: center;
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: white;
  border: none;
  padding: 16px 32px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.btn-whatsapp:hover {
  background: #1db954;
  transform: translateY(-1px);
}

/* SECTIONS */
.section-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 80px 24px;
}

h2 {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.section-sub {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 36px;
  max-width: 560px;
}

/* DIAGNOSE SECTION */
.diagnose-section {
  background: var(--white);
}

.upload-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.upload-area {
  border: 2px dashed var(--green-mid);
  border-radius: var(--radius-sm);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}

.upload-area:hover {
  border-color: var(--green);
  background: var(--green-light);
}

.upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.upload-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.upload-hint {
  font-size: 13px;
  color: var(--text-muted);
}

.quality-warning {
  background: #FFF8E1;
  border: 1px solid #FFD54F;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #7B5800;
}

.preview-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.preview-area img {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* RESULT CARD */
.result-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.result-header {
  background: var(--green);
  color: white;
  padding: 24px;
  text-align: center;
}

.result-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
  background: rgba(255,255,255,0.2);
}

.result-header h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}

.confidence-bar-wrap {
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
  height: 6px;
  margin-bottom: 8px;
  overflow: hidden;
}

.confidence-bar {
  height: 100%;
  background: white;
  border-radius: 4px;
  transition: width 0.8s ease;
}

.confidence-label {
  font-size: 13px;
  opacity: 0.85;
}

.result-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.result-block h4 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.result-block p {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.7;
}

.sponsor-block {
  background: var(--green-light);
  border: 1px solid var(--green-mid);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.result-card .btn-ghost {
  margin: 0 24px 24px;
  width: calc(100% - 48px);
}

/* LOADING */
.loading-card {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
  margin: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* MAP SECTION */
.map-section {
  background: var(--bg);
}

.map-placeholder {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-coming-soon {
  text-align: center;
  color: var(--text-muted);
}

.map-coming-soon span {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
}

.map-coming-soon p {
  font-size: 15px;
  margin-bottom: 8px;
}

.map-hint {
  font-size: 13px;
  color: var(--text-muted);
}

/* ASK SECTION */
.ask-section {
  background: var(--white);
}

.ask-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

textarea {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg);
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}

textarea:focus {
  border-color: var(--green);
}

.answer-area {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
}

.answer-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 14px;
}

.answer-text {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.8;
  white-space: pre-wrap;
}

/* WHATSAPP SECTION */
.whatsapp-section {
  background: var(--green-light);
  text-align: center;
}

/* FOOTER */
.footer {
  background: var(--text-primary);
  color: white;
  padding: 40px 24px;
}

.footer-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
}

.footer-text {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}

.footer-text a {
  color: var(--green-mid);
  text-decoration: none;
}

/* RESPONSIVE */
@media (max-width: 600px) {
  .nav-links {
    display: none;
  }

  .hero {
    padding: 60px 20px;
  }

  .hero-stats {
    gap: 24px;
  }

  .section-inner {
    padding: 60px 20px;
  }
}