h3 {
  margin-bottom: 5px; /* Reduces space between title and description */
}

.description {
  font-size: 0.7rem;
  color: #777;
  margin: 0;  /* Removes any additional margin */
  padding: 0; /* Ensures no padding is applied */
}


#symbol-selector {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 9999;

  font-family: 'Poppins', sans-serif;
  font-size: 14px;

  background: transparent;
  color: white;
  border: 1px solid #ccc;
  border-radius: 5px;

  padding: 6px 12px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background-image: url('data:image/svg+xml;utf8,<svg fill="gray" height="16" viewBox="0 0 24 24" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 30px;

  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: border 0.3s ease;
  max-width: 90vw;
}

/* Hover and focus style */
#symbol-selector:hover,
#symbol-selector:focus {
  border-color: #43A047;
  outline: none;
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
}

/* Option styling */
#symbol-selector option {
  background-color: #fff;
  color: #000;
  font-family: 'Poppins', sans-serif;
}

/* Move down for tablets */
@media (max-width: 768px) {
  #symbol-selector {
    font-size: 13px;
    padding: 6px 10px;
    padding-right: 28px;
    top: 60px;
    right: 10px;
  }
}

/* Move further down for phones */
@media (max-width: 480px) {
  #symbol-selector {
    font-size: 12px;
    padding: 6px 8px;
    padding-right: 26px;
    top: 90px;
    right: 10px;
    max-width: 80vw;
  }
}



/* General Styling for Label and Input */
label[for="tick-count"] {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  color: #fff;
  margin-bottom: 5px;
  display: block;
  text-align: left;
}

/* Controls container */
.controls {
  position: relative;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: 10px 15px;
  font-family: 'Poppins', sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  color: white;
}


@media (max-width: 480px) {
  .controls {
    margin-top: 10px;
  }

  .controls label {
    font-size: 1px;
    margin-bottom: 4px;
  }

  #tick-count {
    font-size: 14px;
    padding: 6px 12px;
    max-width: 100px;
  }
}




/* Label styling */
.controls label {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 5px; /* Space between label and input */
}

/* Tick count input styling */
#tick-count {
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  color: white;
  background: #333; /* Dark background */
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 8px 15px;
  width: 100%; /* Full width */
  max-width: 120px; /* Reduced max width */
  transition: all 0.3s ease; /* Smooth transition */
  outline: none;
}

/* Remove spinner from input */
#tick-count::-webkit-outer-spin-button,
#tick-count::-webkit-inner-spin-button {
  -webkit-appearance: none; /* Remove the default spinner */
  margin: 0;
}

/* Focus state for the input */
#tick-count:focus {
  border-color: #43A047; /* Green border on focus */
  background-color: rgba(255, 255, 255, 0.1); /* Light background on focus */
}

#tick-count:focus,
#tick-count:hover {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Soft shadow on focus/hover */
}

/* Placeholder styling */
#tick-count::placeholder {
  color: #aaa; /* Placeholder color */
  opacity: 0.7; /* Slight transparency */
}

/* Loading spinner styling */
#loading-spinner {
  display: none; /* Hidden by default, show when loading */
  margin-left: 10px;
  border: 4px solid #f3f3f3; /* Light grey background */
  border-top: 4px solid #3399FF; /* Blue color */
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite; /* Spinner animation */
}

/* Spinner animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Margin for content below the controls */
body {
  margin-top: 80px; /* Increase space to ensure content is pushed below the controls */
}




.card-wrapper {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.card {
  flex: 1 1 300px;
  min-width: 280px;
  margin: 0; /* Remove any margin if there's any */
  padding: 0; /* Remove padding */
  height: 100%; /* Ensure it takes full available height */
}


/* Card */
.card {
  background: #111827;
  border-radius: 0.5rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Stats container for cleaner layout */
.stats-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.5rem;
  color: #e0e0e;
}

/* Each stat block style */
.stat-block {
  background: #1f2937;
  padding: 1rem;
  border-radius: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
}

/* Specific stats (e.g., Even/Odd Bias, Frequency) */
.stat-block .stat-title {
  font-size: 1rem;
  font-weight: normal;
  color: #9ca3a;
}

.stat-block .stat-value {
  font-size: 0.9rem;
  color: #10b981;
}

/* Special styling for digits and percentages */
.stat-block .high-percentage {
  color: #10b981; /* Green for positive */
}

.stat-block .low-percentage {
  color: #f44336; /* Red for negative */
}



#volatility-bar-chart {
  overflow: visible;
  background: transparent;
}

