* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #077b83;
  color: #ffffff;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(0, 15, 15, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #00f0ff;
  z-index: 1000;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.navbar.primary-navbar {
  z-index: 1000;
  height: 60px;
}

.navbar.chart-page-navbar {
  top: 60px;
  z-index: 999;
  height: 50px;
  background: rgba(0, 10, 10, 0.95);
  border-bottom: 1px solid rgba(0, 240, 255, 0.5);
}

.navbar-content {
  max-width: 100%;
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  height: 60px;
  gap: 20px;
}

.navbar-insights-ticker {
  flex: 1;
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 6px;
  padding: 8px 12px;
  overflow: hidden;
  max-width: 500px;
}

#navbar-insights-content {
  color: #00f0ff;
  text-shadow: 0 0 10px #00f0ff;
  white-space: nowrap;
  position: relative;
  animation: slideIn 1s ease-in-out;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.navbar-logo {
  color: #00f0ff;
  font-size: 24px;
  font-weight: bold;
  text-shadow: 0 0 10px #00f0ff;
}

.navbar-menu {
  display: flex;
  list-style: none;
}

.navbar-link {
  color: #ffffff;
  text-decoration: none;
  padding: 20px 15px;
  transition: all 0.3s ease;
  text-shadow: 0 0 5px rgba(0, 240, 255, 0.5);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.navbar-link-connection-btn {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
  padding: 20px 15px;
  transition: all 0.3s ease;
  text-shadow: 0 0 5px rgba(0, 240, 255, 0.5);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.navbar-link::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 240, 255, 0.95);
  color: #000000;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateX(-50%) translateY(-5px);
  z-index: 1001;
  box-shadow: 0 4px 12px rgba(0, 240, 255, 0.4);
  border: 1px solid rgba(0, 240, 255, 0.6);
}

.navbar-link::before {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid rgba(0, 240, 255, 0.95);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1001;
}

.navbar-link:hover, .navbar-link.active {
  color: #00f0ff;
  text-shadow: 0 0 15px #00f0ff;
}

.navbar-link:hover::after, .navbar-link:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#connection-status-btn {
  background: none;
  border: none;
  color: #ffffff;
  padding: 20px 15px;
  transition: all 0.3s ease;
  text-shadow: 0 0 5px rgba(0, 240, 255, 0.5);
  font-size: 20px;
  cursor: pointer;
  position: relative;
}

#connection-status-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 240, 255, 0.95);
  color: #000000;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: pre;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateX(-50%) translateY(-5px);
  z-index: 1001;
  box-shadow: 0 4px 12px rgba(0, 240, 255, 0.4);
  border: 1px solid rgba(0, 240, 255, 0.6);
  text-align: center;
  line-height: 1.4;
}

#connection-status-btn::before {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid rgba(0, 240, 255, 0.95);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1001;
}

#connection-status-btn:hover::after,
#connection-status-btn:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#connection-status-btn.connected {
  color: #00f0ff;
  text-shadow: 0 0 10px #00f0ff;
}

#connection-status-btn.connected:hover {
  color: #00f0ff;
  text-shadow: 0 0 20px #00f0ff, 0 0 30px rgba(0, 240, 255, 0.5);
}

#connection-status-btn.retrying {
  color: #ffc107;
  text-shadow: 0 0 10px #ffc107;
  animation: pulse 1.5s ease-in-out infinite;
}

#connection-status-btn.retrying:hover {
  color: #ffc107;
  text-shadow: 0 0 20px #ffc107, 0 0 30px rgba(255, 193, 7, 0.5);
}

#connection-status-btn.disconnected {
  color: #ff4444;
  text-shadow: 0 0 10px #ff4444;
}

#connection-status-btn.disconnected:hover {
  color: #ff4444;
  text-shadow: 0 0 20px #ff4444, 0 0 30px rgba(255, 68, 68, 0.5);
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Floating Chat Icon */
.floating-chat-icon {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #00f0ff, #0084ff);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  cursor: grab;
  z-index: 999;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
  transition: all 0.3s ease;
  user-select: none;
}

.floating-chat-icon:hover {
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.8), 0 0 40px rgba(0, 132, 255, 0.6);
  transform: scale(1.1);
}

