/* styles.css */

/* ============================================
   CSS VARIABLES & THEME
   ============================================ */
:root {
  --bg-primary: #fff;
  --bg-secondary: #fafafa;
  --bg-tertiary: #f5f5f5;
  --text-primary: #000;
  --text-secondary: #333;
  --text-muted: #666;
  --text-faint: #999;
  --border-color: #e0e0e0;
  --border-light: #f0f0f0;
  --accent-green: #16a34a;
  --accent-red: #dc2626;
}

[data-theme="dark"] {
  --bg-primary: #1a1a1a;
  --bg-secondary: #242424;
  --bg-tertiary: #2a2a2a;
  --text-primary: #f0f0f0;
  --text-secondary: #ccc;
  --text-muted: #999;
  --text-faint: #666;
  --border-color: #333;
  --border-light: #2a2a2a;
  --accent-green: #22c55e;
  --accent-red: #ef4444;
}

.roboto-condensed-400{
  font-family: "Roboto Condensed", serif;
}
.jacquard-12-regular {
    font-family: "Jacquard 12", system-ui;
}
.domine{
  font-family: "Domine", serif;
}
h1{
  font-size: 50px;
  font-family:'UnifrakturMaguntia';
  margin-block-start: 0;
  margin-block-end: 0;
  text-align: center;
}
h2{
  font-size:20px;
  font-family:'Domine', serif;
  margin-block-start:0px;
  text-align:center;
  font-weight: normal;
  margin-bottom: 20px;
}
body {
    font-family: 'Domine', serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    margin: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    visibility: hidden; /* Hide container by default */
    overflow-x: hidden;
}

.main-content-flex {
    display: flex;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
}

#content-container {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 350px);
}
/* ============================================
   MAIN CONTENT - TOPIC CARDS
   ============================================ */

.content-row {
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    position: relative;
    width: 100%;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
    gap: 0;
}

.content-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.content-row::after {
    display: none;
}

.text-box {
    background: #fff;
    padding: 0 25px 0 0;
    width: 300px;
    flex-shrink: 0;
    box-sizing: border-box;
    position: relative;
    border-right: 1px solid #e0e0e0;
}

.text-box::after {
    display: none;
}

.topic-timestamp {
    font-size: 11px;
    font-family: 'Roboto Condensed', sans-serif;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.text-box .topic-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 15px 0;
    line-height: 1.3;
    color: var(--text-primary);
}

.text-box .topic-description {
    font-size: 14px;
    font-weight: 400;
    margin: 0 0 10px 0;
    color: #444;
    line-height: 1.6;
}

.text-box .topic-description::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    background: #000;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}
.chart-container {
    max-width: 650px;
    background: #fff;
    padding-top: 20px;
}

.chart-legend-container {
    flex: 1;
    min-width: 0;
    padding-left: 25px;
    display: flex;
    flex-direction: column;
}

.chart-legend {
    background: #fff;
    padding: 15px 0 0 0;
    font-size: 14px;
    font-weight: 400;
    box-sizing: border-box;
}

.chart-legend p {
    margin: 0 0 12px 0 !important;
    padding: 10px 12px;
    background: #fafafa;
    border-left: 3px solid #000;
    display: flex !important;
    align-items: center !important;
    gap: 10px;
    transition: background-color 0.15s ease;
}

.chart-legend p:hover {
    background: #f0f0f0;
}

