/* -------------------------------------------------------------
 * Kisan Katha Showcase Website Stylesheet
 * Premium, Production-ready CSS layout with Glassmorphism
 * Includes Dark Theme, Mandi pricing, and Community styles
 * ------------------------------------------------------------- */

/* --- 1. Variables & Root Design System --- */
:root {
  /* Color Palette - Light Theme */
  --primary: #2e7d32;
  --primary-dark: #1b5e20;
  --primary-light: #e8f5e9;
  --accent: #fbc02d;
  --accent-dark: #f57f17;
  --bg-light: #fafdfa;
  --bg-card: #ffffff;
  --text-color: #2c3e2c;
  --text-muted: #6b7c6b;
  --white: #ffffff;
  --border-color: rgba(0, 0, 0, 0.06);
  --header-color: #121f12;
  --bg-dark: #0f160f;
  
  /* Status Colors */
  --emerald-rgb: 46, 125, 50;
  --gold-rgb: 251, 192, 45;
  --blue-rgb: 33, 150, 243;
  --red-rgb: 244, 67, 54;
  --purple-rgb: 156, 39, 176;
  --cyan-rgb: 0, 188, 212;

  /* Typography */
  --font-header: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Layout Constants */
  --nav-height: 80px;
  --max-width: 1200px;
  
  /* Shadow & Blur System */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.4);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Dark Theme Variables --- */
body.dark-theme {
  --bg-light: #0d120d;
  --bg-card: #151d15;
  --text-color: #e0eee0;
  --text-muted: #8c9e8c;
  --border-color: rgba(255, 255, 255, 0.08);
  --header-color: #ffffff;
  --glass-bg: rgba(21, 29, 21, 0.75);
  --glass-border: rgba(255, 255, 255, 0.1);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.4);
}

/* --- 2. CSS Resets & Base Styles --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--text-color);
  background-color: var(--bg-light);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4 {
  font-family: var(--font-header);
  font-weight: 700;
  line-height: 1.25;
  color: var(--header-color);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  transition: var(--transition);
}

input, textarea, select {
  font-family: inherit;
  color: inherit;
}

/* --- 3. Layout Grid & Utilities --- */
.section-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 24px;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 50px auto;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

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

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Button UI */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-family: var(--font-header);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 12px;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(46, 125, 50, 0.25);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46, 125, 50, 0.35);
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--primary);
  border: 1px solid rgba(46, 125, 50, 0.2);
}

.btn-secondary:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
}

body.dark-theme .btn-secondary:hover {
  background-color: rgba(46, 125, 50, 0.15);
  color: #fff;
}

/* --- 4. Floating Navbar & Theme Toggle Styling --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background-color: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.nav-container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  font-size: 2rem;
}

.logo-text {
  font-family: var(--font-header);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--primary-dark);
  letter-spacing: -0.03em;
}

body.dark-theme .logo-text {
  color: #e8f5e9;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-item {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-color);
  opacity: 0.85;
}

.nav-item:hover {
  color: var(--primary);
  opacity: 1;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Theme toggle */
.theme-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.05);
  font-size: 1.2rem;
}

body.dark-theme .theme-toggle-btn {
  background-color: rgba(255, 255, 255, 0.08);
}

.theme-toggle-btn:hover {
  background-color: rgba(0, 0, 0, 0.1);
  transform: scale(1.05);
}

body.dark-theme .theme-toggle-btn:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.nav-download-btn {
  padding: 10px 20px;
  font-size: 0.9rem;
  border-radius: 10px;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
}

.mobile-menu-toggle .bar {
  width: 100%;
  height: 2.5px;
  background-color: var(--primary-dark);
  border-radius: 2px;
  transition: var(--transition);
}

body.dark-theme .mobile-menu-toggle .bar {
  background-color: #fff;
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: var(--nav-height);
  left: -100%;
  width: 100%;
  height: calc(100vh - var(--nav-height));
  background-color: var(--bg-card);
  z-index: 999;
  display: flex;
  flex-direction: column;
  padding: 40px 24px;
  gap: 24px;
  box-shadow: var(--shadow-md);
  transition: transform 0.4s cubic-bezier(0.1, 0.9, 0.2, 1);
  visibility: hidden;
}

.mobile-drawer.active {
  transform: translateX(100%);
  visibility: visible;
}

