/* Trading Chart Section Styles */
.trading-chart {
  padding: 80px 0;
  background-color: #f8f9fa;
}

.trading-chart .section-title h2 {
  color: #302e4d;
  font-size: 35px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 50px;
}

.trading-chart .trading-content {
  -ms-flex: 0 0 100%;
  flex: 0 0 100%;
  max-width: 100%;
}

/* Chart Container */
.chart-container {
  -ms-flex: 0 0 70%;
  flex: 0 0 70%;
  max-width: 70%;
  margin-bottom: 30px;
}

/* Technical Specifications within chart area */
.chart-container .technical-specs {
  margin-top: 30px;
  margin-bottom: 0;
}

/* Algorithm Info within chart area */
.chart-container .algorithm-info {
  margin-top: 30px;
  margin-bottom: 0;
}

.chart-wrapper {
  background-color: #ffffff;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
}

#tradingCanvas {
  border: 2px solid #ec1839;
  border-radius: 10px;
  background-color: #1a1a1a;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
  height: auto;
}

.chart-controls {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.chart-controls .btn {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 25px;
  transition: all 0.3s ease;
}

.chart-controls .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(236, 24, 57, 0.3);
}

/* Trading Statistics */
.trading-stats {
  -ms-flex: 0 0 30%;
  flex: 0 0 30%;
  max-width: 30%;
  padding-left: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  margin-bottom: 30px;
}

.stat-card {
  background-color: #ffffff;
  border-radius: 15px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.stat-icon {
  width: 40px;
  height: 40px;
  background-color: #ec1839;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon i {
  font-size: 16px;
  color: #ffffff;
}

.stat-content h4 {
  font-size: 12px;
  font-weight: 600;
  color: #302e4d;
  margin-bottom: 5px;
}

.stat-content p {
  font-size: 18px;
  font-weight: 700;
  color: #ec1839;
  margin: 0;
}

/* Algorithm Info */
.algorithm-info {
  background-color: #ffffff;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.algorithm-info h4 {
  color: #302e4d;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 15px;
}

.algorithm-info p {
  color: #504e70;
  line-height: 1.6;
  margin-bottom: 20px;
}

.algorithm-details h5 {
  color: #302e4d;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
}

.algorithm-details ul {
  list-style: none;
  padding: 0;
}

.algorithm-details li {
  color: #504e70;
  line-height: 1.6;
  margin-bottom: 8px;
  padding-left: 20px;
  position: relative;
}

.algorithm-details li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #ec1839;
  font-weight: bold;
}

/* Technical Specifications */
.technical-specs {
  -ms-flex: 0 0 100%;
  flex: 0 0 100%;
  max-width: 100%;
  margin-top: 30px;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.spec-item {
  background-color: #ffffff;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  text-align: center;
}

.spec-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.spec-item h4 {
  color: #302e4d;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
}

.spec-item p {
  color: #504e70;
  line-height: 1.6;
  margin: 0;
  font-size: 14px;
}

/* Responsive Design for Trading Chart */
@media (max-width: 1200px) {
  .chart-container {
    -ms-flex: 0 0 65%;
    flex: 0 0 65%;
    max-width: 65%;
  }

  .trading-stats {
    -ms-flex: 0 0 35%;
    flex: 0 0 35%;
    max-width: 35%;
  }
}

@media (max-width: 991px) {
  .chart-container {
    -ms-flex: 0 0 100%;
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 30px;
  }

  .trading-stats {
    -ms-flex: 0 0 100%;
    flex: 0 0 100%;
    max-width: 100%;
    padding-left: 0;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  #tradingCanvas {
    width: 100%;
    height: 400px;
  }

  .chart-container .technical-specs {
    margin-top: 20px;
  }
}

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

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

  .chart-controls {
    flex-direction: column;
    align-items: center;
  }

  .chart-controls .btn {
    width: 200px;
  }

  #tradingCanvas {
    width: 100%;
    height: 300px;
  }
}