.legend-price {
    font-size: 16px;
    font-weight: 700;
    font-family: 'Roboto Condensed', sans-serif;
    color: #000;
    margin-right: 10px;
    min-width: 42px;
    flex-shrink: 0;
}
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
}
.header-left {
    text-align: left;
}
.header-left p {
    margin: 0;
    font-size: 14px;
}
.header-left a {
    font-size: 14px;
    text-decoration: none;
    color: #333;
}
.header-right {
    display: flex;
    gap: 10px;
}
.single-rule1{
  border-bottom: 1px solid #000;
  margin-top: 1px;
  margin-bottom: 2px;
}
.single-rule2{
  border-bottom: 1px solid #000;
  margin-top: 1px;
  margin-bottom: 20px;
}
.follow-login-button {
    font-family: "Roboto Condensed", sans-serif;
    background-color: white;
    border: 1px solid black;
    padding: 5px 10px;
    cursor: pointer;
    text-decoration: none;
    color: black;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.follow-login-button:hover {
    background-color: #f0f0f0;
}
.news-source-button {
  background-color: #fff;
  border: 1px solid #000;
  padding: 6px 12px;
  cursor: pointer;
  margin: 5px 5px 5px 0;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.15s ease;
}

.news-source-button:hover {
  background-color: #000;
  color: #fff;
}

.news-source-button i {
  font-size: 10px;
  margin-left: 4px;
}

.tags-container {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.topic-tag {
  display: inline-block;
  background-color: transparent;
  color: #666;
  padding: 4px 0;
  font-size: 12px;
  margin-right: 12px;
  margin-bottom: 5px;
  font-family: 'Roboto Condensed', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.topic-tag::before {
  content: '#';
  color: #999;
}
.market-source-button{
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  color: #495057;
  padding: 4px 12px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  font-family: 'Roboto Condensed', sans-serif;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}
.market-source-button:hover {
  background-color: #007bff;
  border-color: #007bff;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}
.market-source-button:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 123, 255, 0.2);
}
.market-source-button i {
  font-size: 11px;
  transition: transform 0.2s ease;
}
.market-source-button:hover i {
  transform: translateX(2px) translateY(-2px);
}
.horizontal-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom:10px;
}
.horizontal-list li {
    font-family: "Roboto Condensed", sans-serif;
    text-decoration: none;
    text-align: center;
    padding-right:20px;
}
.horizontal-list li:hover {
    text-decoration:underline 2px;
    text-decoration-color: black;
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
    cursor:pointer;
}
.horizontal-list li.divider {
    border-right: 1px solid #ccc;
    padding-right: 20px;
}

.nav-link {
    text-decoration: none;
    color: inherit;
}

.filter-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.filter-link:hover {
    opacity: 0.7;
}

/* ============================================
   MOVERS CARDS (Right Column) - Compact List
   ============================================ */

.market-item {
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
    border: none;
    border-bottom: 1px solid #eee;
    background: #fff;
    transition: background 0.15s ease;
}

.market-item:hover {
    background: #fafafa;
}

.market-item:last-child {
    border-bottom: none;
}

.market-item-content {
    position: relative;
    z-index: 1;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sparkline-chart {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    opacity: 0.4;
    pointer-events: none;
}

.market-title {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: #222;
    font-weight: 400;
}

.market-title a {
    color: inherit;
    text-decoration: none;
}

.market-title a:hover {
    text-decoration: underline;
}

.mover-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.mover-title-wrap {
    flex: 1;
    min-width: 0;
}

.mover-change-badge {
    flex-shrink: 0;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Roboto Condensed', sans-serif;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.mover-change-badge.up {
    background: #dcfce7;
    color: #166534;
}

.mover-change-badge.down {
    background: #fee2e2;
    color: #991b1b;
}

.mover-change-badge i {
    font-size: 10px;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.price-current {
    font-size: 18px;
    font-weight: 700;
    font-family: 'Roboto Condensed', sans-serif;
    color: #000;
}

.price-previous {
    font-size: 12px;
    color: #999;
    font-family: 'Roboto Condensed', sans-serif;
}

.price-previous::before {
    content: 'was ';
}

.platform-badge {
    display: inline-block;
    font-size: 9px;
    font-family: 'Roboto Condensed', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-top: 6px;
}

/* Price info styling for movers */
.price-info {
    display: flex;
    align-items: center;
    font-size: 12px;
    font-family: 'Roboto Condensed', sans-serif;
    color: #666;
}

.price-old {
    color: #999;
}

.price-now {
    font-weight: 600;
    color: #000;
    margin: 0 2px;
}

.price-change {
    margin-left: 6px;
    font-weight: 600;
    font-size: 11px;
}

.price-change.up {
    color: #16a34a;
}

.price-change.down {
    color: #dc2626;
}
.right-column-header {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 15px 0;
  text-align: left;
  color: #333;
  font-family: 'Roboto Condensed', sans-serif;
  display: flex;
  align-items: center;
  gap: 6px;
}

.right-column-header i {
  color: #16a34a;
  font-size: 12px;
}

#right-column {
  width: 300px;
  flex-shrink: 0;
  border-left: 1px solid #e0e0e0;
  padding-left: 25px;
  margin-left: 25px;
}

#moving-forecasts {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ============================================
   FEATURED FORECASTS TICKER
   ============================================ */

.featured-ticker-wrapper {
  position: relative;
  width: 100%;
  margin: 0;
  border-bottom: 1px solid #000;
  background: #fafafa;
  overflow: hidden;
}

.featured-ticker-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.featured-ticker-header {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: #000;
  color: #fff;
  padding: 0 12px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  z-index: 10;
}

.featured-ticker-track {
  display: flex;
  animation: ticker-scroll 25s linear infinite;
  padding: 8px 0;
  margin-left: 140px;
}

.featured-ticker-track:hover {
  animation-play-state: paused;
}

@keyframes ticker-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.ticker-item {
  flex-shrink: 0;
  padding: 8px 20px;
  border-right: 1px solid #ddd;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  max-width: 420px;
}

.ticker-item:hover {
  background: #fff;
}

.ticker-item-thumb {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  background: #eee;
}

.ticker-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ticker-item-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.ticker-item-name {
  font-size: 12px;
  color: #333;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 280px;
}

.ticker-item-price {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.ticker-item-current {
  font-size: 14px;
  font-weight: 700;
  font-family: 'Roboto Condensed', sans-serif;
  color: #000;
}

.ticker-item-change {
  font-size: 10px;
  font-weight: 600;
  font-family: 'Roboto Condensed', sans-serif;
  padding: 1px 4px;
  border-radius: 2px;
}

.ticker-item-change.up {
  color: #fff;
  background: #16a34a;
}

.ticker-item-change.down {
  color: #fff;
  background: #dc2626;
}

/* ============================================
   FORECASTS PAGE STYLES
   ============================================ */

/* Full-width content container for forecasts page */
.forecasts-page #content-container {
    max-width: 100%;
    width: 100%;
}

.search-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 14px;
    pointer-events: none;
}

#search-bar {
    width: 100%;
    padding: 14px 18px 14px 44px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Domine', serif;
    font-size: 14px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

#search-bar::placeholder {
    color: var(--text-faint);
}