.floating-chat-icon.dragging {
  cursor: grabbing;
  box-shadow: 0 0 40px rgba(0, 240, 255, 1);
  transform: scale(1.15);
}

.floating-chat-icon.snapped {
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(0, 15, 15, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid #00f0ff;
  border-radius: 5px;
  display: none;
  min-width: 200px;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-item {
  padding: 10px 15px;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.3s ease;
}

.dropdown-item:hover {
  background: rgba(0, 240, 255, 0.1);
  color: #00f0ff;
}

/* Sections */
.section {
  display: none;
  min-height: 50vh;
  padding-top: 60px;
}

.section.active {
  display: block;
}

/* Home Section */
#home {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 30%, #000000), url('https://github.com/qexqresncp-collab/blob/main/pexels-federicoabisphotography-33619996.jpg?raw=true');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero {
  text-align: center;
  padding: 100px 20px;
}

.hero h1 {
  font-size: 48px;
  color: #00f0ff;
  text-shadow: 0 0 20px #00f0ff;
  margin-bottom: 20px;
}

.hero p {
  font-size: 24px;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
  margin-bottom: 40px;
}

.modal-triggers {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.modal-btn {
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid #00f0ff;
  color: #00f0ff;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-shadow: 0 0 5px #00f0ff;
}

.modal-btn:hover {
  background: rgba(0, 240, 255, 0.2);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
}

.welcome-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 50px 20px;
  text-align: center;
}

.welcome-content h2 {
  color: #00f0ff;
  margin-bottom: 20px;
  text-shadow: 0 0 10px #00f0ff;
}

/* Footer styles removed for candlestick section */

/* Trading Candlestick Section */
#trading-candlestick {
  background: url('https://github.com/qexqresncp-collab/blob/main/pexels-markus-winkler-1430818-19825348%20(1).jpg?raw=true');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-blend-mode: overlay;
  background-color: rgba(0, 0, 0, 0.3);
}

.trading-main {
  display: flex;
  flex-direction: column;
  max-width: 100%;
  margin: 0;
  padding: 0;
  height: auto;
  min-height: 0;
  gap: 0;
}

.chart-container {
  background: transparent;
  backdrop-filter: none;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  height: auto;
  min-height: 400px;
  width: 100%;
  order: 1;
}

.candlestick-image {
  width: 100;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.insights-ticker {
  background: rgba(0, 15, 15, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid #00f0ff;
  border-radius: 10px;
  padding: 10px;
  margin: 20px auto;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
  max-width: 700px;
}

#insights-content {
  color: #00f0ff;
  text-shadow: 0 0 10px #00f0ff;
  white-space: nowrap;
  position: relative;
  animation: slideIn 1s ease-in-out;
}

@keyframes slideIn {
  0% { transform: translateX(100%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

.data-sidebar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  height: 45vh;
  min-height: 200px;
  max-height: 50px;
  overflow-y: visible;
  width: 100%;
  order: 2;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
}

.features-section {
  background: rgba(0, 15, 15, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid #00f0ff;
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
  height: max-content;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 155px;
}

.signals-section {
  background: rgba(0, 15, 15, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid #00f0ff;
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
  height: max-content;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 155px;
}

.features-section h3 {
  color: #00f0ff;
  text-shadow: 0 0 10px #00f0ff;
  margin-bottom: 6px;
  font-size: 14px;
}

.features-container {
  position: relative;
  overflow: visible;
  padding: 0;
}

#features-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, minmax(50px, auto));
  gap: 4px;
  overflow-x: hidden;
  overflow-y: scroll;
  scroll-behavior: smooth;
  width: 100%;
  max-height: 133px;
  flex: 1;
  padding: 2px;
}


#features-cards::-webkit-scrollbar {
  height: 8px;
  
}

#features-cards::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.3);
  border-radius: 4px;
}

#features-cards::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.scroll-btn {
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid #00f0ff;
  color: #00f0ff;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease;
  position: absolute;
  z-index: 10;
  top: 50%;
  transform: translateY(-50%);
  display: none !important;
}

.scroll-btn.left {
  left: 5px;
}

.scroll-btn.right {
  right: 5px;
}

.features-container:hover .scroll-btn {
  opacity: 1;
}

.scroll-btn:hover {
  background: rgba(0, 240, 255, 0.2);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

#signals-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  flex: 1;
  overflow-y: auto;
  padding: 1px 1px;
  max-height: 172px;
}

.data-card {
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid #00bfff;
  border-radius: 5px;
  padding: 4px 3px;
  text-align: center;
  transition: all 0.3s ease;
  font-size: 11px;
  min-width: 0;
  overflow: hidden;
}

.data-card:hover {
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.data-card .title {
  font-weight: bold;
  color: #00f0ff;
  font-size: 10px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  padding: 1px 1px;
  line-height: 1.1;
}

.data-card .value {
  font-size: 11px;
  color: #ffffff;
  text-shadow: 0 0 5px rgba(0, 240, 255, 0.5);
  transition: all 0.4s ease;
  padding: 2px 4px;
  border-radius: 3px;
  line-height: 1.2;
}

.data-card .value.value-increase {
  color: #00ff00;
  text-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
}

.data-card .value.value-decrease {
  color: #ff4444;
  text-shadow: 0 0 10px rgba(255, 68, 68, 0.8);
}

.data-card .value.value-same {
  color: #ffc107;
  text-shadow: 0 0 10px rgba(255, 193, 7, 0.8);
}

/* Features Section - Customizable Styling */
#features-cards .data-card .title {
  font-size: 11px;
  padding: 4px 4px;
}

#features-cards .data-card .value {
  font-size: 14px;
  padding: 3px 10px;
}