.drawer-item {
  font-family: var(--font-header);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.drawer-btn {
  margin-top: 16px;
  width: 100%;
}

/* --- 5. Hero Section & Phone Frame --- */
.hero {
  padding-top: calc(var(--nav-height) + 60px);
  padding-bottom: 80px;
  background: radial-gradient(circle at 80% 20%, var(--primary-light) 0%, transparent 60%);
  overflow: hidden;
}

body.dark-theme .hero {
  background: radial-gradient(circle at 80% 20%, rgba(46, 125, 50, 0.15) 0%, transparent 60%);
}

.hero-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 60px;
}

.badge-tag {
  display: inline-block;
  padding: 6px 14px;
  background-color: var(--primary-light);
  color: var(--primary-dark);
  font-family: var(--font-header);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 30px;
  margin-bottom: 20px;
}

body.dark-theme .badge-tag {
  background-color: rgba(46, 125, 50, 0.2);
  color: #a5d6a7;
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 580px;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
}

.hero-btn {
  padding: 16px 32px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 40px;
  border-top: 1px solid var(--border-color);
  padding-top: 32px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-family: var(--font-header);
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-dark);
}

body.dark-theme .stat-num {
  color: #a5d6a7;
}

.stat-lbl {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Custom Smartphone Frame Right Side */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.phone-frame {
  width: 300px;
  height: 610px;
  background-color: #1a1e1a;
  border: 12px solid #2d352d;
  border-radius: 40px;
  box-shadow: var(--shadow-lg), 0 0 0 4px rgba(46, 125, 50, 0.15);
  position: relative;
  overflow: hidden;
  animation: floating 6s ease-in-out infinite;
  display: flex;
  flex-direction: column;
}

@keyframes floating {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.phone-speaker {
  width: 60px;
  height: 5px;
  background-color: #2d352d;
  border-radius: 10px;
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.phone-screen {
  flex: 1;
  background-color: #070d07;
  display: flex;
  flex-direction: column;
  position: relative;
  font-size: 0.8rem;
}

/* Simulated App UI Inside Phone */
.app-header {
  height: 50px;
  padding: 0 16px;
  background-color: var(--primary-dark);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-header);
}

.app-logo {
  font-weight: 700;
  font-size: 0.9rem;
}

.app-status-bar {
  display: flex;
  gap: 6px;
  font-size: 0.7rem;
}

.app-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Chat Mockup Bubbles */
.chat-date {
  align-self: center;
  background-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
}

.chat-bubble {
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 0.8rem;
  line-height: 1.4;
  position: relative;
}

.chat-bubble.user {
  align-self: flex-end;
  background-color: var(--primary);
  color: var(--white);
  border-bottom-right-radius: 2px;
}

.chat-bubble.assistant {
  align-self: flex-start;
  background-color: rgba(255, 255, 255, 0.1);
  color: #e0eee0;
  border-bottom-left-radius: 2px;
}

.chat-bubble.assistant ul {
  margin-top: 6px;
  padding-left: 14px;
}

.chat-bubble.assistant li {
  margin-bottom: 4px;
}

.chat-header-ai {
  margin-bottom: 4px;
}

.ai-badge {
  font-size: 0.65rem;
  font-weight: 700;
  background-color: rgba(251, 192, 45, 0.2);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.bubble-time {
  display: block;
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.4);
  text-align: right;
  margin-top: 4px;
}

/* Voice App Ring Bar */
.app-voice-bar {
  height: 80px;
  background-color: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 8px;
}

.voice-mic-btn {
  width: 36px;
  height: 36px;
  background-color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  box-shadow: 0 0 10px var(--primary);
  z-index: 2;
}

.voice-mic-btn:hover {
  transform: scale(1.1);
}

.voice-instruction {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 6px;
}

/* Pulsing waves animations */
.audio-waves {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 12px;
  margin-bottom: 4px;
  opacity: 0.7;
}

.audio-waves span {
  display: block;
  width: 2px;
  height: 4px;
  background-color: var(--accent);
  border-radius: 1px;
  animation: waves 1.2s ease-in-out infinite;
}

.audio-waves span:nth-child(2) { animation-delay: 0.2s; }
.audio-waves span:nth-child(3) { animation-delay: 0.4s; }
.audio-waves span:nth-child(4) { animation-delay: 0.6s; }
.audio-waves span:nth-child(5) { animation-delay: 0.8s; }

@keyframes waves {
  0%, 100% { height: 4px; }
  50% { height: 12px; }
}

/* --- 6. Features Grid Section --- */
.features {
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
  transition: background-color 0.3s ease;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.feature-card {
  background-color: var(--bg-card);
  padding: 40px 30px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(46, 125, 50, 0.25);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.bg-emerald {
  background-color: rgba(var(--emerald-rgb), 0.1);
  color: rgb(var(--emerald-rgb));
}
.bg-gold {
  background-color: rgba(var(--gold-rgb), 0.1);
  color: rgb(var(--gold-rgb));
}
.bg-blue {
  background-color: rgba(var(--blue-rgb), 0.1);
  color: rgb(var(--blue-rgb));
}
.bg-red {
  background-color: rgba(var(--red-rgb), 0.1);
  color: rgb(var(--red-rgb));
}
.bg-purple {
  background-color: rgba(var(--purple-rgb), 0.1);
  color: rgb(var(--purple-rgb));
}
.bg-cyan {
  background-color: rgba(var(--cyan-rgb), 0.1);
  color: rgb(var(--cyan-rgb));
}

.feature-card-title {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.feature-card-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- 7. Live Interactive Simulator Frame --- */
.demo-section {
  background-color: var(--bg-light);
}

.simulator-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 60px;
}

.simulator-choices {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.choice-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background-color: var(--bg-card);
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.choice-card:hover {
  border-color: rgba(46, 125, 50, 0.2);
  transform: translateX(4px);
}

.choice-card.active {
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(46, 125, 50, 0.08);
  background-color: var(--primary-light);
}

body.dark-theme .choice-card.active {
  background-color: rgba(46, 125, 50, 0.15);
}

.choice-emoji {
  font-size: 2rem;
  background-color: var(--bg-light);
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.choice-info h4 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.choice-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.simulator-screen-container {
  display: flex;
  justify-content: center;
}

.simulator-frame {
  width: 290px;
  height: 540px;
}

.simulator-app-header {
  height: 44px;
  background-color: #1a2d1a;
  color: var(--white);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-header);
  font-weight: 600;
  font-size: 0.8rem;
}

.pulse-indicator {
  color: var(--accent);
  font-size: 0.7rem;
  animation: pulse-glow 1.5s infinite alternate;
}

@keyframes pulse-glow {
  0% { opacity: 0.5; }
  100% { opacity: 1; text-shadow: 0 0 5px var(--accent); }
}

.simulator-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: #0c120c;
  overflow: hidden;
}

/* Scanner Preview Grid */
.camera-preview-container {
  height: 55%;
  background-color: #000;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.sim-leaf-icon-container {
  font-size: 4rem;
  animation: scan-pulse 2s infinite alternate;
}

@keyframes scan-pulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.1); opacity: 1; }
}

.scanning-laser {
  width: 100%;
  height: 3px;
  background-color: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  position: absolute;
  top: 0;
  left: 0;
  animation: laser-movement 3s infinite linear;
  z-index: 5;
}

@keyframes laser-movement {
  0% { top: 0%; }
  50% { top: 100%; }
  100% { top: 0%; }
}

.scan-overlay-txt {
  position: absolute;
  bottom: 10px;
  background-color: rgba(0, 0, 0, 0.6);
  color: var(--white);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.65rem;
}

/* Diagnosis Box */
.diagnosis-results-box {
  flex: 1;
  background-color: #101610;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px;
  display: flex;
  flex-direction: column;
}

.loading-spinner-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  gap: 12px;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

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

.result-details {
  color: #e0eee0;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.disease-name {
  font-family: var(--font-header);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--white);
}