#search-bar:focus {
    outline: none;
    border-color: #000;
    background-color: var(--bg-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] #search-bar:focus {
    border-color: var(--text-muted);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

#forecasts-container {
    width: 100%;
    border: 2px solid #000;
    padding: 0;
    box-sizing: border-box;
    height: 700px;
    overflow-y: hidden;
    display: flex;
    background-color: #fff;
}

#search-results-container {
    width: 35%;
    min-width: 280px;
    overflow-y: auto;
    padding: 0;
    box-sizing: border-box;
    background-color: #fafafa;
    border-right: 2px solid #000;
    -ms-overflow-style: none;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

#search-results-container::-webkit-scrollbar {
    width: 6px;
}

#search-results-container::-webkit-scrollbar-track {
    background: transparent;
}

#search-results-container::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}

#search-results-container::-webkit-scrollbar-thumb:hover {
    background-color: #999;
}

#market-details-container {
    flex: 1;
    padding: 25px 30px;
    height: 100%;
    overflow-y: auto;
    background-color: #fff;
    -ms-overflow-style: none;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

#market-details-container::-webkit-scrollbar {
    width: 6px;
}

#market-details-container::-webkit-scrollbar-track {
    background: transparent;
}

#market-details-container::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}

/* Empty state for details container */
#market-details-container:empty::before {
    content: 'Select a market to view details';
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    font-style: italic;
    font-size: 16px;
}

