/* ═══════════════════════════════════════════
   INDIASEARCH — Professional UI
   Google-inspired · Mobile-first · Dark/Light
═══════════════════════════════════════════ */

/* ── FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Instrument+Serif:ital@0;1&display=swap');

/* ── VARIABLES ── */
:root {
  --font-main: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Instrument Serif', Georgia, serif;

  /* Light Mode */
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --bg-card: #ffffff;
  --bg-hover: #f1f3f4;
  --border: #e2e5e9;
  --border-focus: #1a73e8;

  --text-primary: #202124;
  --text-secondary: #5f6368;
  --text-muted: #9aa0a6;
  --text-link: #1558d6;
  --text-link-visited: #6d23b4;
  --text-url: #1e6b45;

  --accent-blue: #1a73e8;
  --accent-blue-soft: #e8f0fe;
  --accent-india: #FF6B35;
  --accent-green: #138808;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10), 0 1px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-search: 0 2px 8px rgba(32,33,36,0.18), 0 1px 3px rgba(32,33,36,0.10);
  --shadow-search-focus: 0 4px 16px rgba(32,33,36,0.24), 0 1px 4px rgba(32,33,36,0.12);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 999px;

  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] {
  --bg: #0f1013;
  --bg-alt: #1a1b1e;
  --bg-card: #1e2026;
  --bg-hover: #26282e;
  --border: #2e3038;
  --border-focus: #5a9bff;

  --text-primary: #e8eaed;
  --text-secondary: #9aa0a6;
  --text-muted: #5f6368;
  --text-link: #8ab4f8;
  --text-link-visited: #c58af9;
  --text-url: #5cbc88;

  --accent-blue: #5a9bff;
  --accent-blue-soft: #1a2744;
  --accent-india: #FF8855;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4), 0 1px 4px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.5), 0 4px 12px rgba(0,0,0,0.3);
  --shadow-search: 0 2px 8px rgba(0,0,0,0.4), 0 1px 3px rgba(0,0,0,0.3);
  --shadow-search-focus: 0 4px 20px rgba(0,0,0,0.6), 0 2px 8px rgba(0,0,0,0.4);
  --glass-bg: rgba(30, 32, 38, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
}

/* ── RESET & BASE ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════════
   HEADER
═══════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

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

.brand {
  text-decoration: none;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 1px;
  flex-shrink: 0;
}
.brand-india { color: var(--accent-india); }
.brand-search { color: var(--accent-blue); }
.brand-dot { color: var(--accent-green); font-size: 28px; line-height: 0; margin-top: 4px; }

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Language Select */
.lang-select {
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: all var(--transition);
  max-width: 160px;
}
.lang-select:hover { background: var(--bg-hover); }
.lang-select:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(26,115,232,0.12); }

/* Auth Button */
.btn-outline {
  height: 38px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--accent-blue);
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-outline:hover { background: var(--accent-blue-soft); border-color: var(--accent-blue); }

/* User Pill & Dropdown */
.user-pill {
  position: relative;
  display: flex !important;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-card);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}
.user-pill:hover { background: var(--bg-hover); border-color: var(--accent-blue); }

.dots-icon {
  color: var(--text-muted);
  margin-right: 4px;
  display: flex;
  align-items: center;
}

.user-action-hub { position: relative; }
.menu-dots-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.menu-dots-btn:hover { background: var(--bg-alt); border-color: var(--accent-blue); transform: scale(1.05); }



