/* ==========================================================================
   UPDATES: AGRI NEWS & MARKET (KRRISHI) - MODERN WEB APP DESIGN SYSTEM
   ========================================================================== */

:root {
  --primary: #3B82F6;
  --primary-hover: #2563EB;
  --primary-light: #60A5FA;
  --primary-soft: #EFF6FF;
  --accent-gold: #F59E0B;
  --accent-gold-soft: #FEF3C7;
  --accent-red: #EF4444;
  --navy: #0f172a;
  --slate-dark: #1e293b;
  --slate: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg: #f8fafc;
  --card: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.88);
  --glass-border: rgba(255, 255, 255, 0.6);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px -4px rgba(15, 23, 42, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Material Symbols Icon Base */
.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 24;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--slate);
  line-height: 1.5;
  overflow-x: hidden;
  padding-bottom: 70px; /* Space for mobile bottom nav */
}

@media (min-width: 768px) {
  body {
    padding-bottom: 30px;
  }
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
}

.brand-logo-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1.5px solid rgba(249, 115, 22, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.18);
  flex-shrink: 0;
  overflow: hidden;
  padding: 4px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.brand-container:hover .brand-logo-icon {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(249, 115, 22, 0.28);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-text h1 {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.15;
  letter-spacing: -0.3px;
}

.brand-text span {
  color: var(--primary);
}

.brand-tagline {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  display: block;
}

/* Desktop Nav Tabs */
.desktop-nav {
  display: none;
  gap: 6px;
  align-items: center;
}

@media (min-width: 768px) {
  .desktop-nav {
    display: flex;
  }
}

.nav-tab-btn {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-tab-btn:hover {
  color: var(--navy);
  background: #f1f5f9;
}

.nav-tab-btn.active {
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 700;
}

.nav-tab-btn .appa-nav-icon {
  font-size: 20px;
  font-variation-settings: 'FILL' 1, 'wght' 600;
  color: inherit;
  transition: transform 0.2s ease;
}

.nav-tab-btn:hover .appa-nav-icon,
.nav-tab-btn.active .appa-nav-icon {
  transform: scale(1.1);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Language Switcher */
.lang-selector {
  display: flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.lang-btn {
  border: none;
  background: transparent;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}

.lang-btn.active {
  background: var(--card);
  color: var(--primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* Download App Button */
.btn-get-app {
  display: none;
  align-items: center;
  gap: 6px;
  background: var(--navy);
  color: white;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
}

@media (min-width: 992px) {
  .btn-get-app {
    display: inline-flex;
  }
}

.btn-get-app:hover {
  background: var(--slate-dark);
  transform: translateY(-1px);
}

/* ==========================================================================
   LIVE BREAKING TICKER
   ========================================================================== */

.ticker-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  overflow: hidden;
}

.ticker-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fee2e2;
  color: #dc2626;
  font-weight: 800;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.ticker-badge i {
  animation: pulse 1.5s infinite;
}

.ticker-content {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--navy);
  font-weight: 600;
  cursor: pointer;
}

.ticker-content:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* ==========================================================================
   APP CONTAINER & VIEWS
   ========================================================================== */

.app-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px;
}

.tab-view {
  display: none;
  animation: fadeIn 0.25s ease-out;
}

.tab-view.active {
  display: block;
}

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

/* ==========================================================================
   NEWS MODULE
   ========================================================================== */

/* Category Pills Strip */
.category-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.category-strip::-webkit-scrollbar {
  display: none;
}

.category-pill {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--slate);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.category-pill:hover:not(.active) {
  border-color: #00e5ff;
  color: #0284c7;
  background: rgba(0, 229, 255, 0.08);
  transform: translateY(-1px);
}

.category-pill.active {
  background: linear-gradient(135deg, #1e88e5 0%, #00e5ff 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 229, 255, 0.45);
  font-weight: 700;
}

.category-pill.active i {
  color: #ffffff;
}

/* Search Box */
.search-container {
  position: relative;
  margin-bottom: 20px;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
  color: var(--navy);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 15px;
}

/* Featured Hero News Card */
.featured-hero {
  background: var(--card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

@media (min-width: 900px) {
  .featured-hero {
    flex-direction: row;
    min-height: 340px;
  }
}

.featured-hero:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.featured-media {
  position: relative;
  background: #0f172a;
  min-height: 220px;
}

@media (min-width: 900px) {
  .featured-media {
    flex: 1.2;
    min-height: auto;
  }
}

.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.featured-badge {
  position: absolute;
  top: 14px;
  left: 120px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

.external-source-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  color: white;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: background 0.2s, transform 0.2s;
}

.featured-hero:hover .external-source-badge {
  background: var(--primary);
  transform: translateY(-1px);
}

.featured-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}

.featured-category {
  color: var(--primary);
  font-weight: 700;
  font-size: 12.5px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.featured-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.35;
  margin-bottom: 12px;
}

@media (min-width: 900px) {
  .featured-title {
    font-size: 26px;
  }
}

.featured-snippet {
  color: var(--slate);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.meta-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-share {
  border: none;
  background: var(--primary-soft);
  color: var(--primary);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-share:hover {
  background: var(--primary);
  color: white;
}

/* News Grid */
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 640px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .news-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.news-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.25s ease;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.card-thumb {
  position: relative;
  height: 180px;
  background: #f1f5f9;
  overflow: hidden;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.news-card:hover .card-thumb img {
  transform: scale(1.05);
}

/* Card Brand Watermark Badge */
.card-brand-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 3px 8px 3px 6px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.9);
  z-index: 3;
  pointer-events: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-brand-tag img {
  width: 15px;
  height: 15px;
  object-fit: contain;
  display: block;
}

.card-brand-tag span {
  font-size: 11px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.2px;
  font-family: var(--font-heading);
  line-height: 1;
}

.card-brand-tag.featured-brand {
  top: 14px;
  left: 14px;
  padding: 4px 10px 4px 7px;
}

.card-brand-tag.featured-brand img {
  width: 18px;
  height: 18px;
}

.card-brand-tag.featured-brand span {
  font-size: 12px;
}

.news-card:hover .card-brand-tag {
  transform: scale(1.05);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.24);
}

.thumb-tag {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  color: white;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
}

.external-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: transform 0.2s, background 0.2s;
}

.news-card:hover .external-tag {
  background: var(--primary);
  transform: scale(1.1);
}

.source-name {
  font-size: 11.5px;
  color: var(--primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-snippet {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   MANDI MARKET RATES MODULE
   ========================================================================== */

.mandi-header-box {
  background: linear-gradient(135deg, #1D4ED8, #1E3A8A);
  color: white;
  padding: 24px;
  border-radius: var(--radius-xl);
  margin-bottom: 20px;
  box-shadow: 0 8px 24px -4px rgba(29, 78, 216, 0.35);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mandi-header-box h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
}

.mandi-header-box p {
  font-size: 13.5px;
  opacity: 0.9;
}

.mandi-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  background: var(--card);
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

@media (min-width: 640px) {
  .mandi-controls {
    grid-template-columns: 1fr 1fr;
  }
}

.filter-select {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: white;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  outline: none;
}

.filter-select:focus {
  border-color: var(--primary);
}

/* Commodity Chips */
.commodity-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 16px;
  scrollbar-width: none;
}

.commodity-chips::-webkit-scrollbar {
  display: none;
}

.commodity-chip {
  padding: 7px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  color: var(--slate);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.commodity-chip.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

/* Mandi Rates Grid */
.mandi-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 640px) {
  .mandi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .mandi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.mandi-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s ease;
}

.mandi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #BFDBFE;
}

.mandi-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.mandi-market-name {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  color: var(--navy);
}

.mandi-district {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.mandi-commodity-badge {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
}

.price-boxes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: #f8fafc;
  padding: 10px;
  border-radius: var(--radius-md);
  text-align: center;
}

.price-item .price-label {
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
}

.price-item .price-val {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  color: var(--navy);
  margin-top: 2px;
}

.price-item.highlight .price-val {
  color: var(--primary);
  font-size: 16px;
}

.mandi-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}

/* ==========================================================================
   APPA AI ASSISTANT MODULE
   ========================================================================== */

.appa-container {
  max-width: 840px;
  margin: 0 auto;
  background: var(--card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 160px);
  min-height: 520px;
}

.appa-header {
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  color: white;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.appa-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.appa-avatar-orb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #1e88e5 0%, #00e5ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.6);
  position: relative;
  overflow: hidden;
}

.appa-avatar-orb .material-symbols-rounded {
  font-size: 26px;
  color: white;
  font-variation-settings: 'FILL' 1, 'wght' 600;
  position: relative;
  z-index: 2;
}

.appa-avatar-orb::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: var(--radius-full);
  border: 2px solid rgba(255, 255, 255, 0.4);
  animation: ripple 2s infinite ease-out;
}

.appa-info h3 {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 800;
}

.appa-info span {
  font-size: 11.5px;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 5px;
}

.appa-info span::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: #34d399;
}

/* Chat History */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #f8fafc;
}

.chat-bubble {
  max-width: 82%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.55;
  animation: fadeIn 0.2s ease;
  position: relative;
}

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

.chat-bubble.ai {
  align-self: flex-start;
  background: white;
  color: var(--navy);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  border-bottom-left-radius: 4px;
}

.bubble-time {
  font-size: 10px;
  opacity: 0.7;
  margin-top: 4px;
  display: block;
  text-align: right;
}

.bubble-speak-btn {
  border: none;
  background: #EFF6FF;
  color: #1D4ED8;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Suggestion Chips */
.quick-chips-bar {
  padding: 8px 16px;
  background: white;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.quick-chips-bar::-webkit-scrollbar {
  display: none;
}

.chip-btn {
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--slate);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.chip-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: #a7f3d0;
}

/* Chat Input Bar */
.chat-input-bar {
  padding: 12px 16px;
  background: white;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-mic {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: #f1f5f9;
  border: 1px solid var(--border);
  color: var(--slate);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.btn-mic:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.btn-mic.listening {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
  animation: pulse 1.2s infinite;
}

.chat-input-field {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 10px 18px;
  font-size: 14px;
  outline: none;
  background: #f8fafc;
}

.chat-input-field:focus {
  background: white;
  border-color: var(--primary);
}

.btn-send {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--primary);
  border: none;
  color: white;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.btn-send:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
}

/* ==========================================================================
   WEATHER MODULE
   ========================================================================== */

.weather-container {
  max-width: 800px;
  margin: 0 auto;
}

.weather-hero-card {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: white;
  border-radius: var(--radius-xl);
  padding: 30px 24px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.weather-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.weather-location h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
}

.weather-location p {
  color: #94a3b8;
  font-size: 13px;
}

.weather-condition-icon {
  font-size: 48px;
  color: var(--accent-gold);
}

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

.weather-temp-main {
  font-family: var(--font-heading);
  font-size: 56px;
  font-weight: 900;
  line-height: 1;
}

.weather-desc {
  font-size: 18px;
  color: #cbd5e1;
  font-weight: 600;
}

.weather-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
}

.w-stat-item {
  text-align: center;
}

.w-stat-item i {
  font-size: 18px;
  color: var(--primary-light);
  margin-bottom: 4px;
}

.w-stat-item .w-val {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
}

.w-stat-item .w-lbl {
  font-size: 11px;
  color: #94a3b8;
}

/* 5 Day Forecast Cards */
.forecast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

.forecast-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.forecast-card .f-day {
  font-weight: 700;
  font-size: 13px;
  color: var(--navy);
  margin-bottom: 8px;
}

.forecast-card .f-icon {
  font-size: 26px;
  color: var(--accent-gold);
  margin-bottom: 8px;
}

.forecast-card .f-temp {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 16px;
  color: var(--navy);
}

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION BAR
   ========================================================================== */

.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 62px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
}

@media (min-width: 768px) {
  .mobile-bottom-nav {
    display: none;
  }
}

.m-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  flex: 1;
  padding: 6px 0;
  transition: all 0.2s;
}

.m-nav-item i {
  font-size: 18px;
  transition: transform 0.2s;
}

.m-nav-item .material-symbols-rounded {
  font-size: 22px;
  transition: transform 0.2s;
  font-variation-settings: 'FILL' 1, 'wght' 600;
}

.m-nav-item.active {
  color: var(--primary);
  font-weight: 800;
}

.m-nav-item.active i,
.m-nav-item.active .material-symbols-rounded {
  transform: translateY(-2px);
}

/* Floating Appa Orb - Matches Flutter App Home Screen AI Assistant */
.floating-appa-orb {
  position: fixed;
  bottom: 74px;
  right: 18px;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #1e88e5 0%, #00e5ff 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 18px 2px rgba(0, 229, 255, 0.6), 0 8px 24px rgba(30, 136, 229, 0.4);
  cursor: pointer;
  z-index: 90;
  border: none;
  overflow: hidden;
  animation: appaPulse 1s ease-in-out infinite alternate;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.floating-appa-orb .material-symbols-rounded {
  font-size: 32px;
  color: #ffffff;
  position: relative;
  z-index: 2;
  font-variation-settings: 'FILL' 1, 'wght' 600;
}

/* Shimmer Light Sweep (Matches Flutter .shimmer() Animation) */
.floating-appa-orb::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    transparent 25%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 75%
  );
  animation: appaShimmer 2.2s infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes appaPulse {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.06);
  }
}

