.dark-mode main {
  background: url("/static/bg/join.png") top center / cover no-repeat;
}

main {
  width: 100%;
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.detail-wrapper {
  width: 1200px;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.detail-wrapper .container {
  width: 100%;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}

/* 타임존 바로 위의 컨테이너 여백 제거 -> 주석 처리하여 wrapper의 gap 적용 */
/*
.detail-wrapper .container:nth-child(2) {
  margin-bottom: 0;
  padding-bottom: 0;
}
*/

/* 타임존 설정 - 백업본과 동일하게 조정 */
.detail-timezone {
  width: 100%;
  display: flex;
  gap: 14px;
  overflow: hidden !important;
  position: relative;
  margin: 0;
  padding: 10px 0;
  height: 73px; /* 높이 고정 */
}

.detail-timezone-box {
  padding: 0 10px;
  display: flex;
  gap: 14px;
  white-space: nowrap;
  overflow: visible;
  will-change: transform; /* 성능 최적화 */
  transform: translateZ(0); /* 하드웨어 가속 */
  backface-visibility: hidden; /* 렌더링 성능 향상 */
  -webkit-backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  position: absolute;
  left: 0;
  animation: detail-timezone-scroll 60s linear infinite;
}

@keyframes detail-timezone-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* 타임존 아이템 최적화 */
.timezone-item {
  display: inline-flex;
  align-items: center;
  font-size: 16px;
  height: 53px;
  padding: 8px 24px;
  border-radius: 8px;
  flex-shrink: 0; /* 축소 방지 */
  transform: translateZ(0); /* 개별 아이템도 하드웨어 가속 */
}

.timezone-item .timezone-icon {
  display: block;
  width: 24px;
  height: 24px;
}
.timezone-item .timezone-country {
  font-weight: 600;
  margin: 0 20px 0 6px;
  white-space: nowrap;
}
.timezone-item .timezone-time {
  font-weight: 400;
  color: #717D84;
  white-space: nowrap;
}

/* 누락된 헤더 스타일 복원 */
.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.detail-header .progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 65%;
}
.detail-header .progress p {
  width: 110px;
  font-size: 18px;
  font-weight: 600;
}
.detail-header .progress .bar {
  position: relative;
  width: calc(100% - 110px);
  height: 32px;
  border-radius: 8px;
  overflow: hidden;
}
.detail-header .progress .progress-percent {
  transition: width 0.5s linear;
  position: absolute;
  height: 100%;
  top: 0;
  left: 0;
  border-radius: 8px;
  z-index: 2;
  overflow: hidden;
  transform: translateZ(0);
  will-change: width;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.detail-header .progress .progress-percent.progress-percent-BTC {
  background: linear-gradient(90deg, #F7921B 0%, #EE6D0F 100%);
}
.detail-header .progress .progress-percent.progress-percent-ETH {
  background: linear-gradient(90deg, #65A4FA 0%, #1058BA 100%);
}
.detail-header .progress .bar .limit-time {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  font-size: 16px;
  font-weight: 600;
  overflow: hidden;
}
.detail-header .progress .bar .limit-time-black {
  z-index: 1;
  color: white;
}
.detail-header .progress .bar .limit-time-white {
  color: #fff;
  z-index: 3;
}
.detail-header .time-btn-group {
  width: 30%;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #2B343A;
  border-radius: 8px;
}
.detail-header .time-btn-group > div {
  transition: all 0.1s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50%;
  height: 32px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 8px;
}
.detail-header .time-btn-group > div.active {
  color: #fff;
}
.detail-header .time-btn-group > div.active.time-btn-BTC {
  background: #EF6F10;
}
.detail-header .time-btn-group > div.active.time-btn-ETH {
  background: #135BBC;
}
.details_container {}

.detail-table-wrapper {
  width: 100%;
  display: flex;
  gap: 12px;
}

.table-wrapper {
  width: 100%;
}
.table-w {}
.table-2 {}
.table-c {}
.table-d {}

.swiper {
  padding-bottom: 40px;
  margin: 0;
}
.swiper-button-next:after, .swiper-button-prev:after {
  font-size: 20px;
  text-transform: none !important;
  letter-spacing: 0;
  font-variant: initial;
  line-height: 1;
}
.swiper-button-next, .swiper-button-prev {
  color: #ccc;
}

.table-item {
  display: flex;
}
.table-item.table-head {
  padding: 7px 0;
  border-radius: 8px;
  margin-bottom: 12px;
}
.table-item.table-body {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 14px 0;
  border-radius: 8px;
}
.table-item.table-body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 33.33%;
  width: 1px;
  height: 100%;
}
.table-item.table-body::after {
  content: "";
  position: absolute;
  top: 0;
  right: 33.33%;
  width: 1px;
  height: 100%;
}
.table-body-row {
  display: flex;
  padding: 0;
}
.table-body-row span:last-child {
  position: relative;
}
.tooltip {
  display: none;
}
.table-body-row span:last-child .tooltip {
  position: absolute;
  display: none;
  top: -55px;
  left: 50%;
  transform: translateX(-50%);
  width: 115px;
  height: 50px;
  background: #000;
  z-index: 10;
  color: #fff;
  border-radius: 4px;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  line-height: 18px;
}
.table-body-row span:last-child:hover .tooltip {
  display: flex;
}
.table-body-row span:last-child:hover .tooltip::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -7px;
  width: 0;
  height: 0;
  border-top: 10px solid #000;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
}
.table-item span {
  width: 100%;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}
.table-item.table-head span {
  font-size: 17px;
}

#alarm {
  width: calc(100% - 40px);
  max-width: 366px;
  position: fixed;
  z-index: 50;
  top: 194px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.alarm-wrapper {
  position: relative;
  width: 100%;
  padding-top: 22px;
}
.alarm-wrapper .close {
  cursor: pointer;
  position: absolute;
  top: 0;
  right: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: url("/static/icon/close.png") center center / contain no-repeat;
}
.alarm {
  display: flex;
  gap: 15px;
  width: 100%;
  height: 80px;
  border-radius: 12px;
  padding: 8px 16px;
  box-shadow: 0 0 16px 0 #0000001A;

}
.alarm .alarm-left {
  width: 64px;
  height: 64px;
}
.alarm .alarm-left.short {
  background: url("/static/icon/toast_short.svg") center center / contain no-repeat;
}
.alarm .alarm-left.long {
  background: url("/static/icon/toast_long.svg") center center / contain no-repeat;
}
.alarm .alarm-right {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  width: calc(100% - 79px);
}
.alarm .alarm-right p {
  font-size: 16px;
  font-weight: 700;
  line-height: 20px;
}
.alarm-right .alarm-progress {
  width: 100%;
}
.alarm-right .alarm-bar {
  position: relative;
  width: 100%;
  height: 21px;
  border-radius: 6px;
  overflow: hidden;
  background: #F6F7F8;
}
.alarm-right .alarm-bar .alarm-limit-time {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  width: 255px;
}
.alarm-right .alarm-bar .alarm-limit-time-black {
  z-index: 1;
  color: white;
}
.alarm-right .alarm-bar .alarm-limit-time-white {
  color: #fff;
  z-index: 3;
}
.alarm-right .alarm-progress-percent {
  transition: width 0.5s linear;
  position: absolute;
  height: 100%;
  top: 0;
  left: 0;
  border-radius: 6px;
  z-index: 2;
  overflow: hidden;
  transform: translateZ(0);
  will-change: width;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  width: 50%;
  background: rgba(0, 0, 0, 0.55);
}
.alarm-right .alarm-progress-percent.alarm-progress-percent-BTC {
  background: linear-gradient(90deg, #F7921B 0%, #EE6D0F 100%);
}
.alarm-right .alarm-progress-percent.alarm-progress-percent-ETH {
  background: linear-gradient(90deg, #65A4FA 0%, #1058BA 100%);
}


/* light mode */
.light-mode .detail-header .progress p {
  color: #2B343A;
}
.light-mode .detail-header .progress .bar {
  background: #fff;
}
.light-mode .detail-header .progress .bar .limit-time-black {
  color: #2B343A;
}
.light-mode .detail-header .time-btn-group > div {
  background: #FFFFFF;
  color: #2B343A;
}
.light-mode .detail-header .time-btn-group > div.active {
  color: #fff;
}
.light-mode .timezone-item {
  background: #fff;
}
.light-mode .timezone-item .timezone-country {
  color: #2B343A;
}
.light-mode .table-item.table-head {
  background: #fff;
}
.light-mode .table-item.table-body {
  background: #fff;
}
.light-mode .table-head .table-item span {
  color: #2B343A;
}
.light-mode .table-body .table-item span {
  color: #2B343A;
}
.light-mode .table-item.table-head span.center {
  border-left: 1px solid #CDD5D9;
  border-right: 1px solid #CDD5D9;
}
.light-mode .table-item.table-body::before {
  background: #CDD5D9;
}
.light-mode .table-item.table-body::after {
  background: #CDD5D9;
}
.light-mode .alarm {
  background: #fff;
}
.light-mode .alarm .alarm-right p {
  color: #2B343A;
}
.light-mode .alarm-right .alarm-bar .alarm-limit-time-black {
  color: #2B343A;
}


/* dark mode */
.dark-mode .detail-header .progress p {
  color: #FFFFFF;
}
.dark-mode .detail-header .progress .bar {
  background: rgba(0, 0, 0, 0.3);
}
.dark-mode .detail-header .progress .bar .limit-time-black {
  color: #FFFFFF;
}
.dark-mode .detail-header .time-btn-group > div {
  background: rgba(0, 0, 0, 0.3);
  color: #717D84;
}
.dark-mode .detail-header .time-btn-group > div.active {
  color: #fff;
}
.dark-mode .timezone-item {
  background: rgba(255, 255, 255, 0.03);
}
.dark-mode .timezone-item .timezone-country {
  color: #CDD5D9;
}
.dark-mode .table-item.table-head {
  background: rgba(0, 0, 0, 0.3);
}
.dark-mode .table-item.table-body {
  background: rgba(0, 0, 0, 0.3);
}
.dark-mode .table-head span {
  color: #fff;
}
.dark-mode .table-body span {
  color: #717D84;
}
.dark-mode .table-item.table-head span.center {
  border-left: 1px solid #2B343A;
  border-right: 1px solid #2B343A;
}
.dark-mode .table-item.table-body::before {
  background: #2B343A;
}
.dark-mode .table-item.table-body::after {
  background: #2B343A;
}
.dark-mode .alarm {
  background: rgba(0, 0, 0, 0.3);
}
.dark-mode .alarm .alarm-right p {
  color: #fff;
}

/* 다크모드에서 알람 프로그레스바 배경을 투명한 유리 느낌으로 설정 */
.dark-mode .alarm-right .alarm-bar {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.light-mode .gray {
  color: #CDD5D9 !important;
}
.dark-mode .gray {
  color: #2B343A !important;
}
.red {
  color: #F61823 !important;
}
.blue {
  color: #498DEA !important;
}
.green {
  color: #3DC07B !important;
}

.need-login-wrapper {
  position: fixed;
  width: 100vw;
  height: 100vh;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}
.need-login-area {
  color: #fff;
}



@media (max-width: 1220px) {
  main {
    padding-top: 100px;
    padding-bottom: 15px;
  }
}

@media (max-width: 788px) {
  .detail-header {
    flex-direction: column;
    gap: 14px;
  }
  .detail-header .progress {
    width: 100%;
  }
  .detail-header .time-btn-group {
    width: 100%;
  }
}

/* 차트 플레이스홀더 스타일 */
.chart-placeholder {
  display: none;
}

/* 애니메이션 정의 - 한 번에 전체 거리를 이동하도록 수정 */
@keyframes timezone {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* 트레이딩뷰 차트 컨테이너 - 높이 강제 지정 및 마진 제거 */
.detail-chart {
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  background-color: transparent;
  position: relative;
  z-index: 1;
  overflow: hidden !important;
  aspect-ratio: 16 / 9;
  min-height: 390px;
  max-height: 520px;
}

/* 트레이딩뷰 위젯 내부 요소 스타일 강화 */
.detail-chart .tradingview-widget-container,
.detail-chart .tradingview-widget-container__widget,
.detail-chart iframe {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: none !important;
}

@supports not (aspect-ratio: 16 / 9) {
  .detail-chart {
    height: auto !important;
  }

  .detail-chart::before {
    content: "";
    display: block;
    padding-top: 56.25%;
  }

  .detail-chart .tradingview-widget-container,
  .detail-chart .tradingview-widget-container__widget,
  .detail-chart iframe {
    position: absolute;
    inset: 0;
  }
}

@media (max-width: 1024px) {
  .detail-chart {
    min-height: 360px;
    max-height: 480px;
  }
}

@media (max-width: 768px) {
  .detail-chart {
    min-height: 330px;
    max-height: 420px;
  }

  /* 모바일 화면에서 좌우 여백 추가 */
  .detail-wrapper {
    padding-left: 15px; /* 예시 값, 필요시 조정 */
    padding-right: 15px; /* 예시 값, 필요시 조정 */
  }
}

/* 차트와 타임존 사이 여백 설정 - 백업본과 동일하게 조정 */
.detail-chart + .detail-timezone {
  margin-top: 0;
}

/* TradingView 로딩 메시지 숨김 처리 */
.tradingview-widget-container [class*="loadingStatusText"],
.tradingview-widget-container [class*="loadingIndicator"],
.tradingview-widget-container [class*="loading"],
.tradingview-widget-container .tv-spinner,
.tradingview-widget-container .chart-loading,
.tradingview-widget-container__widget .chart-loading {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* TradingView 기본 로딩 메시지 언어 관계없이 완전히 숨김 */
.tradingview-widget-container [aria-label],
.tradingview-widget-container [aria-labelledby] {
  opacity: 0 !important;
  font-size: 0 !important;
}

/* 로딩 중 배경 투명화 */
.tradingview-widget-container iframe {
  background-color: transparent !important;
}