.user-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
}
.mini-avatar {
  width: 32px;
  height: 32px;
  background: var(--accent-blue);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all 0.2s;
}
.dropdown-item:hover { background: var(--bg-alt); }
.dropdown-item.primary-item { color: var(--accent-blue); background: rgba(26, 115, 232, 0.05); margin-bottom: 4px; }
.dropdown-item.primary-item:hover { background: rgba(26, 115, 232, 0.1); }
.dropdown-item.danger { color: #d93025; }
.dropdown-item.danger:hover { background: #fee7e6; }
.dropdown-item.danger svg { color: #eb4335; }

.dropdown-sep {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-india), var(--accent-blue));
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   MAIN LAYOUT
═══════════════════════════════════════════ */
.main-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 100px;
}

/* ── HERO ── */
.hero {
  text-align: center;
  padding: 60px 0 32px;
  transition: all var(--transition);
}

.hero.hidden {
  display: none;
}

.hero-logo {
  font-size: clamp(48px, 10vw, 76px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 14px;
}
.hl-india { color: var(--accent-india); }
.hl-search { color: var(--accent-blue); }

.hero-tagline {
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ── WEATHER PANEL (SMART ANSWER) ── */
.weather-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  animation: slideDown 0.4s ease-out;
}

/* ✨ Advanced AI Mode (Grok/Google Style) */
[data-ai-mode="true"] {
  --bg: #030712; /* Deep Dark Background */
  --bg-card: #0f172a;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --border: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(17, 24, 39, 0.85);
}

.ai-overview-card {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
  animation: ai-pulse 4s infinite alternate, slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes ai-pulse {
  0% { box-shadow: 0 20px 50px rgba(99, 102, 241, 0.1); }
  100% { box-shadow: 0 20px 60px rgba(168, 85, 247, 0.2); }
}

.ai-overview-card::before {
  content: "";
  position: absolute;
  top: -100px; left: -100px; width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  filter: blur(50px);
}

.ai-overview-header {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #a78bfa; /* Soft Purple */
  margin-bottom: 20px;
}

.ai-overview-text {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.ai-overview-text p { margin-bottom: 1.25rem; }
.ai-overview-text ul, .ai-overview-text ol { margin-left: 1.5rem; margin-bottom: 1.25rem; }
.ai-overview-text li { margin-bottom: 0.5rem; }
.ai-overview-text h1, .ai-overview-text h2, .ai-overview-text h3 {
  color: #fff; margin-top: 2rem; margin-bottom: 1rem;
}

/* Links inside AI */
.ai-source-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid var(--border);
}

.ai-link-item {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  min-width: 140px;
  transition: all 0.2s ease;
}

.ai-link-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

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

.weather-panel::before {
  content: "";
  position: absolute;
  top: 0; right: 0; width: 150px; height: 150px;
  background: radial-gradient(circle, var(--accent-blue) 0%, transparent 70%);
  opacity: 0.1;
  filter: blur(40px);
}

.wp-main {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-bottom: 20px;
}

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

.wp-icon {
  width: 70px;
  height: 70px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.wp-temp {
  font-size: 48px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -1px;
}

.wp-right {
  flex: 1;
}

.wp-city {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.wp-desc {
  font-size: 16px;
  color: var(--accent-blue);
  font-weight: 600;
  margin-bottom: 2px;
}

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

/* News Snapshot Styling */
.news-snapshot {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.wp-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.wp-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-body);
  border-radius: 12px;
}

.wp-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.wp-stat-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Sports Panel Styling (Premium Glassmorphism) */
.sports-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.4s ease-out;
}

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

.sp-header {
  padding: 12px 20px;
  background: rgba(41, 121, 255, 0.1);
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

.sp-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sports-match {
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--border-color);
}

.sports-match:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sm-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.sm-badge {
  font-size: 10px;
  background: var(--accent-blue);
  color: white;
  padding: 2px 8px;
  border-radius: 99px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.sm-venue {
  font-size: 11px;
  color: var(--text-muted);
}

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

.sm-score {
  font-size: 14px;
  color: var(--accent-blue);
  font-weight: 600;
  margin-bottom: 6px;
}

.sm-status {
  font-size: 12px;
  color: #ff4757; /* Red for Live Status */
  font-weight: 600;
}

.host-name {
  display: block;
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
  margin-bottom: 4px;
}

.ai-link-title {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #f8fafc;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

/* 📊 Finance Panel (Alpha Vantage) */
.finance-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.4s ease-out;
}

.fin-header {
  padding: 12px 20px;
  background: rgba(41, 121, 255, 0.1);
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  display: flex;
  align-items: center;
  color: var(--text-primary);
  gap: 10px;
}

.fin-content {
  padding: 20px;
}

.fin-symbol {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}

.fin-main {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
}

.fin-price {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
}

.fin-delta {
  font-size: 16px;
  font-weight: 600;
}

.stock-up { color: #1e8e3e; }
.stock-down { color: #d93025; }

.fin-extra {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 15px 0;
  border-top: 1px solid var(--border);
}

.fin-item {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.fin-item span {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 2px;
}

.fin-footer {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 16px;
  font-style: italic;
  opacity: 0.8;
}

/* ═══════════════════════════════════════════
   SEARCH BOX
═══════════════════════════════════════════ */
.search-shell {
  position: relative;
  margin-bottom: 8px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 18px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-search);
  transition: box-shadow var(--transition), border-color var(--transition);
  position: relative;
}

.search-box:hover {
  box-shadow: var(--shadow-search-focus);
}

.search-box:focus-within {
  box-shadow: var(--shadow-search-focus);
  border-color: var(--border-focus);
}

.search-box.has-suggestions {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border-bottom-color: var(--border);
}

.s-icon {
  color: var(--text-secondary);
  display: flex;
  flex-shrink: 0;
}

#searchInput {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 400;
  color: var(--text-primary);
  outline: none;
  min-width: 0;
}

#searchInput::placeholder { color: var(--text-muted); }

.s-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.s-divider {
  width: 1px;
  height: 22px;
  background: var(--border);
  margin: 0 6px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.icon-btn.listening {
  background: #ea4335;
  color: #fff;
  animation: pulse-mic 1.2s ease infinite;
}
@keyframes pulse-mic {
  0%, 100% { box-shadow: 0 0 0 0 rgba(234,67,53,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(234,67,53,0); }
}

/* ── AI Buttons (Updated Green Style) ── */
.btn-ai, .btn-ai-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border: none;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #00b09b, #96c93d); /* Premium Forest Green Gradient */
  color: #fff;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 800; /* Extra Bold as requested */
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s var(--transition-bounce);
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(0, 176, 155, 0.3);
}

.btn-ai:hover, .btn-ai-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 176, 155, 0.4);
  filter: brightness(1.1);
}

.btn-ai:active, .btn-ai-toggle:active {
  transform: translateY(0);
}

/* Scan Status */
.scan-status {
  font-size: 12px;
  color: var(--text-muted);
  padding: 6px 20px 0;
  min-height: 0;
}

/* ═══════════════════════════════════════════
   AUTOCOMPLETE
═══════════════════════════════════════════ */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-md);
  z-index: 200;
  overflow: hidden;
  display: none;
}

.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: background var(--transition);
}
.autocomplete-item:hover { background: var(--bg-hover); }
.autocomplete-item svg { color: var(--text-muted); flex-shrink: 0; }

/* ═══════════════════════════════════════════
   FILTER BAR
═══════════════════════════════════════════ */
.filter-bar {
  display: flex;
  gap: 12px;
  padding: 14px 16px 20px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1.5px solid var(--border);
  margin-bottom: 20px;
  -webkit-overflow-scrolling: touch;
}
.filter-bar::-webkit-scrollbar { display: none; }

.filter-pill.ai-tab {
    background: rgba(0, 176, 155, 0.1);
    color: #4ade80;
    border: 1px solid rgba(0, 176, 155, 0.4);
    font-weight: 800;
    animation: pulseGreen 2s infinite;
}

/* ── Weather Card (Premium) ── */
.weather-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  overflow: hidden;
}

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