#volatility-overview-card:hover rect {
  cursor: pointer;
  filter: brightness(1.1);
}


.glassmorphism {
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  background-color: rgba(255, 255, 255, 0.08); /* Light, neutral glass tone */
  border-radius: 16px;
  border: 0px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
  transition: all 0.3s ease-in-out;
}

.glassmorphism::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.01) 100%
  );
  pointer-events: none;
  z-index: 0;
}

/* Add transition for main content */
#main-content-wrapper {
  transition: opacity 0.5s ease-in-out;
  opacity: 1;
}

#main-content-wrapper.hidden {
  opacity: 0;
  pointer-events: none; /* Disable interactions while hidden */
}

svg + .streaks {
  margin-top: -4px !important; /* try adjusting value */
}

#selected-market-output {
  display: flex;
  flex-direction: column;
  gap: 0px;
  position: relative; /* <--- Needed for absolute positioning inside */
}


/* Container for market values */
.market-info-container {
  position: fixed; /* Fix it at the top of the viewport */
  top: 0;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 10; /* Ensure it's above other content */
  padding: 2px 0; /* Reduce padding to make the container smaller */
  background-color: rgba(0, 0, 0, 0.2); /* Semi-transparent background */
  font-size: 10px; /* Reduced font size */
  backdrop-filter: blur(3px); /* Apply blur effect to the background */
}

/* Apply Poppins font to the entire market title */
.market-title {
  font-size: 16px; /* Reduced font size */
  margin-bottom: 2px;
  font-family: 'Poppins', sans-serif;
   font-weight: bold;
}

/* Styling for the "Market" part */
.market-text {
  font-size: 13px; /* Reduced font size */
  font-weight: bold;
  font-family: 'Poppins', sans-serif;
}

/* Styling for the actual market name */
.market-name {
  font-size: 13px; /* Reduced font size */
  font-weight: normal;
  font-family: 'Poppins', sans-serif;
}

/* Styling for the Most Recent Tick container */
.tick-label {
  color: #3399FF; /* Light blue color */
  font-family: 'Poppins', sans-serif;
  font-size: 10px; /* Reduced font size */
  margin-top: 3px; /* Reduced margin */
}

.tick-value {
  color: #3399FF; /* Light blue color */
  font-family: 'Poppins', sans-serif;
  font-size: 15px; /* Reduced font size */
  margin-top: 2px; /* Reduced margin */
  font-weight: bold;
}

/* Tab Wrapper */
.tab-wrapper {
  margin-top: 90px;
  margin-bottom: 40px;
  padding: 0 16px;
  box-sizing: border-box;
}

/* Navigation container for tabs */
.tab-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

/* Glassy Gradient Tab Button */
.tab-button {
  padding: 8px 20px;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  border: none;
  border-radius: 19px;
  background: linear-gradient(135deg, rgba(51, 153, 255, 0.4), rgba(255, 255, 255, 0.2));
  color: #ffffff;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.25);
  min-width: 120px;
  text-align: center;
}

/* On Hover */
.tab-button:hover {
  background: linear-gradient(135deg, rgba(102, 204, 255, 0.6), rgba(255, 255, 255, 0.3));
  transform: translateY(-2px);
}

/* Active tab */
.tab-button.active {
  background: linear-gradient(135deg, rgba(0, 128, 255, 0.7), rgba(0, 204, 255, 0.5));
  color: #fff;
  border: 1px solid rgba(0, 128, 255, 0.7);
  box-shadow: 0 6px 18px rgba(0, 128, 255, 0.35);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .tab-nav {
    gap: 16px;
  }

  .tab-button {
    font-size: 14px;
    padding: 6px 16px;
  }
}