#timeframe-container {
    margin-bottom: 20px;
    padding: 15px 0;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.timeframe-btn {
    border: 1px solid #000;
    padding: 8px 16px;
    cursor: pointer;
    margin: 0 4px;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 13px;
    font-weight: 500;
    background-color: #fff;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeframe-btn:hover {
    background-color: #f5f5f5;
}

.timeframe-btn.active {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

/* Market items in forecasts list */
#forecasts-container .market-item {
    border: none;
    border-bottom: 1px solid #e0e0e0;
    padding: 16px 15px;
    cursor: pointer;
    background-color: transparent;
    transition: background-color 0.15s ease;
    margin: 0;
}

#forecasts-container .market-item:hover {
    background-color: #f0f0f0;
    box-shadow: none;
}

#forecasts-container .market-item.selected {
    background-color: #fff;
    border-left: 3px solid #000;
    border-bottom: 1px solid #e0e0e0;
    margin-left: -1px;
    padding-left: 12px;
}

#forecasts-container .market-item:last-child {
    border-bottom: none;
}

#forecasts-container .market-item-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    gap: 12px;
}

#forecasts-container .market-details {
    flex-grow: 1;
    min-width: 0;
}

#forecasts-container .market-title {
    font-weight: bold;
    margin-bottom: 5px;
}

#forecasts-container .question-text {
    color: #333;
    margin: 0 0 8px 0;
    font-size: 14px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.platform-volume {
    font-size: 11px;
    color: #888;
    margin-top: 6px;
    font-family: 'Roboto Condensed', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.platform {
    margin-right: 3px;
}

#forecasts-container .price-info {
    min-width: 55px;
    text-align: right;
    flex-shrink: 0;
}

#forecasts-container .price-info .price-now {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    font-family: 'Roboto Condensed', sans-serif;
}

@media (max-width: 768px) {
  .main-container {
    padding: 10px;
  }

  .main-content-flex {
    flex-direction: column;
  }

  #content-container {
    width: 100% !important;
    max-width: 100% !important;
  }

  #right-column {
    width: 100% !important;
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
    margin-top: 20px;
  }

  .content-row {
    flex-direction: column;
  }

  .text-box {
    width: 100%;
    padding-right: 0;
    border-right: none;
    margin-bottom: 15px;
  }

  .chart-legend-container {
    width: 100%;
    padding-left: 0;
  }

  .chart-container {
    width: 100%;
    margin-block-end: 0;
  }

  header {
    flex-direction: column;
    align-items: stretch;
  }

  .header-left,
  .header-right {
    text-align: center;
    width: 100%;
  }

  .header-right {
    justify-content: center;
    margin-top: 10px;
  }

  .horizontal-list {
    flex-wrap: wrap;
    justify-content: center;
  }

  h1 {
    font-size: 36px;
  }

  .chart-container, .legendDiv, .chartAndLegend, .apexcharts-canvas {
    max-width: 100% !important;
    width: 100% !important;
  }

  /* Forecasts page mobile styles */
  #forecasts-container {
    flex-direction: column;
    height: auto;
    max-height: none;
  }

  #search-results-container {
    width: 100%;
    min-width: 0;
    max-height: 300px;
    border-right: none;
    border-bottom: 2px solid #000;
  }

  #market-details-container {
    padding: 20px 15px;
    min-height: 400px;
  }

  .outcomes-container ul {
    flex-direction: column;
    gap: 10px;
  }

  .outcomes-container li {
    min-width: 0;
  }

  .market-stats ul {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   MARKET DETAILS PANEL STYLES
   ============================================ */

#market-info-top {
  margin-bottom: 0;
  padding: 0 0 20px 0;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.market-header-left {
  flex: 1;
  min-width: 0;
}

#market-info-top h3 {
  margin: 0 0 8px 0;
  font-size: 13px;
  font-family: 'Roboto Condensed', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  font-weight: 500;
}

#market-info-top h4 {
  margin: 0;
  font-size: 22px;
  color: #000;
  font-weight: 600;
  line-height: 1.3;
}