.weather-city {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.weather-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.weather-temp {
  font-size: 48px;
  font-weight: 900;
  background: linear-gradient(135deg, #FF9966, #FF5E62);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 10px 0;
}

.weather-desc {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.weather-visual img {
  width: 100px;
  height: 100px;
  filter: drop-shadow(0 0 10px rgba(255,153,102,0.4));
}

.weather-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.w-det-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.w-det-item span {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Sports Scoreboard (Premium) ── */
.sports-section {
  margin-bottom: 24px;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.score-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.score-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.sc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.sc-badge {
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.sc-live-dot {
  width: 8px;
  height: 8px;
  background: #ff4d4d;
  border-radius: 50%;
  animation: pulseLive 1.5s infinite;
}

@keyframes pulseLive {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

.sc-status {
  font-size: 11px;
  color: #ff4d4d;
  font-weight: 600;
}

.sc-teams {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.sc-team-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sc-team-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.team-a { background: #3b82f6; }
.team-b { background: #fbbf24; }

.sc-team-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.sc-vs {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  margin-left: 20px;
}

.sc-score-area {
  padding: 12px;
  background: rgba(0,0,0,0.03);
  border-radius: 12px;
  text-align: center;
  margin-bottom: 12px;
}

.sc-main-score {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
}

.sc-sub-score {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

/* ── Elite Sports Scoreboard (Next Gen) ── */
.score-grid-elite {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 16px;
}

.elite-card {
  background: linear-gradient(145deg, var(--bg-card), rgba(0,0,0,0.02));
  border-left: 5px solid #3b82f6;
  border-radius: 12px 20px 20px 12px;
  padding: 20px;
}

.flex-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin: 15px 0;
}

.sc-team-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.team-initials {
  width: 50px;
  height: 50px;
  background: #3b82f6;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}
.team-initials.secondary { background: #fbbf24; box-shadow: 0 4px 10px rgba(251, 191, 36, 0.3); }

.sc-vs-circle {
  width: 34px;
  height: 34px;
  background: var(--bg-main);
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  z-index: 2;
}

.sc-main-details {
  text-align: center;
  padding: 15px 0;
  border-bottom: 1px dashed var(--border);
}

.sc-score-big {
  font-size: 36px;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -1px;
}

.sc-overs-small {
  font-size: 13px;
  color: #3b82f6;
  font-weight: 700;
}

.sc-player-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 15px 0;
}

.player-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.ps-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}
.ps-val.highlighted { color: #10b981; font-weight: 700; }

.sc-footer-venue {
  font-size: 11px;
  color: var(--text-muted);
  padding-top: 10px;
  text-align: center;
}

.sc-trust-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}

.sc-date {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
  opacity: 0.8;
}

.sc-sync-badge {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 100px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.filter-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding-bottom: 12px;
  margin-bottom: -1.5px;
}
.filter-pill:hover { color: var(--text-primary); }
.filter-pill.active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
  font-weight: 600;
}

/* ═══════════════════════════════════════════
   HISTORY CHIPS
═══════════════════════════════════════════ */
.history-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 0 8px;
  justify-content: center;
}

.history-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.history-chip:hover { background: var(--bg-hover); border-color: var(--border-focus); color: var(--text-primary); }

.remove-history {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.remove-history:hover { background: var(--border); color: var(--text-primary); }

/* ═══════════════════════════════════════════
   TRENDING
═══════════════════════════════════════════ */
.trending-wrap {
  padding: 20px 0;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}
.section-label svg { color: var(--accent-india); }

.trending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.trending-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition);
}
.trending-item:hover {
  border-color: var(--accent-blue);
  background: var(--accent-blue-soft);
  color: var(--accent-blue);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.trending-icon { font-size: 16px; }

/* ═══════════════════════════════════════════
   AI SUMMARY & KNOWLEDGE PANEL
═══════════════════════════════════════════ */
.ai-summary-wrap { margin-bottom: 20px; }

.ai-overview-card {
  background: linear-gradient(135deg, rgba(66,133,244,0.06) 0%, rgba(138,91,238,0.06) 100%);
  border: 1px solid rgba(66,133,244,0.2);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-bottom: 20px;
  animation: fadeUp 0.4s var(--transition);
}

.ai-overview-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-blue);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ai-overview-text {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text-primary);
}

[data-theme="dark"] .ai-overview-card {
  background: linear-gradient(135deg, rgba(90,155,255,0.08) 0%, rgba(138,91,238,0.08) 100%);
  border-color: rgba(90,155,255,0.2);
}

/* Summary Box */
.summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-blue);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.summary-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.summary-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* Knowledge Panel */
.knowledge-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.knowledge-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.knowledge-preview, .knowledge-full {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.knowledge-preview {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}
.knowledge-overview summary {
  cursor: pointer;
  color: var(--accent-blue);
  font-size: 13px;
  font-weight: 600;
  list-style: none;
  user-select: none;
}
.knowledge-overview summary::-webkit-details-marker { display: none; }
.knowledge-overview summary::after { content: " ↓"; }
.knowledge-overview[open] summary::after { content: " ↑"; }
.knowledge-card a {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent-blue);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.knowledge-card a:hover { text-decoration: underline; }

/* AI Links Box */
.ai-links-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.ai-links-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}
.ai-link-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.ai-link-item:last-child { border-bottom: none; }
/* ── SCAN RESULTS ── */
.scan-status {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

.scan-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 10px;
  box-shadow: var(--shadow-md);
  text-align: center;
  animation: slideUp 0.3s ease-out;
}

.scan-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-green);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.scan-data {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  word-break: break-all;
}

.scan-link-btn {
  display: inline-block;
  background: var(--accent-blue);
  color: white;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: all var(--transition);
}

.scan-link-btn:hover {
  background: #1558d6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26,115,232,0.3);
}

/* ── HEADER USER HUB ── */
.user-action-hub {
  position: relative;
  display: flex;
  align-items: center;
}

.menu-dots-btn {
  width: 40px;
  height: 40px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  margin-left: 12px;
}

.menu-dots-btn:hover {
  background: var(--bg-alt);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  box-shadow: var(--shadow-sm);
}

.dropdown-sep {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}
/* ── AUTH SYSTEM ── */
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px;
  position: relative;
  animation: authSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes authSlideUp {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.auth-header h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
}

.close-btn {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.auth-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  background: var(--bg-alt);
  padding: 4px;
  border-radius: var(--radius-md);
}

.auth-tab {
  flex: 1;
  border: none;
  background: none;
  padding: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab.active {
  background: var(--bg-card);
  color: var(--accent-blue);
  box-shadow: var(--shadow-sm);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form input {
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  background: var(--bg-card);
  color: var(--text-primary);
  outline: none;
}

.auth-form input:focus { border-color: var(--accent-blue); }

.phone-input-group {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.country-code {
  padding: 0 12px;
  background: var(--bg-alt);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  border-right: 1px solid var(--border);
}

.phone-input-group input { border: none; flex: 1; border-radius: 0; }

.btn-primary {
  height: 48px;
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover { background: #1558d6; transform: translateY(-1px); }

.auth-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-footer a { color: var(--accent-blue); font-weight: 700; text-decoration: none; }

.user-dropdown {
  position: fixed;
  top: 70px;
  right: 20px;
  width: 260px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  padding: 12px;
  z-index: 10000;
  display: none;
  flex-direction: column;
  backdrop-filter: blur(20px);
  animation: authSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-sep {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

.user-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.mini-avatar {
  width: 32px;
  height: 32px;
  background: var(--accent-blue);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: 0.2s;
}

.dropdown-item:hover { background: var(--bg-alt); }
.dropdown-item.primary-item { color: var(--accent-blue); background: rgba(26,115,232,0.05); }
.dropdown-item.danger { color: #d93025; }
.dropdown-item.danger:hover { background: #fee7e6; }
/* ── LIVE SCANNER ── */
.live-scanner {
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 20px;
  border: 2px solid var(--accent-blue);
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
  position: relative;
  animation: slideUp 0.4s ease;
}

.scanner-header {
  background: var(--bg-card);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}

.scanner-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-primary);
  cursor: pointer;
}

.scanner-video-wrap {
  position: relative;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
}

#scannerVideo {
  width: 100%;
  max-width: 500px;
  height: auto;
  transform: scaleX(1); /* Ensure it is not mirrored for better QR alignment */
}

.scanner-guide {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  border: 2px dashed rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  pointer-events: none;
}

#liveScanStatus {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}
.ai-source-badge {
  display: inline-block;
  padding: 3px 10px;
  background: var(--accent-blue-soft);
  color: var(--accent-blue);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
}
.ai-link-title {
  display: block;
  color: var(--text-link);
  font-size: 15.5px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.4;
  margin-bottom: 4px;
}
.ai-link-title:hover { text-decoration: underline; }
.ai-link-url {
  font-size: 13px;
  color: var(--text-url);
}

/* Image Warning */
.image-warning-bar {
  padding: 12px 16px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: var(--radius-md);
  color: #78350f;
  font-size: 13.5px;
  margin-bottom: 16px;
}
[data-theme="dark"] .image-warning-bar {
  background: rgba(252,211,77,0.08);
  border-color: rgba(252,211,77,0.2);
  color: #fcd34d;
}

/* ═══════════════════════════════════════════
   RESULTS
═══════════════════════════════════════════ */
.results-wrap { margin-top: 4px; }

/* Result Item */
.result-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  animation: fadeUp 0.3s ease both;
}
.result-item:last-child { border-bottom: none; }

.result-site-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.result-favicon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  overflow: hidden;
}
.result-host {
  font-size: 13px;
  color: var(--text-url);
  font-weight: 500;
}
.result-title {
  display: block;
  font-size: 19px;
  font-weight: 400;
  color: var(--text-link);
  text-decoration: none;
  line-height: 1.35;
  margin-bottom: 5px;
  word-break: break-word;
  transition: color var(--transition);
}
.result-title:hover { text-decoration: underline; }
.result-title:visited { color: var(--text-link-visited); }
.result-snippet {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary);
  word-break: break-word;
}
.result-snippet span.result-date {
  color: var(--text-muted);
  font-size: 13px;
}

.read-here-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding: 6px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--accent-blue);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
}
.read-here-btn:hover { background: var(--accent-blue-soft); border-color: var(--accent-blue); }

.inline-article-box {
  margin-top: 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 14px;
  line-height: 1.7;
}
.inline-article-box h4 { color: var(--text-link); margin-bottom: 12px; font-size: 15px; }
.inline-article-scroll { max-height: 360px; overflow-y: auto; color: var(--text-secondary); }
.inline-article-link {
  display: inline-block;
  margin-top: 14px;
  font-weight: 600;
  color: var(--accent-blue);
  text-decoration: none;
  font-size: 13px;
}
.inline-article-link:hover { text-decoration: underline; }

/* ── IMAGE GRID ── */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.image-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition);
  animation: fadeUp 0.3s ease both;
}
.image-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.image-frame {
  aspect-ratio: 4/3;
  background: var(--bg-alt);
  overflow: hidden;
  cursor: zoom-in;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.image-card:hover .image-frame img { transform: scale(1.05); }

.image-meta { padding: 10px 12px 12px; }
.image-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 5px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.image-source { font-size: 11.5px; color: var(--text-muted); }
.scanner-footer {
  padding: 15px;
  background: var(--bg-card);
  display: flex;
  justify-content: center;
  border-top: 1px solid var(--border);
}

.scanner-gallery-btn {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition);
}

.scanner-gallery-btn:hover {
  background: var(--accent-blue-soft);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}
.image-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 6px;
  background: rgba(255,107,53,0.1);
  color: var(--accent-india);
}
.image-open-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-blue);
  text-decoration: none;
}
.image-open-link:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════
   SKELETON LOADER