@media (max-width: 480px) {
  .tab-button {
    width: 100%;
    max-width: 260px;
  }
}





.even-odd-content {
  display: block; /* show by default */
}



/* Main container tweaks */
.even-odd-bars {
  line-height: 1 !important;
  font-size: 0 !important;
  margin-bottom: -6px !important; /* pulls up space under SVG */
  padding: 0 !important;
  vertical-align: top;
}

/* The actual SVG block */
.even-odd-svg {
  display: block;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0 !important;
  font-size: 0 !important;
  height: 60px !important; /* reduced height from 80 */
  margin-bottom: -6px !important; /* extra collapse */
}

/* Label inside SVG */
.even-odd-svg text {
  font-size: 14px;
  fill: white;
  font-family: 'Poppins', sans-serif;
  line-height: 1;
  dominant-baseline: middle;
  alignment-baseline: middle;
}

/* Tooltip */
.tooltip {
  position: absolute;
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12px;
  display: none;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
}

/* Tighter layout for streaks below */
.even-odd-bars + .streaks {
  margin-top: -2px !important;
}


.axis-label {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  fill: white;
}

svg .bar-rect {
  cursor: pointer;
  transition: opacity 0.3s;
}

svg .bar-rect:hover {
  opacity: 0.8;
}





/* Streaks block styling */
.streaks {
  font-family: 'Poppins', sans-serif;
  margin-top: 10px;
  padding: 0;
  line-height: 1.4;
  border: none;
  display: block;
}

.streak-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px; /* Optional horizontal spacing between even/odd blocks */
}

.streak-item {
  text-align: center;
  flex: 1;
}

.streak-title {
  font-size: 14px;
  color: #666;
  margin-bottom: 6px;
}

.streak-value {
  margin-top: 20px;
  font-size: 24px;
  font-weight: bold;
  color: #333;
  line-height: 1.2;
}