.current-price-display {
  text-align: center;
  padding: 15px 20px;
  background: #000;
  color: #fff;
  min-width: 100px;
  flex-shrink: 0;
}

.current-price-display .price-label {
  font-size: 10px;
  font-family: 'Roboto Condensed', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #aaa;
  margin-bottom: 5px;
}

.current-price-display .price-value {
  font-size: 32px;
  font-weight: 700;
  font-family: 'Roboto Condensed', sans-serif;
  line-height: 1;
}

#chart-container {
  width: 100%;
  min-height: 320px;
  margin: 0;
  background: #fff;
  padding: 0;
}

.event-description {
  margin: 15px 0;
  color: #555;
  font-size: 14px;
  line-height: 1.6;
}

#market-info-bottom {
  margin-top: 25px;
  padding: 20px;
  background-color: #fafafa;
  border: 1px solid #eee;
}

.market-details-full {
  display: grid;
  gap: 20px;
}

.market-details-full h5 {
  margin: 0 0 12px 0;
  font-size: 12px;
  font-family: 'Roboto Condensed', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #888;
  font-weight: 600;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 8px;
}

.outcomes-container {
  background: #fff;
  padding: 15px;
  border: 1px solid #e0e0e0;
}

.outcomes-container ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.outcomes-container li {
  padding: 10px 15px;
  font-size: 15px;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  flex: 1;
  min-width: 120px;
  text-align: center;
}

.outcomes-container li strong {
  display: block;
  font-size: 13px;
  color: #666;
  font-weight: 500;
  margin-bottom: 4px;
}

.market-stats {
  background: #fff;
  padding: 15px;
  border: 1px solid #e0e0e0;
}

.market-stats ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.market-stats li {
  padding: 8px 0;
  font-size: 14px;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
}

.market-stats li:last-child {
  border-bottom: none;
}

.market-stats li strong {
  color: #888;
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: block;
  margin-bottom: 2px;
}

.market-description {
  background: #fff;
  padding: 15px;
  border: 1px solid #e0e0e0;
}

.market-description p {
  color: #444;
  line-height: 1.7;
  font-size: 14px;
  margin: 0;
}

/* Loading state */
#market-details-container > p {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: #888;
  font-style: italic;
}

/* ============================================
   ERROR MESSAGE STYLES
   ============================================ */

.error-container {
  padding: 30px;
  background-color: #fff;
  border: 2px solid #000;
  text-align: center;
}

.error-container h4 {
  font-size: 18px;
  margin: 0 0 15px 0;
  color: #000;
}

.error-message {
  color: #c00;
  margin: 15px 0;
  font-weight: 500;
  font-size: 14px;
}

.info-message {
  color: #666;
  margin: 10px 0;
  font-size: 14px;
}

.solution-list {
  margin: 15px auto;
  color: #666;
  font-size: 13px;
  text-align: left;
  max-width: 400px;
  padding-left: 20px;
}

.solution-list li {
  margin: 8px 0;
  line-height: 1.5;
}

/* ============================================
   EMPTY STATE STYLES
   ============================================ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 400px;
  text-align: center;
  color: #888;
  padding: 40px;
}

.empty-state-icon {
  font-size: 48px;
  color: #ddd;
  margin-bottom: 20px;
}

.empty-state h4 {
  font-size: 20px;
  color: #555;
  margin: 0 0 10px 0;
  font-weight: 600;
}

.empty-state p {
  font-size: 14px;
  color: #888;
  margin: 0;
  max-width: 300px;
  line-height: 1.5;
}

/* ============================================
   THEME TOGGLE
   ============================================ */

.theme-toggle {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 14px;
}

.theme-toggle:hover {
  background: var(--bg-tertiary);
  transform: rotate(15deg);
}

[data-theme="dark"] .theme-toggle i::before {
  content: "\f186";
}