═══════════════════════════════════════════ */
.skeleton-wrap { padding: 8px 0; }
.skeleton-item { margin-bottom: 28px; }

.skel {
  background: var(--bg-alt);
  border-radius: 6px;
  animation: shimmer 1.6s ease-in-out infinite;
}
.skel-host { width: 140px; height: 14px; margin-bottom: 8px; }
.skel-title { width: 70%; height: 22px; margin-bottom: 8px; }
.skel-text { width: 100%; height: 15px; margin-bottom: 6px; }
.skel-text-short { width: 75%; height: 15px; }

@keyframes shimmer {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.9; }
}

/* ═══════════════════════════════════════════
   PAGINATION
═══════════════════════════════════════════ */
.pagination-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 32px 0 20px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--accent-blue);
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.page-btn:hover { background: var(--accent-blue-soft); border-color: var(--accent-blue); }
.page-btn.active { background: var(--accent-blue); color: #fff; border-color: var(--accent-blue); }
.page-btn:disabled { color: var(--text-muted); border-color: var(--border); cursor: not-allowed; background: var(--bg-alt); }

/* ═══════════════════════════════════════════
   EMPTY & ERROR STATES
═══════════════════════════════════════════ */
.state-empty, .state-error {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
  font-size: 15px;
}
.state-empty-icon, .state-error-icon { font-size: 48px; margin-bottom: 16px; display: block; }
.state-error {
  background: rgba(217,48,37,0.05);
  border: 1px solid rgba(217,48,37,0.15);
  border-radius: var(--radius-md);
  color: #d93025;
}

/* ═══════════════════════════════════════════
   DARK MODE FAB (FIXED BOTTOM RIGHT)
═══════════════════════════════════════════ */
.theme-fab {
  position: fixed;
  bottom: 28px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  transition: all var(--transition-bounce);
  color: var(--text-primary);
}
.theme-fab:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  border-color: var(--accent-blue);
}
.theme-fab:active { transform: scale(0.95); }

