* {
  box-sizing: border-box;
}

html {
  height: 100vh;
  /* Full viewport - REQUIRED */
}



body {
  background-color: black;
  color: white;
  font-family: "GT America", Arial, sans-serif;
  font-size: 12px;
  padding: 8px 16px;
  margin: 0px;
  height: 100vh;
  /* Takes html's 100vh */
  overflow: hidden;
  /* Scroll inside viewport */
  line-height: 1.4;
}

.body-page {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.navbar {
  display: flex;
  width: 280px;
  flex: 1;
  gap: 22px;
  /* Consistent spacing between items */
  padding: 16px;
  /* Internal padding */
  height: 800px;
}

.navbar-hr {
  width: 0.4px;
}

.news-divider {
  border: none;
  width: 2px;
  height: 1800px;
  background-color: #2a2e39;
}

li {
  font-weight: 4px;
}

.sidebar {
  color: white !important;
  width: 241px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 20px;

}

.sidebar-background {
  background-color: #1a1a1a;
}

.sidebar h2,
.sidebar a {
  color: white !important;
  text-decoration: none;
}

.sidebar a:hover {
  color: #2b5f50 !important;
  /* Light gray on hover */
}

.bar-header {
  display: flex;
  flex-direction: row;
  height: 48px;
  width: 100%;
  align-items: center;
  gap: 40px;
}

@import url("https://fonts.googleapis.com/css2?family=SF+Pro+Display:wght@400;500;600&display=swap");

.bar-header h2 {
  flex-shrink: 0;
  margin: 0;
  font-family:
    "SF Pro Display",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
}

/* yahoo-search.css - Perfect Yahoo Finance search bar */

.siderbar-header {
  font-family:
    "SF Pro Display",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
  font-size: 14px;
  margin-bottom: 12px;
  font-style: italic;
  font-weight: bold;
  text-align: center;
  margin: 8px 1px 12px 1px;
}

.country-selector select {
  background: #2a2e39;
  color: white;
  border: 1px solid #3a3e44;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  min-width: 70px;
  margin-left: 8px;
}

.gainers-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 280px;
  overflow-y: auto;
}

.gainer-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 20px;
  /* ✅ Compact rows */
  border-bottom: 1px solid #2a2e39;
  font-size: 13px;
  transition: background 0.2s;
}

.gainer-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.symbol {
  font-weight: 500;
  color: #e6e6e6;
  flex: 1;
}

.price-change {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  min-width: 80px;
}

.price {
  font-size: 12px;
  color: #9aa4b2;
  font-weight: 500;
}

.change {
  font-size: 12px;
  font-weight: 700;
  margin-top: 1px;
}

.green {
  color: #26a69a !important;
}

/* ✅ Gainer green */

.no-data {
  padding: 20px;
  text-align: center;
  color: #666;
  font-style: italic;
}

/* Scrollbar */
.gainers-list::-webkit-scrollbar {
  width: 4px;
}

.gainers-list::-webkit-scrollbar-track {
  background: #1a1a1a;
}

.gainers-list::-webkit-scrollbar-thumb {
  background: #2a2e39;
  border-radius: 2px;
}

/* Nuclear option - ZERO space between spans */

.no-space-span {
  font-size: inherit;
  word-spacing: -3px !important;
  /* Negative word spacing */
  letter-spacing: -1px !important;
}

.no-space-span span {
  margin: 0 !important;
  padding: 0 !important;
  display: inline !important;
  font-size: inherit;
}

.title-initial {
  color: #0078ff;
}

/* Remove ALL whitespace rendering */
.no-space-span span:before {
  content: "";
  margin-left: -2px;
}

.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #d9d9d9;
  font-size: 16px;
  padding: 8px 0;
  height: 28px;
}

.search-input::placeholder {
  color: #868686;
}

.search-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: #0078ff;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.search-btn:hover {
  background: #0066cc;
  transform: scale(1.05);
}

.search-btn:active {
  transform: scale(0.98);
}

.search-icon {
  width: 18px;
  height: 18px;
  fill: white;
  pointer-events: none;
}

.yahoo-search-form {
  display: flex;
  flex-direction: column;
}

.yahoo-search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: #1a1a1a;
  border: 1px solid #303030;
  border-radius: 24px;
  padding: 4px;
  height: 34px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.yahoo-search-box:focus-within {
  border-color: #00c851;
  box-shadow: 0 0 0 3px rgba(0, 200, 81, 0.1);
}

#queryInput {
  flex: 1;
  background: transparent;
  border: none;
  color: #e3e3e3;
  font-size: 15px;
  padding: 8px 16px;
  outline: none;
  caret-color: #00c851;
}

