/**
 * QuantoPick - Stockopedia-Inspired Dark Theme
 * Modern, clean, professional stock screener UI
 */

/* ============================================ */
/* CSS VARIABLES */
/* ============================================ */
:root {
  /* Backgrounds */
  --bg-primary: #0f1117;
  --bg-secondary: #161920;
  --bg-card: #1e222a;
  --bg-card-hover: #262b36;
  --bg-input: #12151c;
  --bg-overlay: rgba(0, 0, 0, 0.7);

  /* Text */
  --text-primary: #e8eaed;
  --text-secondary: #9aa0a6;
  --text-muted: #5f6368;
  --text-inverse: #0f1117;

  /* Accent Colors */
  --accent-primary: #4285f4;
  --accent-green: #00c853;
  --accent-green-soft: rgba(0, 200, 83, 0.12);
  --accent-red: #ff5252;
  --accent-red-soft: rgba(255, 82, 82, 0.12);
  --accent-orange: #ffab40;
  --accent-cyan: #00bcd4;
  --accent-purple: #7c4dff;

  /* Borders */
  --border-color: #2d333b;
  --border-light: #3d444d;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* Light Theme Override */
[data-theme="light"] {
  --bg-primary: #f5f6fa;
  --bg-secondary: #ebedf2;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f1f5;
  --bg-input: #e8eaef;
  --bg-overlay: rgba(0, 0, 0, 0.4);
  --text-primary: #1a1a2e;
  --text-secondary: #555770;
  --text-muted: #8c8fa3;
  --text-inverse: #ffffff;
  --accent-primary: #3b6df0;
  --accent-green: #0d9e4f;
  --accent-green-soft: rgba(13, 158, 79, 0.1);
  --accent-red: #e03e3e;
  --accent-red-soft: rgba(224, 62, 62, 0.1);
  --accent-orange: #e68a00;
  --accent-cyan: #0097a7;
  --accent-purple: #6234c9;
  --border-color: #d4d6de;
  --border-light: #c8cad2;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Skeleton loading shimmer */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-secondary) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-title { height: 22px; width: 60%; margin-bottom: 12px; }
.skeleton-card { height: 120px; border-radius: 10px; }
.skeleton-row { display: flex; gap: 12px; margin-bottom: 10px; }
.skeleton-row > div { flex: 1; }
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Back to Top button */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #fff;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 90;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: opacity 0.3s, transform 0.3s;
}
.back-to-top.visible { display: flex; }
.back-to-top:hover { transform: scale(1.1); }

/* Print styles */
@media print {
  .header, .nav-toggle, .nav-menu, .ad-top-banner, .ad-footer-banner,
  .footer, .back-to-top, .theme-toggle, .btn, .landing-hero,
  [data-ad-slot], .loading-state { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .content-card { border: 1px solid #ddd !important; break-inside: avoid; }
  .detail-header { background: none !important; border-bottom: 2px solid #000 !important; }
  .detail-name, .content-card-title { color: #000 !important; }
  a { color: #000 !important; text-decoration: underline !important; }
}

/* Theme toggle button */
.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 1.1rem;
  line-height: 1;
  transition: all 0.2s;
}
.theme-toggle:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

/* Smooth transition for theme switch */
body, .content-card, .header, .footer, .filters-card, .detail-header {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

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

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

/* ============================================ */
/* TYPOGRAPHY */
/* ============================================ */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 2rem; }
.text-4xl { font-size: 2.5rem; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-green { color: var(--accent-green); }
.text-red { color: var(--accent-red); }

/* ============================================ */
/* LAYOUT */
/* ============================================ */
.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 20px;
}

.grid {
  display: grid;
  gap: 20px;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ============================================ */
/* HEADER */
/* ============================================ */
.header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Mobile Navigation */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 1.2rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1;
}
.nav-toggle:hover { background: var(--bg-secondary); }
.nav-menu { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 4px;
    padding-top: 8px;
  }
  .nav-menu.open { display: flex; }
  .nav-menu .btn {
    width: 100%;
    text-align: left;
    padding: 10px 14px !important;
    font-size: 0.85rem !important;
    border-radius: 6px;
  }
}

/* Country Selector */
.country-selector {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: var(--bg-input);
  border-radius: var(--radius-md);
}

.country-btn {
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.country-btn:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.country-btn.active {
  background: var(--accent-primary);
  color: white;
}

.country-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Header Stats */
.header-stats {
  display: flex;
  gap: 20px;
}

.stat-item {
  text-align: center;
  padding: 6px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.stat-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================ */
/* MARKET BAR */
/* ============================================ */
.market-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 14px 0;
}

.market-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.index-display {
  display: flex;
  align-items: center;
  gap: 14px;
}

.index-flag {
  font-size: 2rem;
}

.index-name {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.index-price {
  font-size: 1.75rem;
  font-weight: 800;
}

.index-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 700;
}

.index-change.positive {
  background: var(--accent-green-soft);
  color: var(--accent-green);
}

.index-change.negative {
  background: var(--accent-red-soft);
  color: var(--accent-red);
}

.market-badges {
  display: flex;
  gap: 8px;
}

.market-badge {
  padding: 6px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ============================================ */
/* FILTERS */
/* ============================================ */
.filters-section {
  padding: 20px 0;
}

.filters-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.filters-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.filter-group {
  flex: 1;
  min-width: 140px;
}

.filter-group.search {
  flex: 2;
  min-width: 200px;
}

.filter-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.filter-input,
.filter-select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: var(--transition-fast);
}

.filter-input:focus,
.filter-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.15);
}

.filter-input::placeholder {
  color: var(--text-muted);
}

.filter-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-range input {
  width: 60px;
  padding: 10px 8px;
  text-align: center;
}

.filter-range span {
  color: var(--text-muted);
}

.btn-reset {
  padding: 10px 18px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition-fast);
}

.btn-reset:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

/* ============================================ */
/* VIEW TABS */
/* ============================================ */
.view-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 0 20px;
}

.view-tab {
  padding: 10px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.view-tab:hover {
  border-color: var(--border-light);
  color: var(--text-primary);
}

.view-tab.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

.view-tab .count {
  padding: 2px 8px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
}

/* View tab colors when active */
.view-tab[data-view="Buy+"].active { background: #059669; border-color: #059669; }
.view-tab[data-view="Buy"].active { background: #10b981; border-color: #10b981; }
.view-tab[data-view="Accumulate"].active { background: #34d399; border-color: #34d399; color: #064e3b; }
.view-tab[data-view="Hold"].active { background: #f59e0b; border-color: #f59e0b; color: #78350f; }
.view-tab[data-view="Distribute"].active { background: #f97316; border-color: #f97316; }
.view-tab[data-view="Sell"].active { background: #ef4444; border-color: #ef4444; }
.view-tab[data-view="Sell+"].active { background: #dc2626; border-color: #dc2626; }

/* ============================================ */
/* RESULTS BAR */
/* ============================================ */
.results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.results-count {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.results-count strong {
  color: var(--text-primary);
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-control label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sort-select {
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.8rem;
}

/* ============================================ */
/* STOCK GRID */
/* ============================================ */
.stock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
  padding-bottom: 40px;
}

/* ============================================ */
/* STOCK CARD */
/* ============================================ */
.stock-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-normal);
  cursor: pointer;
}

.stock-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-light);
}

/* Card Header */
.card-header {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}

.card-identity {
  flex: 1;
  min-width: 0;
}

.card-symbol {
  font-size: 1.125rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-symbol a:hover {
  color: var(--accent-cyan);
}

.card-exchange {
  font-size: 0.6rem;
  padding: 2px 6px;
  background: var(--bg-input);
  border-radius: 4px;
  color: var(--text-muted);
}

.card-portfolio {
  font-size: 0.6rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(124, 77, 255, 0.15);
  color: #b388ff;
  text-decoration: none;
  cursor: pointer;
}

.card-portfolio:hover {
  background: rgba(124, 77, 255, 0.3);
}

.card-name {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* View Badge */
.view-badge {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.view-badge.buy-plus { background: #059669; color: white; }
.view-badge.buy { background: #10b981; color: white; }
.view-badge.accumulate { background: #34d399; color: #064e3b; }
.view-badge.hold { background: #f59e0b; color: #78350f; }
.view-badge.distribute { background: #f97316; color: white; }
.view-badge.sell { background: #ef4444; color: white; }
.view-badge.sell-plus { background: #dc2626; color: white; }

/* Card Price */
.card-price-row {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-secondary);
}

.card-price {
  font-size: 1.5rem;
  font-weight: 800;
}

.card-change {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.875rem;
  font-weight: 600;
}

.card-change.positive { color: var(--accent-green); }
.card-change.negative { color: var(--accent-red); }

/* Score Section */
.card-scores {
  padding: 14px 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.score-item {
  text-align: center;
}

.score-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}

.score-bar {
  height: 4px;
  background: var(--bg-input);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 4px;
}

.score-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}

.score-bar-fill.smartmark { background: var(--accent-orange); }
.score-bar-fill.trend { background: var(--accent-cyan); }
.score-bar-fill.swing { background: var(--accent-purple); }
.score-bar-fill.rank { background: var(--accent-primary); }

.score-value {
  font-size: 0.8rem;
  font-weight: 700;
}

.score-value.high { color: var(--accent-green); }
.score-value.mid { color: var(--accent-orange); }
.score-value.low { color: var(--accent-red); }

/* Card Footer */
.card-footer {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.card-sector {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Card Actions */
.card-actions {
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--border-color);
}

.card-btn {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  transition: var(--transition-fast);
}

.card-btn:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.card-btn.primary {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

.card-btn.primary:hover {
  background: #3b78e7;
}

/* ============================================ */
/* STOCK DETAIL PAGE */
/* ============================================ */
.detail-header {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  padding: 32px 0;
  border-bottom: 1px solid var(--border-color);
}

.detail-breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.detail-breadcrumb a:hover {
  color: var(--accent-cyan);
}

.detail-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}

.detail-identity {
  flex: 1;
}

.detail-name-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.detail-flag {
  font-size: 2.5rem;
}

.detail-name {
  font-size: 2rem;
  font-weight: 800;
}

.detail-symbol {
  padding: 8px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.detail-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-tag {
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.detail-tag.sector {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--accent-purple);
  color: var(--accent-purple);
}

.detail-tag.portfolio {
  background: rgba(124, 77, 255, 0.15);
  border-color: #7c4dff;
  color: #b388ff;
  text-decoration: none;
}

.detail-tag.portfolio:hover {
  background: rgba(124, 77, 255, 0.3);
}

.detail-price-section {
  text-align: right;
}

.detail-price-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-price {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.1;
}

.detail-change {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 1.125rem;
  font-weight: 700;
  margin-top: 10px;
}

.detail-change.positive {
  background: var(--accent-green-soft);
  color: var(--accent-green);
}

.detail-change.negative {
  background: var(--accent-red-soft);
  color: var(--accent-red);
}

/* Score Gauges */
.score-gauges {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 24px 0;
}

.gauge-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  position: relative;
}

.gauge-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.gauge-card.smartmark::before { background: var(--accent-orange); }
.gauge-card.trend::before { background: var(--accent-cyan); }
.gauge-card.swing::before { background: var(--accent-purple); }
.gauge-card.momentum::before { background: var(--accent-green); }

.gauge-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.gauge-circle {
  width: 100px;
  height: 100px;
  margin: 0 auto 12px;
  position: relative;
}

.gauge-circle svg {
  transform: rotate(-90deg);
}

.gauge-bg {
  fill: none;
  stroke: var(--bg-input);
  stroke-width: 8;
}

.gauge-fill {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease;
}

.gauge-fill.smartmark { stroke: var(--accent-orange); }
.gauge-fill.trend { stroke: var(--accent-cyan); }
.gauge-fill.swing { stroke: var(--accent-purple); }
.gauge-fill.momentum { stroke: var(--accent-green); }

.gauge-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.75rem;
  font-weight: 900;
}

.gauge-value.smartmark { color: var(--accent-orange); }
.gauge-value.trend { color: var(--accent-cyan); }
.gauge-value.swing { color: var(--accent-purple); }
.gauge-value.momentum { color: var(--accent-green); }

.gauge-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Content Cards */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.content-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.content-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.content-card-body {
  padding: 20px;
}

/* Chart Container */
.chart-container {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.chart-placeholder {
  height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.chart-icon {
  font-size: 3rem;
  opacity: 0.5;
}

/* ============================================ */
/* STATES */
/* ============================================ */
.loading-state,
.empty-state,
.error-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

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

.state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.state-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.state-text {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* Load More Indicator */
.load-more-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

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

/* ============================================ */
/* BUTTONS */
/* ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn:hover {
  background: var(--bg-card-hover);
}

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

.btn-primary:hover {
  background: #3b78e7;
}

/* ============================================ */
/* FOOTER */
/* ============================================ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 24px 0;
  text-align: center;
}

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

/* ============================================ */
/* RESPONSIVE */
/* ============================================ */
@media (max-width: 1024px) {
  .score-gauges {
    grid-template-columns: repeat(2, 1fr);
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .four-col-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 13px;
  }

  .four-col-grid {
    grid-template-columns: 1fr !important;
  }

  .header-inner {
    flex-wrap: wrap;
    justify-content: center;
  }

  .header-stats {
    display: none;
  }

  .market-inner {
    flex-direction: column;
    text-align: center;
  }

  .filters-row {
    flex-direction: column;
  }

  .filter-group {
    width: 100%;
  }

  .stock-grid {
    grid-template-columns: 1fr;
  }

  .detail-title-row {
    flex-direction: column;
    text-align: center;
  }

  .detail-price-section {
    text-align: center;
    width: 100%;
  }

  .detail-name {
    font-size: 1.5rem;
  }

  .detail-price {
    font-size: 2rem;
  }

  .score-gauges {
    grid-template-columns: 1fr 1fr;
  }

  .gauge-circle {
    width: 80px;
    height: 80px;
  }

  .gauge-value {
    font-size: 1.25rem;
  }
}

/* ============================================ */
/* SCROLLBAR */
/* ============================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}

/* ============================================ */
/* UTILITY CLASSES */
/* ============================================ */
.hidden { display: none !important; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.gap-4 { gap: 16px; }

/* ============================================ */
/* CARD GAUGES - Style B Glow Effect */
/* ============================================ */
.card-gauges {
  padding: 20px 16px;
  display: flex;
  justify-content: space-around;
  gap: 8px;
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
}

.card-gauge {
  text-align: center;
  flex: 1;
  max-width: 70px;
}

.card-gauge-circle {
  position: relative;
  width: 56px;
  height: 56px;
  margin: 0 auto;
}

.card-gauge-circle svg {
  transform: rotate(-90deg);
}

.card-gauge-bg {
  fill: none;
  stroke: var(--bg-input);
  stroke-width: 5;
}

.card-gauge-fill {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
}

.card-gauge-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.card-gauge-value {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
}

.card-gauge-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.card-gauge-label {
  font-size: 0.55rem;
  color: var(--text-muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 600;
}

.card-gauge-sub {
  font-size: 0.5rem;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
}

/* Glow Effects */
.glow-cyan { filter: drop-shadow(0 0 6px rgba(0, 188, 212, 0.5)); }
.glow-purple { filter: drop-shadow(0 0 6px rgba(124, 77, 255, 0.5)); }
.glow-green { filter: drop-shadow(0 0 6px rgba(0, 200, 83, 0.5)); }
.glow-light-green { filter: drop-shadow(0 0 6px rgba(105, 240, 174, 0.5)); }
.glow-red { filter: drop-shadow(0 0 6px rgba(255, 82, 82, 0.5)); }
.glow-orange { filter: drop-shadow(0 0 6px rgba(255, 152, 0, 0.5)); }
.glow-blue { filter: drop-shadow(0 0 6px rgba(33, 150, 243, 0.5)); }

/* Trend Animation */
@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.05); }
}
.trend-animated {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* ============================================ */
/* SWING STYLES - Unified Arrow Theme */
/* ============================================ */

/* UpSwing: Blue, upward arrow, solid */
.swing-up .card-gauge-bg {
  stroke: rgba(33, 150, 243, 0.25);
}
.swing-up .card-gauge-fill {
  stroke: url(#grad-swing-up);
  filter: drop-shadow(0 0 6px rgba(33, 150, 243, 0.5));
}
.swing-up .card-gauge-icon {
  color: #2196f3;
  text-shadow: 0 0 10px rgba(33, 150, 243, 0.6);
}

/* DownSwing: Orange, downward arrow, solid */
.swing-down .card-gauge-bg {
  stroke: rgba(255, 152, 0, 0.25);
}
.swing-down .card-gauge-fill {
  stroke: url(#grad-swing-down);
  filter: drop-shadow(0 0 6px rgba(255, 152, 0, 0.5));
}
.swing-down .card-gauge-icon {
  color: #ff9800;
  text-shadow: 0 0 10px rgba(255, 152, 0, 0.6);
}

/* UpSwing + ChangeOver: Color shift animation */
@keyframes color-shift-to-up {
  0%, 100% {
    stroke: #ff9800;
    filter: drop-shadow(0 0 6px rgba(255, 152, 0, 0.5));
  }
  50% {
    stroke: #2196f3;
    filter: drop-shadow(0 0 8px rgba(33, 150, 243, 0.7));
  }
}
@keyframes icon-shift-to-up {
  0%, 100% {
    color: #ff9800;
    text-shadow: 0 0 8px rgba(255, 152, 0, 0.5);
  }
  50% {
    color: #2196f3;
    text-shadow: 0 0 10px rgba(33, 150, 243, 0.7);
  }
}
@keyframes bg-shift-to-up {
  0%, 100% { stroke: rgba(255, 152, 0, 0.25); }
  50% { stroke: rgba(33, 150, 243, 0.25); }
}
.swing-up-co .card-gauge-bg {
  animation: bg-shift-to-up 2.5s ease-in-out infinite;
}
.swing-up-co .card-gauge-fill {
  animation: color-shift-to-up 2.5s ease-in-out infinite;
}
.swing-up-co .card-gauge-icon {
  animation: icon-shift-to-up 2.5s ease-in-out infinite;
}

/* DownSwing + ChangeOver: Color shift animation */
@keyframes color-shift-to-down {
  0%, 100% {
    stroke: #2196f3;
    filter: drop-shadow(0 0 6px rgba(33, 150, 243, 0.5));
  }
  50% {
    stroke: #ff9800;
    filter: drop-shadow(0 0 8px rgba(255, 152, 0, 0.7));
  }
}
@keyframes icon-shift-to-down {
  0%, 100% {
    color: #2196f3;
    text-shadow: 0 0 8px rgba(33, 150, 243, 0.5);
  }
  50% {
    color: #ff9800;
    text-shadow: 0 0 10px rgba(255, 152, 0, 0.7);
  }
}
@keyframes bg-shift-to-down {
  0%, 100% { stroke: rgba(33, 150, 243, 0.25); }
  50% { stroke: rgba(255, 152, 0, 0.25); }
}
.swing-down-co .card-gauge-bg {
  animation: bg-shift-to-down 2.5s ease-in-out infinite;
}
.swing-down-co .card-gauge-fill {
  animation: color-shift-to-down 2.5s ease-in-out infinite;
}
.swing-down-co .card-gauge-icon {
  animation: icon-shift-to-down 2.5s ease-in-out infinite;
}

/* ============================================ */
/* FUNDAMENTALS SECTION */
/* ============================================ */
.fundamentals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

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

.fundamentals-row .fund-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.fundamentals-row .fund-value {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
  text-align: right;
}

.fund-value.positive { color: var(--accent-green); }
.fund-value.negative { color: var(--accent-red); }
.fund-value.muted { color: var(--text-muted); }

.fundamentals-divider {
  grid-column: 1 / -1;
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 4px 0;
}

/* Skeleton loading */
.fund-skeleton {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: 8px;
}

.fund-skeleton-bar {
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--bg-input) 25%, var(--bg-card-hover) 50%, var(--bg-input) 75%);
  background-size: 200% 100%;
  animation: fund-shimmer 1.5s ease-in-out infinite;
}

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

@media (max-width: 640px) {
  .fundamentals-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================ */
/* COMPANY PROFILE SECTION */
/* ============================================ */
.company-summary {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.company-summary.collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.summary-toggle {
  background: none;
  border: none;
  color: var(--accent-primary);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0;
  margin-top: 4px;
  font-family: inherit;
}

.summary-toggle:hover {
  text-decoration: underline;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.profile-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-secondary);
  border-radius: 8px;
  font-size: 0.85rem;
}

.profile-meta-item .meta-label {
  color: var(--text-muted);
}

.profile-meta-item .meta-value {
  color: var(--text-primary);
  font-weight: 500;
}

.profile-meta-item a {
  color: var(--accent-primary);
  text-decoration: none;
}

.profile-meta-item a:hover {
  text-decoration: underline;
}

.officer-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.officer-item {
  padding: 10px 14px;
  background: var(--bg-secondary);
  border-radius: 8px;
}

.officer-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.officer-title {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

@media (max-width: 640px) {
  .officer-list {
    grid-template-columns: 1fr;
  }
}

/* ============================================ */
/* ANALYST RECOMMENDATIONS */
/* ============================================ */
.analyst-bar-wrapper {
  margin-bottom: 16px;
}

.analyst-bar {
  display: flex;
  height: 28px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-input);
}

.analyst-bar-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  min-width: 0;
  transition: width 0.4s ease;
}

.analyst-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.analyst-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.analyst-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.analyst-consensus {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 12px;
}

/* ============================================ */
/* EARNINGS SECTION */
/* ============================================ */
.eps-chart {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  height: 140px;
  padding: 16px 0 0;
}

.eps-quarter {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
}

.eps-bars {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  flex: 1;
  width: 100%;
  justify-content: center;
}

.eps-bar {
  width: 16px;
  border-radius: 3px 3px 0 0;
  min-height: 4px;
  transition: height 0.4s ease;
}

.eps-bar.actual { background: var(--accent-cyan); }
.eps-bar.estimate { background: var(--bg-card-hover); border: 1px solid var(--border-color); }

.eps-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
}

.eps-value {
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
}

.eps-surprise {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
}

.eps-surprise.beat { color: var(--accent-green); background: var(--accent-green-soft); }
.eps-surprise.miss { color: var(--accent-red); background: var(--accent-red-soft); }

.eps-legend {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.eps-legend-item { display: flex; align-items: center; gap: 5px; }
.eps-legend-dot { width: 10px; height: 10px; border-radius: 2px; }

/* Revenue yearly chart */
.revenue-chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 100px;
  padding: 8px 0;
}

.revenue-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
}

.revenue-bar {
  width: 100%;
  max-width: 40px;
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  background: linear-gradient(180deg, var(--accent-purple), var(--accent-cyan));
  transition: height 0.4s ease;
}

.revenue-year {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.revenue-value {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ============================================ */
/* SHAREHOLDING DONUT */
/* ============================================ */
.shareholding-wrapper {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.donut-chart {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

.donut-hole {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.donut-hole-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.donut-hole-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.shareholding-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-width: 160px;
}

.shareholding-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shareholding-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.shareholding-legend-text {
  display: flex;
  justify-content: space-between;
  flex: 1;
  font-size: 0.85rem;
}

.shareholding-legend-label { color: var(--text-secondary); }
.shareholding-legend-pct { font-weight: 600; color: var(--text-primary); }

/* ============================================ */
/* EVENTS TIMELINE */
/* ============================================ */
.events-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.event-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--bg-secondary);
  border-radius: 8px;
}

.event-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.event-details { flex: 1; }

.event-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.event-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.event-countdown {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

/* ============================================ */
/* RATING CHANGES TABLE */
/* ============================================ */
.rating-changes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.rating-changes-table th {
  text-align: left;
  padding: 10px 12px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
}

.rating-changes-table td {
  padding: 10px 12px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(45, 51, 59, 0.5);
}

.rating-changes-table tr:last-child td {
  border-bottom: none;
}

.grade-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.grade-badge.upgrade { color: var(--accent-green); background: var(--accent-green-soft); }
.grade-badge.downgrade { color: var(--accent-red); background: var(--accent-red-soft); }
.grade-badge.maintain { color: var(--text-muted); background: var(--bg-input); }

@media (max-width: 640px) {
  .shareholding-wrapper { flex-direction: column; align-items: center; }
  .eps-chart { gap: 8px; }
  .eps-bar { width: 12px; }
  .rating-changes-table { font-size: 0.75rem; }
  .rating-changes-table th, .rating-changes-table td { padding: 8px 6px; }
}

/* ============================================
   LANDING PAGE
   ============================================ */

.landing-hero {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 60px;
}

.landing-hero-inner {
  max-width: 800px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.landing-logo {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.landing-logo-icon {
  font-size: 3rem;
  line-height: 1;
}

.landing-title {
  font-size: 3rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

.landing-tagline {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.landing-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.6;
  margin: 0 0 32px;
}

/* Search Bar */
.landing-search-wrapper {
  max-width: 640px;
  width: 100%;
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 100px;
  padding: 4px 4px 4px 20px;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}

.landing-search-wrapper:focus-within {
  border-color: var(--accent-cyan);
  box-shadow: 0 4px 24px rgba(0,188,212,0.15);
}

.landing-search-icon {
  font-size: 1.2rem;
  margin-right: 12px;
  opacity: 0.5;
}

.landing-search-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 1.05rem;
  font-family: inherit;
  outline: none;
  padding: 12px 0;
  min-width: 0;
}

.landing-search-input::placeholder {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.landing-search-btn {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.landing-search-btn:hover {
  opacity: 0.9;
}

/* Quick Action Chips */
.landing-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.landing-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  padding: 8px 18px;
  font-size: 0.82rem;
  font-family: inherit;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.landing-chip:hover {
  border-color: var(--accent-cyan);
  color: var(--text-primary);
  background: var(--bg-card-hover, var(--bg-secondary));
}

/* Loading Indicator */
.landing-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
}

.landing-loader-bar {
  width: 200px;
  height: 3px;
  background: var(--bg-secondary);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.landing-loader-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  animation: landing-load-slide 1.2s ease-in-out infinite;
}

@keyframes landing-load-slide {
  0% { left: -40%; }
  100% { left: 100%; }
}

.landing-loader-text {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Browse All Button */
.landing-browse-btn {
  margin-top: 20px;
  background: transparent;
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  border-radius: 100px;
  padding: 10px 28px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.landing-browse-btn:hover {
  background: rgba(0,188,212,0.1);
}

/* Quick Links Section */
.landing-links-section {
  width: 100%;
  max-width: 720px;
  margin-top: 48px;
  text-align: left;
}

.landing-links-group {
  margin-bottom: 24px;
}

.landing-links-heading {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin: 0 0 12px 4px;
}

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

.landing-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md, 8px);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.2s;
}

.landing-link:hover {
  border-color: var(--accent-cyan);
  color: var(--text-primary);
  background: var(--bg-card-hover, var(--bg-secondary));
}

.landing-link-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

/* Header Stats Hidden (Landing Phase) */
.header-stats-hidden {
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 0.3s, max-width 0.3s;
}

.header-stats-hidden .stat-item {
  display: none;
}

/* Transition Animations */
.landing-exit {
  animation: fadeSlideUp 0.4s ease forwards;
}

.screener-enter {
  animation: fadeSlideIn 0.4s ease forwards;
}

@keyframes fadeSlideUp {
  to { opacity: 0; transform: translateY(-30px); }
}

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

/* Global Markets Glance */
.gmg-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.gmg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
}

.gmg-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 14px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, border-color 0.2s;
  cursor: pointer;
  text-align: left;
}

.gmg-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-cyan);
}

.gmg-card.gmg-active {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 1px var(--accent-cyan);
}

.gmg-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.gmg-flag { font-size: 1.4rem; line-height: 1; }
.gmg-country { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.gmg-index-name { font-size: 0.82rem; font-weight: 700; color: var(--text-primary); }

.gmg-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.gmg-price { font-size: 1.2rem; font-weight: 800; color: var(--text-primary); }
.gmg-change { font-size: 0.82rem; font-weight: 600; border-radius: 4px; padding: 2px 6px; }
.gmg-change.positive { color: var(--accent-green); background: var(--accent-green-soft); }
.gmg-change.negative { color: var(--accent-red); background: var(--accent-red-soft); }

.gmg-ratings {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}

.gmg-rating {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.gmg-rating b { font-weight: 800; }

.gmg-top-stocks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

.gmg-top-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gmg-stock-tag {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--bg-secondary);
  color: var(--accent-cyan);
  text-decoration: none;
  transition: background 0.2s;
}

.gmg-stock-tag:hover {
  background: var(--accent-cyan);
  color: var(--bg-primary);
}

.gmg-breadth-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--accent-red-soft);
  overflow: hidden;
  margin-bottom: 4px;
}

.gmg-breadth-up {
  height: 100%;
  background: var(--accent-green);
  border-radius: 3px 0 0 3px;
  transition: width 0.5s;
}

.gmg-breadth-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.62rem;
  color: var(--text-muted);
}

.gmg-breadth-adv { color: var(--accent-green); }
.gmg-breadth-dec { color: var(--accent-red); }

.gmg-skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-secondary) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 10px;
  height: 220px;
}

/* Landing Responsive */
@media (max-width: 768px) {
  .landing-hero { min-height: auto; padding: 30px 16px 40px; }
  .landing-title { font-size: 2rem; }
  .landing-logo-icon { font-size: 2.2rem; }
  .landing-tagline { font-size: 1rem; }
  .landing-subtitle { font-size: 0.82rem; }
  .landing-search-wrapper { padding: 4px 4px 4px 14px; }
  .landing-search-input { font-size: 0.9rem; }
  .landing-search-btn { padding: 10px 18px; font-size: 0.85rem; }
  .landing-chips { gap: 6px; }
  .landing-chip { padding: 6px 12px; font-size: 0.78rem; }
  .landing-links { grid-template-columns: repeat(2, 1fr); }
  .gmg-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .landing-logo { gap: 10px; }
  .landing-title { font-size: 1.7rem; }
  .landing-links { grid-template-columns: 1fr; }
}