.fab-sun { display: flex; }
.fab-moon { display: none; }

[data-theme="dark"] .fab-sun { display: none; }
[data-theme="dark"] .fab-moon { display: flex; }

/* ═══════════════════════════════════════════
   OVERLAY MODALS
═══════════════════════════════════════════ */
.overlay-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

/* ── IMAGE MODAL ── */
.img-modal-inner {
  position: relative;
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.img-modal-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  width: 100%;
  position: relative;
}
.img-bar-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
  backdrop-filter: blur(4px);
}
.img-bar-btn:hover { background: rgba(255,255,255,0.25); }
.img-close-btn:hover { background: rgba(220,50,40,0.7); }

.download-menu {
  position: absolute;
  top: 52px;
  right: 52px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 10001;
}
.download-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition);
}
.download-item:hover { background: var(--bg-hover); }

.zoomed-img {
  max-width: 90vw;
  max-height: 78vh;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: zoomIn 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  object-fit: contain;
}

/* ── AUTH CARD ── */
.auth-card {
  position: relative;
  width: min(100%, 450px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 35px 32px;
  box-shadow: var(--shadow-lg);
  animation: authSlideUp 0.4s var(--transition);
}
@keyframes authSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.auth-tabs {
  display: flex;
  background: var(--bg-alt);
  border-radius: 30px;
  padding: 4px;
  margin-bottom: 25px;
  border: 1px solid var(--border);
}
.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  border-radius: 25px;
  transition: all 0.3s var(--transition);
}
.auth-tab.active {
  background: var(--bg-card);
  color: var(--accent-blue);
  box-shadow: var(--shadow-sm);
}