.confidence-badge {
  font-size: 0.65rem;
  font-weight: 700;
  background-color: rgba(251, 192, 45, 0.2);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
}

.result-description p {
  margin-bottom: 6px;
  font-size: 0.72rem;
  line-height: 1.35;
}

.result-description strong {
  color: var(--white);
}

/* --- 8. Mandi Rates & Weather Demo --- */
.mandi-section {
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.mandi-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.150fr;
  gap: 50px;
  align-items: flex-start;
}

.mandi-selectors {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.selector-box h4 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}

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

.mandi-btn {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  color: var(--text-color);
}

.mandi-btn.active {
  background-color: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.mandi-select {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-light);
  font-size: 0.95rem;
}

.mandi-select:focus {
  outline: none;
  border-color: var(--primary);
}

/* Weather Widget styling */
.weather-widget-card {
  background: linear-gradient(135deg, #1b5e20 0%, #113611 100%);
  color: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-top: 12px;
}

.weather-widget-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  opacity: 0.8;
  margin-bottom: 12px;
  font-family: var(--font-header);
}

.weather-temp-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.weather-temp-icon {
  font-size: 2.2rem;
}

.weather-temp-num {
  font-family: var(--font-header);
  font-size: 2rem;
  font-weight: 700;
}

.weather-desc {
  font-size: 0.85rem;
  opacity: 0.85;
}