/* ============================================
   MODAL STYLES
   ============================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: var(--bg-primary);
  padding: 40px;
  border-radius: 8px;
  text-align: center;
  max-width: 360px;
  width: 90%;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.2s ease;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.15s ease;
}

.modal-close:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.modal-icon {
  width: 64px;
  height: 64px;
  background: var(--bg-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 24px;
  color: var(--text-muted);
}

.modal-content h3 {
  margin: 0 0 10px 0;
  font-size: 22px;
  color: var(--text-primary);
}

.modal-content p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

/* ============================================
   DARK THEME OVERRIDES
   ============================================ */

[data-theme="dark"] h1,
[data-theme="dark"] h2 {
  color: var(--text-primary);
}

[data-theme="dark"] .text-box {
  background: var(--bg-primary);
  border-right-color: var(--border-color);
}

[data-theme="dark"] .text-box .topic-title {
  color: var(--text-primary);
}

[data-theme="dark"] .text-box .topic-description {
  color: var(--text-secondary);
}

[data-theme="dark"] .text-box .topic-description::before {
  background: var(--text-primary);
}

[data-theme="dark"] .chart-legend-container,
[data-theme="dark"] .chart-container {
  background: var(--bg-primary);
}

[data-theme="dark"] .chart-legend p {
  background: var(--bg-secondary);
  border-left-color: var(--text-primary);
}

[data-theme="dark"] .chart-legend p:hover {
  background: var(--bg-tertiary);
}

[data-theme="dark"] .content-row {
  border-bottom-color: var(--border-color);
}

[data-theme="dark"] .follow-login-button {
  background: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--text-primary);
}

[data-theme="dark"] .follow-login-button:hover {
  background: var(--bg-tertiary);
}

[data-theme="dark"] .single-rule1,
[data-theme="dark"] .single-rule2 {
  border-bottom-color: var(--border-color);
}

[data-theme="dark"] #right-column {
  border-left-color: var(--border-color);
}

[data-theme="dark"] .right-column-header {
  color: var(--text-secondary);
}

[data-theme="dark"] .market-item {
  background: var(--bg-primary);
  border-bottom-color: var(--border-light);
}

[data-theme="dark"] .market-item:hover {
  background: var(--bg-secondary);
}

[data-theme="dark"] .market-title {
  color: var(--text-primary);
}

[data-theme="dark"] .market-title a {
  color: var(--text-primary);
}

[data-theme="dark"] .featured-ticker-wrapper {
  background: var(--bg-secondary);
  border-bottom-color: var(--border-color);
}

[data-theme="dark"] .ticker-item {
  border-right-color: var(--border-color);
}

[data-theme="dark"] .ticker-item:hover {
  background: var(--bg-tertiary);
}

[data-theme="dark"] .ticker-item-name {
  color: var(--text-primary);
}

[data-theme="dark"] .ticker-item-current {
  color: var(--text-primary);
}

[data-theme="dark"] .news-source-button {
  background: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--text-primary);
}

[data-theme="dark"] .news-source-button:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
}

[data-theme="dark"] .market-source-button {
  background: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--text-secondary);
}

[data-theme="dark"] .topic-tag {
  color: var(--text-muted);
}

[data-theme="dark"] .tags-container {
  border-top-color: var(--border-light);
}

[data-theme="dark"] .legend-price {
  color: var(--text-primary);
}

[data-theme="dark"] .header-left a {
  color: var(--text-secondary);
}

/* ApexCharts dark theme overrides */
[data-theme="dark"] .apexcharts-text,
[data-theme="dark"] .apexcharts-xaxis-label,
[data-theme="dark"] .apexcharts-yaxis-label {
  fill: var(--text-primary) !important;
}

[data-theme="dark"] .apexcharts-datalabel {
  fill: var(--text-primary) !important;
}

[data-theme="dark"] .apexcharts-gridlines-horizontal line,
[data-theme="dark"] .apexcharts-gridlines-vertical line {
  stroke: var(--border-color) !important;
}

[data-theme="dark"] .apexcharts-tooltip {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] .apexcharts-tooltip-title {
  background: var(--bg-tertiary) !important;
  border-bottom-color: var(--border-color) !important;
}