@keyframes appaShimmer {
  0% {
    transform: translateX(-140%) rotate(25deg);
  }
  100% {
    transform: translateX(140%) rotate(25deg);
  }
}

@media (min-width: 768px) {
  .floating-appa-orb {
    bottom: 28px;
    right: 28px;
    width: 65px;
    height: 65px;
  }

  .floating-appa-orb .material-symbols-rounded {
    font-size: 36px;
  }
}

.floating-appa-orb:hover {
  transform: scale(1.12);
  box-shadow: 0 0 24px 4px rgba(0, 229, 255, 0.8), 0 12px 32px rgba(30, 136, 229, 0.5);
}

/* ==========================================================================
   FULL-SCREEN READER MODAL
   ========================================================================== */

.reader-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.reader-modal.active {
  display: flex;
}

.reader-card {
  background: white;
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  animation: modalPop 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.reader-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.reader-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reader-btn {
  border: 1px solid var(--border);
  background: #f8fafc;
  color: var(--slate);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.reader-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: #a7f3d0;
}

.btn-close-reader {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: none;
  background: #f1f5f9;
  color: var(--navy);
  font-size: 16px;
  cursor: pointer;
}

.reader-body {
  padding: 24px;
}

.reader-body img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}

.reader-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.35;
  margin-bottom: 14px;
}