.weather-advisory-box {
  background-color: rgba(255, 255, 255, 0.08);
  border-left: 3px solid var(--accent);
  padding: 12px;
  border-radius: 0 8px 8px 0;
  font-size: 0.8rem;
  line-height: 1.45;
}

.alert-tag {
  color: var(--accent);
  text-transform: uppercase;
  margin-right: 4px;
}

/* Mandi table layout */
.mandi-results-panel {
  background-color: var(--bg-light);
  padding: 30px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
}

.mandi-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.mandi-results-header h4 {
  font-size: 1.15rem;
}

.sync-status {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
}

.mandi-table-container {
  overflow-x: auto;
  margin-bottom: 16px;
  width: 100%;
}

.mandi-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.mandi-table th, .mandi-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
}

.mandi-table th {
  font-family: var(--font-header);
  font-weight: 600;
  color: var(--header-color);
  background-color: rgba(0, 0, 0, 0.02);
}

body.dark-theme .mandi-table th {
  background-color: rgba(255, 255, 255, 0.02);
}

.mandi-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- 9. Community Forum Showcase Section --- */
.community-section {
  background-color: var(--bg-light);
}

.community-feed {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.feed-card {
  background-color: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.feed-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(46, 125, 50, 0.15);
}

.feed-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--primary-light);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.dark-theme .user-avatar {
  background-color: rgba(46, 125, 50, 0.2);
}

.user-meta h4 {
  font-size: 1.05rem;
  margin-bottom: 2px;
}

.user-meta span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.tag-badge {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 600;
  background-color: rgba(33, 150, 243, 0.1);
  color: #2196f3;
  padding: 4px 10px;
  border-radius: 30px;
}

.feed-card-body p {
  font-size: 0.95rem;
  margin-bottom: 16px;
  line-height: 1.55;
}

.feed-card-actions {
  display: flex;
  gap: 20px;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.action-btn-like {
  color: var(--text-muted);
  font-weight: 600;
}

.action-btn-like:hover {
  color: #f44336;
}

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

/* AI Reply thread */
.ai-reply-preview {
  display: flex;
  gap: 12px;
  background-color: var(--bg-light);
  padding: 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  line-height: 1.45;
  border-left: 3px solid var(--accent);
}

.ai-avatar {
  font-size: 1.25rem;
}

.ai-reply-text strong {
  color: var(--primary-dark);
}

body.dark-theme .ai-reply-text strong {
  color: #a5d6a7;
}

/* --- 10. How It Works Section --- */
.how-it-works {
  background-color: var(--bg-card);
}

.steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.step-card {
  text-align: center;
  position: relative;
  padding: 20px;
}

.step-badge {
  width: 48px;
  height: 48px;
  background-color: var(--primary);
  color: var(--white);
  font-family: var(--font-header);
  font-size: 1.25rem;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px auto;
  box-shadow: 0 4px 10px rgba(46, 125, 50, 0.2);
}

.step-card h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.step-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* --- 11. FAQ Accordion Section --- */
.faq-section {
  background-color: var(--bg-light);
}

.faq-accordion-container {
  max-width: 750px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background-color: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.faq-question-btn {
  width: 100%;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  font-family: var(--font-header);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--header-color);
}

.faq-icon-arrow {
  font-size: 1.5rem;
  color: var(--primary);
  transition: transform 0.3s ease;
}

.faq-item.active {
  border-color: rgba(46, 125, 50, 0.15);
  box-shadow: var(--shadow-md);
}

.faq-item.active .faq-icon-arrow {
  transform: rotate(45deg);
}

.faq-answer-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
  padding: 0 28px;
}

.faq-item.active .faq-answer-panel {
  max-height: 1000px;
  padding: 0 28px 24px 28px;
  transition: max-height 0.3s cubic-bezier(1, 0, 1, 0);
}

.faq-answer-panel p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* --- 12. Contact Us Styling --- */
.contact-section {
  background-color: var(--bg-card);
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 60px;
  align-items: flex-start;
}

.contact-info-panel h3 {
  font-size: 1.75rem;
  margin-bottom: 16px;
}

.contact-info-panel p {
  color: var(--text-muted);
  margin-bottom: 30px;
}

.contact-info-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 1.05rem;
}

.info-icon {
  font-size: 1.5rem;
}

/* Form Styles */
.contact-form-container {
  background-color: var(--bg-light);
  padding: 40px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
}

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