.captcha-box {
  background: var(--bg-alt);
  padding: 15px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
  margin: 15px 0;
  text-align: center;
}
.captcha-input { letter-spacing: 0.2em; font-weight: 800; text-align: center; text-transform: uppercase; }

.auth-tab.active {
  background: var(--bg-card);
  color: var(--accent-blue);
  box-shadow: var(--shadow-sm);
}

.auth-msg {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  padding: 0 0 12px;
  min-height: 0;
}
.auth-msg.error { color: #d93025; }
.auth-msg.success { color: #188038; }

.auth-form { display: grid; gap: 14px; }

.field-wrap { display: grid; gap: 5px; }
.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.field-input {
  width: 100%;
  height: 46px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 14px;
  font-family: var(--font-main);
  font-size: 14px;
  background: var(--bg);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(26,115,232,0.12);
}
.field-input:disabled { opacity: 0.6; cursor: not-allowed; }

.pw-wrap { position: relative; }
.pw-wrap .field-input { padding-right: 70px; }
.pw-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  height: 28px;
  padding: 0 10px;
  border: none;
  border-radius: var(--radius-full);
  background: var(--accent-blue-soft);
  color: var(--accent-blue);
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.link-btn {
  border: none;
  background: transparent;
  color: var(--accent-blue);
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-align: left;
}
.link-btn:hover { text-decoration: underline; }

.btn-primary {
  height: 48px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--accent-blue);
  color: #fff;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-primary:hover { background: #1557b0; box-shadow: 0 4px 14px rgba(26,115,232,0.3); }
.btn-primary:active { transform: scale(0.98); }
.full-w { width: 100%; }

/* Modal Close Btn */
.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}
.modal-close-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

/* ── PROFILE CARD ── */
.profile-card { width: min(100%, 560px); }

.profile-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 22px;
}
.profile-stat {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-alt);
}
.profile-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 5px;
}
.profile-stat strong { font-size: 14px; color: var(--text-primary); }

