body {
  padding: 0;
  margin: 0;
  /* Add a background color to match the chart */
  background-color: #222;
}

/* Đảm bảo file này đã được import vào HTML */
.tooltip {
  opacity: 1;
  width: 100px;
  height: 115px;
  position: absolute;
  display: none; /* sẽ chuyển thành block khi hover */
  padding: 8px;
  box-sizing: border-box;
  font-size: 12px;
  text-align: left;
  z-index: 1000;
  pointer-events: none;
  border: 1px solid cyan;
  border-radius: 2px;
  background: black;
  color: white;
  font-family: 'Verdana', 'Helvetica', 'Arial', sans-serif;
}

.tooltip > .symbolName{
  color: cyan
}
.tooltip > .value{
  font-size: 24px; 
  margin: 4px 0px; 
  color: white;
}
.tooltip > .time{
  color: yellow;
}

#chart { /* Setting for the chart */
  --layout-background-color: #222;
  --layout-textColor: #C3BCDB;
  --layout-fontFamily: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
  --layout-fontSize: 11;
  --grid-vertLines-color: #444;
  --grid-horzLines-color: #444;
  --localization-locale: "vi-VN";
  --localization-dateFormat: "dd/MM/yyyy";
  --crosshair-horzLine-visible: "false";
  --crosshair-horzLine-color: #D89CFFFF;
  --crosshair-vertLine-visible: "true";
  --crosshair-vertLine-color: #D89CFFFF;
  --priceScale-borderColor: #71649C;
  --timeScale-borderColor: #71649C;
  --timeScale-barSpacing: 10;
  --P3-color: #FF33E0FF;
  --P15-color: #FFC300;
  --P50-color: #28A745;
  --P85-color: #17A2B8;
  --P97-color: #EC4272FF;
  --Main-color: #e4f043;
}

#chart,
#events {
  position: absolute;
  width: 100%;
  height: calc(100% - 100px);
  margin-top: 110px;
}

.navbar {
  height: 100px;
}

.hidden {
  display: none;
}

/* Đường dọc giữa */
#events::before {
  content: '';
  position: fixed;
  width: 4px;
  background-color: #3498db;
  bottom: 0;
  left: 50%;
  margin-left: -2px;
  border-radius: 4px;
  box-shadow: 0 0 15px rgba(52, 152, 219, 0.8);
  height: calc(100vh - 70px);
  z-index: 0;
}

/* Sự kiện */
.event {
  padding: 15px 30px;
  position: relative;
  background-color: #333;
  width: calc(50% - 60px);
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  margin-bottom: -30px;
  transition: all 0.3s ease;
}

/* Hiệu ứng hover cho sự kiện */
.event:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
  border-color: #3498db;
}

/* Sự kiện bên trái */
.event:nth-child(odd) {
  left: 0;
  margin-left: 20px;
}

/* Sự kiện bên phải */
.event:nth-child(even) {
  left: calc(50% + 35px);
  margin-right: 20px;
}

/* Dấu chấm tròn đánh dấu sự kiện trên dòng thời gian */
.event::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  right: -50px;
  background-color: #222;
  border: 4px solid #3498db;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
  z-index: 1;
  box-shadow: 0 0 8px rgba(52, 152, 219, 0.6);
}

/* Đặt dấu chấm tròn ở bên trái cho sự kiện bên phải */
.event:nth-child(even)::after {
  left: -45px;
}

/* Mũi tên chỉ vào dòng thời gian */
.event::before {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  top: 50%;
  transform: translateY(-50%);
  right: -20px;
  border: medium solid #333;
  border-width: 10px 0 10px 10px;
  border-color: transparent transparent transparent #333;
}

/* Mũi tên chỉ vào bên phải cho sự kiện bên phải */
.event:nth-child(even)::before {
  left: -20px;
  border-width: 10px 10px 10px 0;
  border-color: transparent #333 transparent transparent;
}

/* Định dạng thời gian */
.eventTime {
  display: block;
  color: #3498db;
  font-weight: bold;
  margin-bottom: 8px;
  font-size: 14px;
}

/* Định dạng nội dung sự kiện */
.eventText {
  display: block;
  font-size: 16px;
  line-height: 1.5;
  color: #e0e0e0;
}

/* Màu sắc xen kẽ cho các mốc thời gian khác nhau */
/* Sự kiện lẻ: viền trái */
.event:nth-child(4n+1) {
  border-left: 5px solid #34dbd8;
  border-right: none;
}

.event:nth-child(4n+3) {
  border-left: 5px solid #ccc72e;
  border-right: none;
}

/* Sự kiện chẵn: viền phải */
.event:nth-child(4n+2) {
  border-right: 5px solid #43cb53;
  border-left: none;
}

.event:nth-child(4n+4) {
  border-right: 5px solid #e677df;
  border-left: none;
}

/* Điều chỉnh cho màn hình nhỏ */
@media screen and (max-width: 768px) {

  /* Đường dọc */
  #events::before {
    left: 31px;
  }

  #events {
    padding-left: 0;
    padding-right: 0;
  }

  .event {
    width: calc(100% - 100px);
    left: 0 !important;
    margin-left: 67px !important;
    margin-right: 20px !important;
    margin-bottom: 30px !important;
  }

  .event::after {
    left: -46px !important;
  }

  .event::before {
    left: -15px !important;
    border-width: 10px 10px 10px 0;
    border-color: transparent #333 transparent transparent;
  }

  /* Sự kiện lẻ: viền trái */
  .event:nth-child(4n+1) {
    border-right: 5px solid #34dbd8;
    border-left: none;
  }

  .event:nth-child(4n+3) {
    border-right: 5px solid #ccc72e;
    border-left: none;
  }

}