.form-group label {
  display: block;
  font-family: var(--font-header);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--header-color);
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.form-submit-btn {
  width: 100%;
  border-radius: 10px;
}

.form-status-alert {
  margin-top: 20px;
  padding: 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
}

.form-status-alert.success {
  background-color: rgba(46, 125, 50, 0.1);
  color: var(--primary-dark);
}

.form-status-alert.error {
  background-color: rgba(244, 67, 54, 0.1);
  color: #c62828;
}

/* --- 13. App Downloader Section --- */
.download-section {
  background: radial-gradient(circle at 10% 90%, var(--primary-light) 0%, transparent 50%),
              radial-gradient(circle at 90% 10%, rgba(251, 192, 45, 0.08) 0%, transparent 50%);
}

body.dark-theme .download-section {
  background: radial-gradient(circle at 10% 90%, rgba(46, 125, 50, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 90% 10%, rgba(251, 192, 45, 0.04) 0%, transparent 50%);
}

.download-box-container {
  padding-top: 60px;
  padding-bottom: 60px;
}

.download-box {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #103210 100%);
  color: var(--white);
  border-radius: 24px;
  padding: 60px 40px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.download-box h2 {
  font-size: 2.75rem;
  color: var(--white);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.download-box p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.15rem;
  max-width: 650px;
  margin: 0 auto 40px auto;
}

.download-btn-group {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

/* Google Play Custom Badge Button */
.store-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background-color: #000;
  color: var(--white);
  padding: 10px 24px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.store-badge-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
}

.store-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.store-sub {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

.store-main {
  font-family: var(--font-header);
  font-size: 1.1rem;
  font-weight: 700;
}

.btn-secondary-download {
  display: inline-flex;
  align-items: center;
  padding: 14px 28px;
  font-family: var(--font-header);
  font-weight: 600;
  font-size: 1.05rem;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary-download:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* --- 14. Footer Styling --- */
.footer {
  background-color: var(--bg-dark);
  color: rgba(255, 255, 255, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 24px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
}

.footer-brand .footer-logo {
  font-family: var(--font-header);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--white);
  display: block;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.95rem;
  max-width: 320px;
}

.footer-links-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.footer-link-col h4 {
  color: var(--white);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

.footer-link-col a {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.footer-link-col a:hover {
  color: var(--accent);
}

.footer-copyright {
  text-align: center;
  padding: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.85rem;
}

/* --- 15. Responsive Media Queries --- */
@media (max-width: 991px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-ctas {
    justify-content: center;
  }
  
  .hero-stats {
    justify-content: center;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .simulator-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .mandi-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .section-title {
    font-size: 2rem;
  }
  
  .hero-title {
    font-size: 2.75rem;
  }
  
  .navbar {
    height: 70px;
  }
  
  .mobile-drawer {
    top: 70px;
    height: calc(100vh - 70px);
  }
  
  .nav-menu {
    display: none;
  }
  
  .nav-download-btn {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .steps-row {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .download-box h2 {
    font-size: 2rem;
  }
  
  .hero-stats {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }
  
  .stat-item {
    text-align: center;
  }
  
  .footer-links-row {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }
  
  .footer-brand p {
    margin: 0 auto;
  }
}

@media (max-width: 576px) {
  .section-container {
    padding: 48px 16px;
  }
  
  .hero-ctas {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }
  
  .hero-btn {
    width: 100%;
  }
  
  .feed-form-card {
    padding: 16px;
  }
  
  .contact-form-container {
    padding: 24px 16px;
  }
  
  .download-box {
    padding: 40px 20px;
  }
  
  .download-box h2 {
    font-size: 1.75rem;
  }
  
  .download-box p {
    font-size: 1rem;
    margin-bottom: 24px;
  }

  .mandi-results-panel {
    padding: 16px;
  }

  .mandi-results-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0 12px;
  }

  .logo-link {
    gap: 6px;
  }

  .logo-text {
    font-size: 1.15rem;
  }

  .nav-actions {
    gap: 8px;
  }

  .theme-toggle-btn {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  .hero-title {
    font-size: 2.25rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 24px;
  }

  .weather-widget-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .result-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .feed-card-header {
    flex-wrap: wrap;
    gap: 12px;
  }

  .tag-badge {
    margin-left: 0;
    width: 100%;
    text-align: center;
  }

  .feed-card {
    padding: 16px;
  }

  .faq-question-btn {
    padding: 16px 20px;
    font-size: 1rem;
  }

  .faq-answer-panel {
    padding: 0 20px;
  }

  .faq-item.active .faq-answer-panel {
    padding: 0 20px 16px 20px;
  }
}

@media (max-width: 360px) {
  .phone-frame {
    width: 270px;
    height: 550px;
  }
  .simulator-frame {
    width: 270px;
    height: 500px;
  }
  .nav-container {
    padding: 0 8px;
  }
  .logo-text {
    font-size: 1.1rem;
  }
}

/* --- 16. Dynamic Enhancements & Showcase Additions --- */

/* Voice Keyboard Fallback styling inside the phone mockup */
.voice-controls-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: center;
  padding: 0 12px;
}

.voice-keyboard-toggle {
  font-size: 1.1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.voice-keyboard-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.voice-input-fallback {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 4px 10px;
  flex: 1;
  max-width: 170px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.voice-input-fallback input {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 0.75rem;
  width: 100%;
  outline: none;
}

.voice-input-fallback input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.voice-input-fallback button {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.85rem;
  cursor: pointer;
  padding-left: 4px;
}

/* Scrollspy active item highlighting */
.nav-item.active {
  color: var(--primary) !important;
  opacity: 1 !important;
  font-weight: 700 !important;
  border-bottom: 2px solid var(--primary);
}

body.dark-theme .nav-item.active {
  color: #a5d6a7 !important;
  border-bottom-color: #a5d6a7;
}

/* Mandi table trend indicators */
.mandi-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

.mandi-trend.up {
  color: #2e7d32;
  background-color: rgba(46, 125, 50, 0.1);
}

body.dark-theme .mandi-trend.up {
  color: #81c784;
  background-color: rgba(129, 199, 132, 0.15);
}

.mandi-trend.down {
  color: #c62828;
  background-color: rgba(198, 40, 40, 0.1);
}

body.dark-theme .mandi-trend.down {
  color: #e57373;
  background-color: rgba(229, 115, 115, 0.15);
}

/* Download APK Progress Modal styling */
.download-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.download-modal .modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.download-modal .modal-content {
  position: relative;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  z-index: 10;
  transform: scale(0.9);
  opacity: 0;
  animation: modal-zoom-in 0.3s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-zoom-in {
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 1.75rem;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
}

.modal-close-btn:hover {
  color: var(--text-color);
}

.download-loader-header {
  text-align: center;
  margin-bottom: 24px;
}

.download-spinner-emoji {
  font-size: 2.5rem;
  display: inline-block;
  animation: float-bounce 2s infinite ease-in-out;
}

@keyframes float-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.progress-bar-container {
  width: 100%;
  height: 10px;
  background-color: var(--bg-light);
  border-radius: 10px;
  position: relative;
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(95deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 10px;
  transition: width 0.1s linear;
}

.progress-percentage {
  position: absolute;
  right: 0;
  top: -24px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-dark);
}

body.dark-theme .progress-percentage {
  color: #a5d6a7;
}

.download-instructions {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.instruction-title {
  color: var(--primary);
  margin-bottom: 8px;
  font-size: 1.15rem;
}

body.dark-theme .instruction-title {
  color: #a5d6a7;
}

.instruction-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.instruction-list {
  padding-left: 20px;
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.instruction-list li {
  margin-bottom: 8px;
  color: var(--text-color);
}

.close-modal-btn {
  width: 100%;
  border-radius: 8px;
  padding: 10px;
}

/* Custom crop scan styling helper */
.camera-preview-container img {
  border-radius: 8px;
}

.camera-preview-container .scanning-laser {
  pointer-events: none;
}

/* Community Forum Form Styling */
.feed-form-card {
  background-color: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  padding: 24px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
}

.feed-form-header h4 {
  font-size: 1.2rem;
  margin-bottom: 18px;
  color: var(--header-color);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-row-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group-sm {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group-sm label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group-sm input, .form-group-sm textarea, .form-group-sm select {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-light);
  font-size: 0.85rem;
  transition: var(--transition);
  outline: none;
}

.form-group-sm input:focus, .form-group-sm textarea:focus, .form-group-sm select:focus {
  border-color: var(--primary);
  background-color: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.feed-submit-btn {
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  font-size: 0.95rem;
  border-radius: 8px;
}

.action-btn-like.liked {
  color: #f44336 !important;
  font-weight: 700;
}

@media (max-width: 576px) {
  .form-row-2col {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .form-row-inner {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}


/* ==========================================
 * 16. Dynamic Enhancements & UI Polish
 * ========================================== */

/* Navigation Scrollspy Active Item */
.nav-item.active {
  color: var(--primary) !important;
  opacity: 1 !important;
  font-weight: 700;
  position: relative;
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2.5px;
  background-color: var(--primary);
  border-radius: 2px;
}

body.dark-theme .nav-item.active {
  color: #a5d6a7 !important;
}
body.dark-theme .nav-item.active::after {
  background-color: #a5d6a7;
}

/* Mandi trend badges */
.mandi-price-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.trend-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.trend-badge.trend-up {
  background-color: rgba(46, 125, 50, 0.12);
  color: #2e7d32;
}

.trend-badge.trend-down {
  background-color: rgba(244, 67, 54, 0.12);
  color: #d32f2f;
}

body.dark-theme .trend-badge.trend-up {
  background-color: rgba(165, 214, 167, 0.15);
  color: #a5d6a7;
}

body.dark-theme .trend-badge.trend-down {
  background-color: rgba(239, 154, 154, 0.15);
  color: #ef9a9a;
}

/* Custom Image Scanner Options */
.choice-card.upload-card {
  border: 2px dashed rgba(46, 125, 50, 0.25);
  background-color: rgba(46, 125, 50, 0.01);
  transition: var(--transition);
}

.choice-card.upload-card:hover {
  border-color: var(--primary);
  background-color: var(--primary-light);
  transform: translateX(4px);
}

body.dark-theme .choice-card.upload-card {
  border-color: rgba(255, 255, 255, 0.15);
  background-color: rgba(255, 255, 255, 0.01);
}

body.dark-theme .choice-card.upload-card:hover {
  border-color: #a5d6a7;
  background-color: rgba(46, 125, 50, 0.12);
}

.upload-info-label {
  display: block;
}

/* Scanning Laser Animation overlay */
.camera-preview-container {
  position: relative;
}

.scanning-laser {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
  box-shadow: 0 0 14px var(--accent);
  z-index: 5;
  display: none;
  animation: laser-travel 2s linear infinite;
}

@keyframes laser-travel {
  0% { top: 0%; }
  50% { top: 100%; }
  100% { top: 0%; }
}

/* Voice assistant mic pulsing recording states */
.voice-mic-btn.recording {
  background-color: #d32f2f !important;
  box-shadow: 0 0 16px #d32f2f, 0 0 30px rgba(211, 47, 47, 0.3) !important;
  animation: mic-pulse 1.2s infinite ease-in-out;
}

@keyframes mic-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.audio-waves.recording-active span {
  background-color: #f44336 !important;
  animation: wave-burst 0.5s ease-in-out infinite alternate;
}

@keyframes wave-burst {
  0% { height: 4px; }
  100% { height: 22px; }
}

/* Voice Fallback Box inside mockup */
.voice-fallback-box {
  position: absolute;
  bottom: 82px;
  left: 12px;
  right: 12px;
  background-color: #121f12;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 14px;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: fallback-slide 0.3s cubic-bezier(0.1, 0.9, 0.2, 1);
  color: #fff;
}

@keyframes fallback-slide {
  from { transform: translateY(15px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.voice-fallback-box h5 {
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 10px;
  font-family: var(--font-header);
}

.fallback-queries-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
  margin-bottom: 10px;
  padding-right: 4px;
}

.fallback-queries-list::-webkit-scrollbar {
  width: 4px;
}
.fallback-queries-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.fallback-query-btn {
  text-align: left;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.72rem;
  color: #e0eee0;
  font-family: var(--font-body);
  transition: all 0.2s ease;
  line-height: 1.3;
}

.fallback-query-btn:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.fallback-close-btn {
  display: block;
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  text-align: center;
  color: #fff;
  transition: all 0.2s ease;
}

.fallback-close-btn:hover {
  background: rgba(244, 67, 54, 0.2);
  border-color: rgba(244, 67, 54, 0.3);
}

/* Community Forum form layout styling */
.feed-form-card {
  background-color: var(--bg-card);
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.feed-form-header h4 {
  font-size: 1.2rem;
  color: var(--primary-dark);
  margin-bottom: 16px;
}

body.dark-theme .feed-form-header h4 {
  color: #a5d6a7;
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 8px;
}

.form-row-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 12px;
}

.form-group-sm {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.form-group-sm label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-color);
}

.form-group-sm input, 
.form-group-sm textarea {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-light);
  font-size: 0.9rem;
  color: var(--text-color);
  transition: var(--transition);
}

.form-group-sm input:focus, 
.form-group-sm textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.feed-submit-btn {
  padding: 10px 22px;
  font-size: 0.9rem;
  border-radius: 8px;
  align-self: flex-start;
  margin-top: 4px;
}

/* Download progress bar modal */
.download-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.download-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 22, 15, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  width: 90%;
  max-width: 500px;
  padding: 36px;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  z-index: 2501;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.1, 0.9, 0.2, 1);
}

.download-modal.active .modal-content {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 2rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}

.modal-close-btn:hover {
  color: var(--text-color);
}

.download-spinner-emoji {
  font-size: 3rem;
  display: inline-block;
  animation: emoji-bob 1.5s ease-in-out infinite alternate;
}

@keyframes emoji-bob {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

.download-loader-header {
  text-align: center;
  margin-bottom: 24px;
}

.download-loader-header h3 {
  font-size: 1.5rem;
  margin-top: 12px;
  margin-bottom: 8px;
}

.download-loader-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.progress-bar-container {
  width: 100%;
  height: 12px;
  background-color: var(--border-color);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  width: 0%;
  border-radius: 6px;
  transition: width 0.25s ease-out;
}

.progress-percentage {
  position: absolute;
  right: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  background-color: var(--bg-card);
  padding: 0 4px;
  border-radius: 4px;
}

.download-instructions {
  animation: form-reveal 0.4s ease;
}

@keyframes form-reveal {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.instruction-title {
  color: var(--primary);
  font-size: 1.35rem;
  margin-bottom: 12px;
  text-align: center;
}

body.dark-theme .instruction-title {
  color: #a5d6a7;
}

.instruction-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  text-align: center;
}

.instruction-list {
  padding-left: 20px;
  margin-bottom: 24px;
  font-size: 0.92rem;
  color: var(--text-color);
}

.instruction-list li {
  margin-bottom: 10px;
  line-height: 1.5;
}

.close-modal-btn {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
}

@media (max-width: 600px) {
  .form-row-2col {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .form-row-inner {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* --- Professional Integrations (Lucide, Leaflet Map, Chart.js) --- */
.logo-icon-svg {
  width: 26px;
  height: 26px;
  color: var(--primary);
  margin-right: 8px;
  vertical-align: middle;
  stroke-width: 2.5px;
}

.theme-toggle-btn .lucide {
  width: 20px;
  height: 20px;
  stroke-width: 2px;
}

.header-icon-svg, .forum-icon-svg {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  vertical-align: middle;
  stroke-width: 2px;
}

.weather-loc-icon, .advisory-icon, .contact-icon {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  vertical-align: middle;
  stroke-width: 2px;
}

.info-item {
  display: flex;
  align-items: center;
}

/* Map Card Layout */
.mandi-map-card {
  margin-top: 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.map-card-header {
  background-color: var(--bg-light);
  padding: 12px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-color);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-header-icon {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

#mandi-map {
  height: 250px;
  width: 100%;
  z-index: 1;
  background-color: var(--bg-light);
}

/* Dark mode overrides for Leaflet elements */
body.dark-theme .leaflet-bar a,
body.dark-theme .leaflet-control-zoom {
  background-color: var(--bg-card) !important;
  color: var(--text-color) !important;
  border-color: var(--border-color) !important;
}

body.dark-theme .leaflet-popup-content-wrapper,
body.dark-theme .leaflet-popup-tip {
  background-color: var(--bg-card) !important;
  color: var(--text-color) !important;
  border: 1px solid var(--border-color);
}

/* Chart Panel Layout */
.mandi-chart-panel {
  margin-top: 25px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.chart-header {
  background-color: var(--bg-light);
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-header-icon {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.mandi-chart-container {
  padding: 20px;
  position: relative;
  height: 240px;
  width: 100%;
  box-sizing: border-box;
}

body.dark-theme .mandi-chart-panel,
body.dark-theme .mandi-map-card {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

/* --- Sizing and Colors for Vector Lucide Icons --- */
.choice-emoji svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
  display: block;
}

body.dark-theme .choice-emoji svg {
  color: #a5d6a7;
}

.sim-leaf-icon-container svg {
  width: 64px;
  height: 64px;
  color: var(--primary);
  display: block;
}

body.dark-theme .sim-leaf-icon-container svg {
  color: #a5d6a7;
}

.user-avatar svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

body.dark-theme .user-avatar svg {
  color: #a5d6a7;
}

.ai-avatar svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

body.dark-theme .ai-avatar svg {
  color: #ffb74d;
}

.post-action-icon {
  width: 14px;
  height: 14px;
  vertical-align: middle;
}