.search-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: #00c851;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  flex-shrink: 0;
}

.search-btn:hover {
  transform: scale(1.05);
}

.search-container {
  flex: 1;
  /* grows to fill */
}

.date-time-container {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.header-clock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #2a2e39;
  border-radius: 999px;
  font-family: "SF Pro Display", Arial, sans-serif;
  font-size: 13px;
  color: #e3e3e3;
}

.clock-date {
  cursor: pointer;
  font-weight: 500;
}

.hidden-date-picker {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  pointer-events: none;
}

.green {
  color: green;
}

.red {
  color: red;
}

main {
  display: flex;
  flex-direction: column;
}

.main-body {
  /* min-width: 700px; */
  display: flex;
  flex-direction: row;
  overflow: auto;
  flex: 1;
  gap: 40px;
  /* flex-direction: column; */
}

.main-body-content {
  width: calc(100vw - 320px);
  /* Grow to fill */
  /* Remove padding squeeze */
  overflow: auto;
  /* padding: 20px; */
}

.divider {
  margin-top: 14px;
  border: 1.4px solid rgb(86, 138, 86);
  /* height: 1px; */
  /* background-color: #2A2E39; */
  /* margin: 20px 0; */
  width: 100%;
  position: relative;
  /* top: -10px; */
}

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

.news-page-button {
  background-color: #1a1a1a;
  border: none !important;
  color: #f574ee;
  border-radius: 50% !important;
}

.news-page-button * {
  border-radius: inherit;
  /* Inherit to SVG */
}

.news-page-button:hover {
  transform: scale(1.05);
  /* background: #818ff2; */

  /* Circular boundary/glow */
  box-shadow:
    0 0 0 1px rgb(245, 241, 244),
    0 0px 1px rgb(248, 244, 248);
}

.news-page-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #00c851;
}

/* Update stock-table.css - add container with exact dimensions */

/* Responsive table-container - scrollable under 620px */

.table-container {
  width: 800px;
  /* Never exceed viewport */
  overflow-y: auto;
  color: #e3e3e3;
  font-family: "GT America", Arial, sans-serif;
  background-color: #050505;
  border-left: 1px solid #141414;
  border: 1px solid #2a2e39;
  position: relative;
  top: 14px;
  left: 8px;
  display: flex;
  align-items: center;
  /* Responsive behavior */
  /* Minimum height on mobile */
}

/* Under 620px - full viewport width + horizontal scroll */
@media (max-width: 948px) and (min-width: 625px) {
  .table-container {
    /* Full viewport width */
    height: 100vh;
    /* Full viewport height */

    border-radius: 0;
    /* Edge-to-edge */
    border-left: none;
    /* Remove side border on mobile */

    /* Enable horizontal scroll for table */
    overflow-x: auto !important;
    /* overflow-y: auto; */

    /* Sticky header on scroll */
    border-top: 1px solid #2a2e39;
  }
}

/* Tablet - intermediate */

.table-container::-webkit-scrollbar {
  width: 6px;
  /* Thin scrollbar */
  height: 6px;
}

.table-container::-webkit-scrollbar-track {
  background: #f1a7a700;
  /* Dark track */
  border-radius: 3px;
}

.table-container::-webkit-scrollbar-thumb {
  background: #000000;
  /* Pure black thumb */
  border-radius: 3px;
  border: none;
}

.table-container::-webkit-scrollbar-thumb:hover {
  background: #333333;
  /* Slightly lighter on hover */
}

.table-container .stock-table {
  width: 100%;
  height: 100%;
  border-collapse: collapse;
  scrollbar-width: thin;
  scrollbar-color: #000000 #1a1a1a;
}

/* Rest of table styles remain same */
.table-container .stock-table thead th {
  font-weight: 500;
  text-align: left;
  border-bottom: 1px solid #2a2e39;
  border-top: 1px solid #2a2e39;
  border-right: 1px solid #2a2e39;
}

.table-container .stock-table tbody td {
  border-bottom: 1px solid #2a2e39;
}

/* Hover */
.table-container .stock-table tbody tr:hover {
  background-color: #151515;
}

/* stock-table.css */
.stock-table {
  width: 100%;
  border-collapse: collapse;
  font-family: "GT America", Arial, sans-serif;
  color: #e3e3e3;
}

/* Header row like screenshot */
.stock-table thead {
  background-color: #000000;
}

.stock-table thead th {
  padding: 0px 8px;
  font-size: 12px;
  text-align: left;
  border-bottom: 1px solid #2a2e39;
  color: #e3e3e3;
}