/* Gradient text styling */
.streak-value.even {
  background: linear-gradient(to right, #2196F3, #87CEFA);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.streak-value.odd {
  background: linear-gradient(to right, #FF0000, #FF69B4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}




.volatility-wrapper {
  font-family: 'Poppins', sans-serif;
  text-align: center;
  margin-top: 0px;
  
}

.volatility-label {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Existing styles */
.volatility-metrics-flex {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.vol-box {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 2px 8px;
  min-width: 70px;
  max-width: 85px; /* Fixed typo */
  transition: all 0.2s ease;
}

.vol-title {
  font-size: 10px;
  color: #aaa;
  margin-bottom: 1px;
}

.vol-value {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

/* Strategy suggestion block */
.trading-strategy {
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 6px 10px;
  text-align: center;
  font-size: 12px;
  color: #ddd;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}

.strategy-title {
  font-weight: bold;
  font-size: 11px;
  color: #aaa;
  margin-bottom: 2px;
}

.strategy-value {
  font-size: 12px;
  font-weight: 500;
  color: #fff;
}

/* Optional: FS and TJV color coding (based on value class) */
.vol-value.fs-high {
  color: #E53935; /* Red */
}
.vol-value.fs-medium {
  color: #FFA726; /* Orange */
}
.vol-value.fs-low {
  color: #43A047; /* Green */
}

.vol-value.tjv-high {
  color: #E53935;
}
.vol-value.tjv-medium {
  color: #FFA726;
}
.vol-value.tjv-low {
  color: #43A047;
}

/* Responsive: stack boxes if needed */
@media (max-width: 300px) {
  .volatility-metrics-flex {
    flex-direction: column;
    align-items: center;
  }
}







.digit-circle-wrapper {
  display: flex;
  justify-content: center;
  gap: 70px; /* increased space between the charts */
  margin-top: 15px;
  font-family: 'Poppins', sans-serif;
}

.circle-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90px;
}

.chart-title {
  font-size: 13px;
  font-weight: 600;
  color: #666;
  margin-bottom: 6px;
  text-align: center;
}

.percent-label {
  font-size: 14px;
  font-weight: 600;
  color: #666;
  margin-top: 5px;
}



.digit-frequencies-svg {
  font-family: 'Poppins', sans-serif;
  text-align: center;
  margin-top: 20px;
  width: 100%;
  box-sizing: border-box;
}

.digit-frequencies-svg h4 {
  margin-bottom: 14px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  text-align: center;
}

.svg-bar-wrapper {
  width: 100%;
  overflow-x: auto;
  background-color: #1f2937;
  padding: 20px;
  border-radius: 16px;
  box-sizing: border-box;

  display: flex;
  justify-content: center;
}

.svg-bar-wrapper svg {
  width: 100%;
  height: auto;
  display: block;
  max-width: 100%;
}




/* Container for the whole EO card */
.eo-sequence-card {
  width: 100%;
  max-width: 100%; /* Prevent it from overflowing its parent */
  margin: 20px 0; /* Removed auto to avoid centering issues in flex/grid */
  padding: 15px;
  box-sizing: border-box; /* Ensures padding doesn't add to width */
  background-color: transparent;
  border-radius: 10px;
  
  overflow-wrap: break-word;
  word-wrap: break-word;
  text-align: center;
  font-family: 'Poppins', sans-serif;
}


/* Label for Even/Odd sequence */
.eo-label {
  font-size: 1.2em;
  font-weight: bold; /* Bold font */
  margin-bottom: 10px;
  font-family: 'Poppins', sans-serif; /* Apply Poppins font */
}

/* Container for sequence letters */
.eo-sequence-value {
  font-family: 'Poppins', sans-serif; /* Apply Poppins font */
  font-size: 1.3em;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  font-weight: bold; /* Make letters bold */
}

/* Styling for Even letters */
.eo-letter-e {
  background: linear-gradient(45deg, #4facfe, #00f2fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: bold;
  font-size: 1.3em;
}

.eo-letter-o {
  background: linear-gradient(45deg, #ff416c, #ff4b2b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: bold;
  font-size: 1.3em;
}


/* Responsive handling: When the container gets smaller, letters should scale down */
@media (max-width: 600px) {
  .eo-sequence-value {
    font-size: 1.2em;
  }

  .eo-letter-e, .eo-letter-o {
    font-size: 1.2em;
  }
}



.trade-button {
  position: fixed; /* <-- fixed to screen, not relative to container */
  top: 90%;
  right: 20px;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: #4CAF50;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0px 4px 10px rgba(0,0,0,0.4);
  transition: background 0.3s, transform 0.3s;
  z-index: 9999; /* Very high to stay on top of all elements */
}

.trade-button:hover {
  background: #45a049;
  transform: translateY(-50%) scale(1.1); /* scale without shifting center */
}

.trade-button svg {
  width: 24px;
  height: 24px;
  fill: white;
}


/* Slide-up container */
.slide-up-container {
  position: fixed;
  bottom: -50%;
  left: 0;
  width: 100%;
  height: 50%;
  background-color: #1a1a1a;
  color: white;
  transition: bottom 0.4s ease;
  z-index: 9998;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.slide-up-container.active {
  bottom: 0;
}

/* Drag handle */
.slide-up-handle {
  width: 100px;
  height: 6px;
  background-color: #ccc;
  border-radius: 3px;
  margin: 10px 0;
  cursor: ns-resize;
}

/* Inner content */
.slide-up-content {
  text-align: center;
  padding: 20px;
  flex: 1;
  overflow-y: auto;
  width: 100%;
}


.connect-section {
    margin-top: 20px;
    text-align: center;
  }

  .connect-button {
    margin-top: 10px;
    padding: 10px 20px;
    background: red;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
  }

  .connect-button:hover {
    background: #45A049;
  }

.oauth-iframe {
    width: 100%;
    height: calc(100% - 20px); /* Leaves space for handle */
    border: none;
    margin-top: 10px;
    border-radius: 8px;
    overflow: hidden;
  }