.profile-section h3 { font-size: 14px; font-weight: 700; }

.profile-history-list { display: grid; gap: 8px; margin-top: 12px; }
.profile-history-item {
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-main);
}
.profile-history-item:hover { background: var(--accent-blue-soft); border-color: var(--accent-blue); }
.profile-history-query {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
}
.profile-history-meta { font-size: 12px; color: var(--text-muted); }
.profile-empty { font-size: 14px; color: var(--text-muted); text-align: center; padding: 20px; }

/* ═══════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes zoomIn {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes spinGlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 768px) {
  .header-inner { padding: 0 16px; height: 58px; }
  .brand { font-size: 20px; }
  .lang-select { max-width: 120px; font-size: 12px; }
  .user-email-text { display: none; }
  .hero { padding: 40px 0 24px; }
  .main-wrap { padding: 0 16px 80px; }
  .result-title { font-size: 17px; }
  .trending-grid { grid-template-columns: 1fr 1fr; }
  .image-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

@media (max-width: 600px) {
  .hero-logo { letter-spacing: -1.5px; }
  .s-actions { gap: 2px; }
  .s-divider { margin: 0 4px; }
  .btn-ai { padding: 0 12px; font-size: 12px; }
  .icon-btn { width: 34px; height: 34px; }
  .filter-bar { gap: 2px; }
  .filter-pill { padding: 6px 10px 12px; font-size: 12.5px; }
  .trending-grid { grid-template-columns: 1fr; }
  .profile-card { width: 100%; }
  .theme-fab { bottom: 20px; right: 16px; width: 48px; height: 48px; }
}

@media (max-width: 480px) {
  .header-inner { height: 54px; padding: 0 12px; }
  .brand { font-size: 18px; }
  .lang-select { max-width: 100px; font-size: 11px; padding: 0 10px; }
  .pill-btn { padding: 0 8px; font-size: 11px; }
  .search-box { padding: 8px 8px 8px 14px; }
  #searchInput { font-size: 15px; }
  .auth-card { padding: 24px 18px; }
  .image-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/** ── AI MODE BOX (CHAT-STYLE BOTTOM DOCK) ── **/