/* Signals Section - Customizable Styling with Larger Font */
#signals-cards .data-card {
  background: rgba(0, 240, 255, 0.1);
  padding: 1px 3px;
}

#signals-cards .data-card .title {
  font-size: 11px;
  padding: 10px 10px;
}

#signals-cards .data-card .value {
  font-size: 15px;
  padding: 4px 10px;
}

@keyframes colorPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.data-card .value.pulse {
  animation: colorPulse 0.6s ease-out;
}

.expand-btn {
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid #00f0ff;
  color: #00f0ff;
  padding: 10px;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.3s ease;
}

.expand-btn:hover {
  background: rgba(0, 240, 255, 0.2);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
}

/* Charts Carousel Section */
.charts-carousel-section {
  background: rgba(0, 15, 15, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid #00f0ff;
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
  height: 100%;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 200px;
}

.charts-carousel-section h3 {
  display: none;
  color: #00f0ff;
  text-shadow: 0 0 10px #00f0ff;
  margin-bottom: 10px;
  font-size: 14px;
}

.charts-carousel-container {
  position: relative;
  width: 100%;
  height: 200px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
  flex: 1;
}

.carousel-chart {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: fill;
  border-radius: 8px;
  transition: opacity 0.5s ease-in-out;
}

.carousel-chart.active {
  display: block !important;
  opacity: 1;
}

.carousel-indicator {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 240, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: #00f0ff;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.8);
  width: 24px;
  border-radius: 4px;
}

.dot:hover {
  background: rgba(0, 240, 255, 0.7);
}

/* ========================================
   DYNAMIC CHARTS CONTAINER (User-Selected)
   ======================================== */

#dynamic-charts-container {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  width: 100%;
  padding: 12px;
  background: rgba(0, 15, 15, 0.5);
  border-radius: 8px;
  margin-top: 12px;
}

#dynamic-charts-container.active {
  display: grid;
}

.dynamic-chart {
  position: relative;
  background: rgba(0, 15, 15, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
  min-height: 280px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dynamic-chart canvas {
  flex: 1;
  max-height: 250px;
  width: 100%;
}

.dynamic-chart:hover {
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.4);
  border-color: rgba(0, 240, 255, 0.5);
}

.dynamic-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
}

.dynamic-chart-header h4 {
  color: #00f0ff;
  text-shadow: 0 0 5px #00f0ff;
  font-size: 12px;
  margin: 0;
  flex: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.chart-close-btn {
  background: none;
  border: none;
  color: #ff4444;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.2s ease;
  padding: 0 4px;
}

.chart-close-btn:hover {
  opacity: 1;
  text-shadow: 0 0 8px #ff4444;
  transform: scale(1.1);
}

/* Trading Charts Section - Now hidden/removed */
#trading-charts {
  background: url('/static/backgroundimages/pexels-aedrian-10653885.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 80px 20px;
  text-align: center;
}

#trading-charts h2 {
  color: #00f0ff;
  text-shadow: 0 0 10px #00f0ff;
  margin-bottom: 40px;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.charts-grid img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #00f0ff;
  transition: all 0.3s ease;
  cursor: pointer;
}