[data-theme="dark"] .apexcharts-tooltip-y-group,
[data-theme="dark"] .apexcharts-tooltip-text {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .apexcharts-xaxistooltip,
[data-theme="dark"] .apexcharts-yaxistooltip {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] .apexcharts-legend-text {
  color: var(--text-primary) !important;
}

/* ============================================
   ENHANCED MOBILE STYLES
   ============================================ */

@media (max-width: 768px) {
  .main-container {
    padding: 12px;
  }

  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 16px;
  }

  .main-content-flex {
    flex-direction: column;
  }

  #content-container {
    width: 100% !important;
    max-width: 100% !important;
  }

  #right-column {
    width: 100% !important;
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    margin-top: 20px;
  }

  .content-row {
    flex-direction: column;
    padding-bottom: 20px;
    margin-bottom: 20px;
  }

  .text-box {
    width: 100%;
    padding-right: 0;
    border-right: none;
    margin-bottom: 15px;
  }

  .text-box .topic-title {
    font-size: 18px;
  }

  .text-box .topic-description {
    font-size: 13px;
  }

  .chart-legend-container {
    width: 100%;
    padding-left: 0;
  }

  .chart-legend p {
    padding: 8px 10px;
    flex-wrap: wrap;
    gap: 6px;
  }

  .legend-price {
    font-size: 14px;
    min-width: 36px;
  }

  .chart-container {
    width: 100%;
    margin-block-end: 0;
  }

  header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-bottom: 15px;
  }

  .header-left {
    text-align: center;
    order: 2;
  }

  .header-center {
    order: 1;
  }

  .header-right {
    justify-content: center;
    order: 3;
    flex-wrap: wrap;
  }

  .follow-login-button {
    font-size: 11px;
    padding: 6px 10px;
  }

  .theme-toggle {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .horizontal-list {
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
  }

  .horizontal-list li {
    padding-right: 10px;
    font-size: 13px;
  }

  .chart-container, .legendDiv, .chartAndLegend, .apexcharts-canvas {
    max-width: 100% !important;
    width: 100% !important;
  }

  /* Featured ticker mobile */
  .featured-ticker-header {
    font-size: 9px;
    padding: 0 8px;
  }

  .featured-ticker-track {
    margin-left: 80px;
  }

  .ticker-item {
    padding: 6px 12px;
    max-width: 260px;
  }

  .ticker-item-thumb {
    width: 28px;
    height: 28px;
  }

  .ticker-item-name {
    font-size: 11px;
    max-width: 180px;
    -webkit-line-clamp: 2;
  }

  .ticker-item-current {
    font-size: 12px;
  }

  /* News buttons mobile */
  .news-source-button {
    padding: 5px 10px;
    font-size: 11px;
    margin: 3px 3px 3px 0;
  }

  .market-source-button {
    padding: 3px 8px;
    font-size: 11px;
  }

  /* Forecasts page mobile styles */
  #forecasts-container {
    flex-direction: column;
    height: auto;
    max-height: none;
  }

  #search-results-container {
    width: 100%;
    min-width: 0;
    max-height: 300px;
    border-right: none;
    border-bottom: 2px solid #000;
  }

  #market-details-container {
    padding: 20px 15px;
    min-height: 400px;
  }

  .outcomes-container ul {
    flex-direction: column;
    gap: 10px;
  }

  .outcomes-container li {
    min-width: 0;
  }

  .market-stats ul {
    grid-template-columns: 1fr;
  }

  /* Modal mobile */
  .modal-content {
    padding: 30px 20px;
    margin: 20px;
  }

  .modal-icon {
    width: 56px;
    height: 56px;
    font-size: 20px;
  }

  .modal-content h3 {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .main-container {
    padding: 8px;
  }

  h1 {
    font-size: 26px;
  }

  .header-right {
    gap: 6px;
  }

  .follow-login-button {
    font-size: 10px;
    padding: 5px 8px;
  }

  .content-row {
    padding-bottom: 15px;
    margin-bottom: 15px;
  }

  .text-box .topic-title {
    font-size: 16px;
  }

  .chart-legend p {
    font-size: 12px;
  }

  .market-source-button {
    display: none;
  }
}