.ai-mode-box {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    min-height: 80px;
    background: rgba(15, 15, 20, 0.85);
    backdrop-filter: blur(30px) saturate(200%);
    border: 1.5px solid rgba(138, 91, 238, 0.4);
    border-radius: 24px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
    z-index: 1000;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(138, 91, 238, 0.15);
    animation: slideUpAi 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes slideUpAi {
    from { opacity: 0; transform: translate(-50%, 40px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.ai-pdf-preview {
    position: relative;
    z-index: 5;
    background: rgba(0, 243, 255, 0.08);
    border: 1px solid rgba(0, 243, 255, 0.2);
    border-radius: 12px;
    padding: 8px 12px;
    margin-bottom: 15px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #0ef;
    font-size: 13px;
    font-weight: 500;
    max-width: fit-content;
    animation: fadeInSlide 0.4s ease;
}

.ai-pdf-preview svg {
    flex-shrink: 0;
}

.main-wrap.ai-active {
    padding-bottom: 150px; /* Space for the bottom input */
}

.ai-input-wrap {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    gap: 15px;
}

#aiSearchInput {
    background: transparent;
    border: none;
    color: #f8fafc;
    font-size: 17px;
    font-family: var(--font-main);
    flex: 1;
    resize: none;
    outline: none;
    line-height: 1.4;
    padding: 8px 0;
    max-height: 150px;
}

#aiSearchInput::placeholder {
    color: #64748b;
}

.ai-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
}

.ai-mini-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--transition-bounce);
}

.ai-mini-btn:hover {
    background: rgba(138, 91, 238, 0.1);
    color: #8a5bee;
    border-color: rgba(138, 91, 238, 0.3);
    transform: translateY(-2px);
}

.ai-send-btn {
    background: linear-gradient(135deg, #4285f4, #8a5bee);
    border: none;
    color: white;
    width: 44px;
    height: 38px;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--transition-bounce);
    box-shadow: 0 4px 15px rgba(66, 133, 244, 0.3);
}

.ai-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(138, 91, 238, 0.4);
}

/** ── PDF STATUS PILL (Updated for AI Mode) ── **/
.pdf-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid rgba(0, 243, 255, 0.3);
    color: #0ef;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 12px;
    animation: fadeInSlide 0.4s ease;
    box-shadow: 0 4px 15px rgba(0, 243, 255, 0.1);
}

.pdf-status-pill svg {
    opacity: 0.8;
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════
   PREMIUM NEWS CARDS WITH IMAGES
═══════════════════════════════════════════ */
.news-grid-premium {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 8px;
}

.news-card-premium {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease-out;
}

.news-card-premium:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-blue);
}

.news-card-img-wrap {
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: var(--bg-alt);
  flex-shrink: 0;
}

.news-card-img-wrap.news-card-no-img {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-alt), var(--bg-hover));
  height: 120px;
}

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

.news-card-premium:hover .news-card-img {
  transform: scale(1.04);
}

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

.news-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.news-source-chip {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-blue);
  background: var(--accent-blue-soft);
  padding: 2px 8px;
  border-radius: 99px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.news-dot {
  color: var(--text-muted);
  font-size: 14px;
}

.news-card-host {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.news-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

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

.news-card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
}

.news-read-btn {
  font-size: 12px;
  padding: 5px 12px;
  background: var(--accent-blue-soft);
  color: var(--accent-blue);
  border: 1px solid transparent;
}

.news-read-btn:hover {
  background: var(--accent-blue);
  color: white;
}

.news-open-link {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.news-open-link:hover {
  color: var(--accent-blue);
}

/* Responsive: single column on mobile */
@media (max-width: 600px) {
  .news-grid-premium {
    grid-template-columns: 1fr;
  }
  .news-card-img-wrap {
    height: 200px;
  }
}