.charts-grid img:hover {
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
}

/* Trading Course Section */
#trading-course {
  background: url('https://github.com/qexqresncp-collab/blob/main/pexels-itzyphoto-3031219.jpg?raw=true');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 80px 20px;
  text-align: center;
}

#trading-course h2 {
  color: #00f0ff;
  text-shadow: 0 0 10px #00f0ff;
  margin-bottom: 40px;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.course-card {
  background: rgba(0, 15, 15, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid #00f0ff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.course-card h3 {
  color: #00f0ff;
  text-shadow: 0 0 10px #00f0ff;
  margin-bottom: 10px;
}

.course-link {
  color: #00bfff;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.course-link:hover {
  color: #00f0ff;
  text-shadow: 0 0 10px #00f0ff;
}

/* Chat Modal */
.chat-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 2000;
  animation: fadeIn 0.3s ease-out;
}

.chat-modal-overlay.active {
  display: block;
}

.chat-modal {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 500px;
  height: 600px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.5), 0 0 80px rgba(0, 0, 0, 0.5);
  z-index: 2001;
  animation: slideUp 0.3s ease-out;
  overflow: hidden;
  flex-direction: column;
}

.chat-modal.active {
  display: flex;
}

.chat-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: white;
  border-bottom: 2px solid #00f0ff;
}

.chat-modal-header h3 {
  margin: 0;
  font-size: 16px;
}

.chat-modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0 5px;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.chat-modal-close:hover {
  opacity: 1;
}

.chat-modal iframe {
  border: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* Responsive chat modal */
@media (max-width: 768px) {
  .chat-modal {
    width: calc(100% - 20px);
    height: 600px;
    bottom: 10px;
    right: 10px;
    left: 10px;
  }

  .chat-modal-header {
    padding: 12px 15px;
  }

  .chat-modal-header h3 {
    font-size: 14px;
  }
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  z-index: 1000;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 15, 15, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid #00f0ff;
  border-radius: 10px;
  padding: 20px;
  max-width: 600px;
  width: 90%;
  display: none;
  z-index: 1001;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.5);
}

.modal-content {
  position: relative;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  color: #00f0ff;
  font-size: 24px;
  cursor: pointer;
  text-shadow: 0 0 10px #00f0ff;
}

.modal-carousel {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  margin-bottom: 20px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.modal-carousel::-webkit-scrollbar {
  display: none;
}

.modal-carousel img {
  width: 100px;
  height: 60px;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid #00f0ff;
}

.facts-carousel .fact-slide {
  display: none;
}

.facts-carousel .fact-slide.active {
  display: block;
  color: #00f0ff;
  text-shadow: 0 0 10px #00f0ff;
  font-style: italic;
  text-align: center;
  padding: 20px;
}

.carousel-controls {
  text-align: center;
  margin-top: 20px;
}

.carousel-controls button {
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid #00f0ff;
  color: #00f0ff;
  padding: 5px 10px;
  margin: 0 5px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-controls button:hover {
  background: rgba(0, 240, 255, 0.2);
}

.prices-list {
  margin: 20px 0;
}

.price-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 240, 255, 0.3);
}

.change.positive {
  color: #00ff00;
}

.change.negative {
  color: #ff0000;
}

.refresh-btn {
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid #00f0ff;
  color: #00f0ff;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.refresh-btn:hover {
  background: rgba(0, 240, 255, 0.2);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
}

.news-ticker {
  background: rgba(0, 15, 15, 0.9);
  border: 1px solid #00f0ff;
  border-radius: 5px;
  padding: 10px;
  margin: 20px 0;
  overflow: hidden;
}

#news-content {
  color: #00f0ff;
  text-shadow: 0 0 10px #00f0ff;
  white-space: nowrap;
  animation: marquee 30s linear infinite;
}