.reader-meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.reader-text {
  font-size: 16px;
  line-height: 1.8;
  color: #1e293b;
}

.reader-text p {
  margin-bottom: 16px;
}

/* Audio Player Bar in Reader */
.audio-bar {
  background: var(--primary-soft);
  border: 1.5px solid #a7f3d0;
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.audio-bar-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #065f46;
}

/* ==========================================================================
   SHIMMER SKELETON LOADERS
   ========================================================================== */

.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.08); }
}

@keyframes ripple {
  0% { transform: scale(0.9); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ==========================================================================
   PAGINATION CONTROLS
   ========================================================================== */

.pagination-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 32px;
  margin-bottom: 36px;
  width: 100%;
}

.pagination-info {
  font-size: 13px;
  font-weight: 600;
  color: var(--slate);
  background: var(--card);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.pagination-info strong {
  color: var(--primary);
  font-weight: 800;
}

.pagination-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.page-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--navy);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
  transform: translateY(-1px);
}

.page-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.page-btn.btn-arrow {
  padding: 0 12px;
}

.page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 38px;
  color: var(--slate);
  font-weight: 800;
  font-size: 14px;
}

@media (max-width: 480px) {
  .page-btn {
    min-width: 34px;
    height: 34px;
    font-size: 12.5px;
    padding: 0 8px;
  }
  .page-btn.btn-arrow {
    padding: 0 10px;
  }
  .page-btn.btn-arrow span {
    display: none;
  }
}