/* Body rows */
.stock-table tbody tr {
  background-color: #050505;
}

.stock-table tbody tr:nth-child(even) {
  background-color: #0b0b0b;
}

.stock-table tbody td {
  padding: 0px 8px;
  font-size: 14px;
}

/* Hover row */
.stock-table tbody tr:hover {
  background-color: #151515;
}

/* Numeric cells right aligned */
.stock-table td.num,
.stock-table th.num {
  text-align: right;
}

/* Optional: subtle divider on left side */
.stock-table {
  border-left: 1px solid #141414;
}

/* Add vertical border after 1st column - update stock-table.css */

.table-container .stock-table th:nth-child(1),
.table-container .stock-table td:nth-child(1) {
  /* First column - no right border */
  border-right: none !important;
}

.table-container .stock-table th:nth-child(1) a,
.table-container .stock-table td:nth-child(1) a,
.table-container .stock-table th:nth-child(1) a:link,
.table-container .stock-table td:nth-child(1) a:link,
.table-container .stock-table th:nth-child(1) a:visited,
.table-container .stock-table td:nth-child(1) a:visited,
.table-container .stock-table th:nth-child(1) a:hover,
.table-container .stock-table td:nth-child(1) a:hover,
.table-container .stock-table td:nth-child(1) a:active {
  width: 28px;
  height: 18px;
  color: #9fd7ff !important;
  text-decoration: none;
}

.table-container .stock-table th:nth-child(2),
.table-container .stock-table td:nth-child(2) {
  /* Second column onwards - subtle vertical divider after 1st col */
  border-left: 1px solid #2a2e39;
  /* Extra padding after divider */
}

/* Alternative: Single vertical line exactly after 1st column */
.table-container .stock-table th:nth-child(1),
.table-container .stock-table td:nth-child(1) {
  position: relative;
}

.table-container .stock-table th:nth-child(1)::after,
.table-container .stock-table td:nth-child(1)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background-color: #2a2e39;
  /* Vertical divider color */
  z-index: 1;
}

@media (max-width: 805px) {
  .news-divider {
    display: none !important;
  }

  .sidebar {
    display: none !important;
  }

  .stock-table {
    width: 100% !important;
    /* Fill container */
    min-width: 480px !important;
    /* Force horizontal scroll */
    table-layout: fixed;
    /* Prevent column shrinking */
  }

  /* Column flexibility */
  .stock-table th,
  .stock-table td {
    min-width: 80px;
    /* Minimum column size */
  }
}

.predictor {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 30px;
  border-radius: 15px;
  color: white;
  text-align: center;
  max-width: 400px;
  margin: 20px auto;
}

#stock-symbol {
  padding: 15px;
  font-size: 18px;
  border: none;
  border-radius: 10px;
  width: 200px;
  margin-right: 10px;
}

.prediction {
  margin-top: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

/* CSS Variables for themes - override your existing colors */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --text-primary: #000000;
  --text-secondary: #666666;
  --search-bg: #ffffff;
}

[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --text-primary: #000000;
  --text-secondary: #666666;
  --search-bg: #ffffff;

  .sun-icon {
    color: rgb(208, 246, 18);
    /* Bright lime ✓ */
    filter: drop-shadow(0 0 4px rgb(208, 246, 18));
    /* Glow effect */
    transform: scale(1.8);
    /* 10% bigger */
  }

  .theme-toggle-btn {
    color: yellow;
    /* Button inherits to SVG */
  }

  .title-later {
    color: #185de8;
  }
}

[data-theme="dark"] {
  --bg-primary: #121212;
  --bg-secondary: #1e1e1e;
  --text-primary: #ffffff;
  --text-secondary: #aaaaaa;
  --search-bg: #2a2a2a;

  .title-later {
    color: white;
  }
}

/* Apply variables - add these to body, .bar-header, etc. */
body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition:
    background-color 0.3s,
    color 0.3s;
}

.bar-header {
  background-color: var(--header-bg);
  font-weight: 900;
}

.search-container input {
  background-color: var(--search-bg);
}

/* Update other elements like .stock-table, .sidebar-background, etc. with var() */

/* Toggle button styles */
.theme-toggle-container {
  display: flex;
  align-items: center;
}

.theme-toggle-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: rgb(240, 186, 186);
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.theme-icon {
  width: 20px;
  height: 20px;
  transition: opacity 0.3s ease;
}

.sun-icon {
  opacity: 1;
}

.moon-icon {
  opacity: 0;
  position: absolute;
}

[data-theme="dark"] .sun-icon {
  opacity: 0;
}

[data-theme="dark"] .moon-icon {
  opacity: 1;
}