.full-image img {
  max-width: 100%;
  max-height: 80vh;
}

.expand-content {
  max-height: 80vh;
  overflow-y: auto;
}

.expand-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.expand-controls button {
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid #00f0ff;
  color: #00f0ff;
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.expand-controls button:hover {
  background: rgba(0, 240, 255, 0.2);
}

#expanded-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

/* Responsive */
@media (max-width: 768px) {
  .navbar{
    height: auto;
    width:100%;
  }
  .navbar-content {
    flex-direction: row;
    gap: 10px;
    height: auto;
    padding: 10px 20px;
  }
  .navbar-menu {
    flex-direction: row;
    gap: 100px;
  }
  #trading-candlestick {
    padding: 55px 10px;
  }

  .trading-main {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 3px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    height: auto;
  }

  .chart-container {
    width: 100%;
    height: auto;
    min-height: 300px;
    padding: 0;
    margin-bottom: 0;
    grid-column: 1;
    grid-row: 1;
  }

  .candlestick-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
  }
  .candlestick-image:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
  }
  #candlestick-chart {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
  }
  .data-sidebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
    height: auto;
    max-height: none;
    overflow-y: visible;
    grid-column: 1;
    grid-row: 2;
  }

  .features-section,
  .signals-section {
    padding: 8px;
    background: rgba(0, 15, 15, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid #00f0ff;
    border-radius: 8px;
    width: 100%;
  }

  .features-section h3 {
    font-size: 11px;
    margin-bottom: 4px;
  }

  #features-cards {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    grid-template-rows: repeat(2, minmax(0, auto));
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    padding: 2px;
    scroll-snap-type: x mandatory;
  }

  #features-cards > * {
    scroll-snap-align: start;
  }

  #signals-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    width: 100%;
  }

  .data-card {
    font-size: 10px;
    padding: 4px;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid #00bfff;
    border-radius: 3px;
    text-align: center;
    min-width: 50px;
  }

  .data-card .title {
    font-size: 8px;
    padding: 1px 2px;
    line-height: 1.2;
  }

  .data-card .value {
    font-size: 10px;
    padding: 2px 4px;
    border-radius: 2px;
  }

  .charts-carousel-section {
    width: 100%;
    padding: 8px;
    height: auto;
    margin-top: 0;
  }

  .charts-carousel-container {
    width: 100%;
    height: 200px;
    margin-bottom: 6px;
  }

  .carousel-indicator {
    display: flex;
    justify-content: center;
    gap: 6px;
  }

  .dot {
    width: 6px;
    height: 6px;
  }

  .dot.active {
    width: 20px;
  }

  .insights-ticker {
    width: 100%;
    padding: 8px;
    margin: 10px 16px 0px 0;
    max-width: 100%;
    overflow: hidden;
  }

  #insights-content {
    white-space: normal;
    text-align: left;
    font-size: 12px;
  }

  .modal-triggers {
    flex-direction: column;
    align-items: center;
  }

  .charts-grid,
  .course-grid {
    grid-template-columns: 1fr;
  }

  .features-container {
    padding: 0;
  }

  .scroll-btn {
    display: none !important;
  }

  #trading-charts {
    padding: 40px 10px;
    background-attachment: scroll;
  }

  .charts-grid {
    gap: 15px;
    padding: 0 10px;
  }

  .charts-grid img {
    max-width: 100%;
    height: auto;
  }

  .modal {
    max-width: 95%;
    width: calc(100% - 24px);
    padding: 16px;
    left: 50%;
    transform: translate(-50%, -50%);
    overflow-y: auto;
    max-height: 90vh;
  }

  .modal-content {
    width: 100%;
  }

  #home,
  #trading-candlestick,
  #trading-course {
    background-attachment: scroll;
  }

  /* Responsive Dynamic Charts */
  #dynamic-charts-container {
    grid-template-columns: 1fr;
    padding: 8px;
    gap: 10px;
  }

  .dynamic-chart {
    min-height: 250px;
    padding: 8px;
  }

  .dynamic-chart canvas {
    max-height: 200px;
  }

  .dynamic-chart-header h4 {
    font-size: 11px;
  }

  .chart-close-btn {
    font-size: 16px;
  }
}
