/* NBA 燈箱廣告樣式 */
/* 遵循開發規範：ES5、BEM命名、響應式設計 */
/* NBA 燈箱主體 */
.nba-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
}

.nba-lightbox__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  cursor: pointer;
}

.nba-lightbox__container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* 關閉按鈕 */
.nba-lightbox__close {
  position: absolute;
  right: 10px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10001;
  background-color: #ffffff00;
}

.nba-lightbox__close:hover {
  transform: scale(1.1);
}

.nba-lightbox__close span {
  font-size: 36px;
  color: #ffffff;
}

/* 廣告內容容器 */
.nba-lightbox__content {
  max-width: 800px;
  max-height: 500px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  background: #000000;
  position: relative;
}

/* 上方廣告區域 */
.nba-lightbox__ad-section {
  width: 100%;
  overflow: hidden;
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
}

.nba-lightbox__ad-image {
  width: 100%;
  height: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  display: block;
}

/* 下方比分區域 */
.nba-lightbox__score-section {
  width: 100%;
  position: relative;
}
.nba-lightbox__score-section-bg {
  width: 100%;
  height: 100%;
  margin-top: -120px;
}
.nba-lightbox__score-section img {
  width: 100%;
  height: 100%;
  display: block;
}
.nba-lightbox__score-bg {
  width: 100%;
  height: 100%;
  margin-top: -180px;
  margin-bottom: 20px;
  background: linear-gradient(
    to bottom,
    #00000000 0%,
    #000000 80%,
    #000000 100%
  );
}

/* 隊伍區域 */
.nba-lightbox__teams {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
}

.nba-lightbox__team {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
}

.nba-lightbox__team-logo {
  width: 100%;
  max-width: 150px;
  aspect-ratio: 1/1;
}

.nba-lightbox__team-name {
  font-size: 16px;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* 比分顯示 */
.nba-lightbox__score-display {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.nba-lightbox__score-display-image {
  width: 100%;
  max-width: 83px;
  padding: 0px 20px;
  background: #ee1527;
  border-radius: 20px;
}

.nba-lightbox__live-text {
  font-size: 16px;
  color: #ffffff;
  padding: 0px 8px;
  background: #de1e35;
  border-radius: 10px;
  display: flex;
  gap: 5px;
}

.nba-lightbox__live-text-dot {
  color: #f4d31f;
  background: #ee1527;
  font-size: 10px;
}

.nba-lightbox__score {
  font-family: "Arial Negreta", "Arial Normal", "Arial";
  font-size: 96px;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 2px;
  line-height: 1;
}

.nba-lightbox__game-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: rgba(255, 255, 255, 0.9);
}

.nba-lightbox__quarter {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 2px;
}

.nba-lightbox__time {
  font-size: 12px;
  opacity: 0.8;
}

/* 更新時間 */
.nba-lightbox__update-time {
  position: absolute;
  bottom: 10px;
  right: 15px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
}

/* 載入中動畫 */
.nba-lightbox__loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
  font-size: 16px;
  z-index: 10002;
}

.nba-lightbox__spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #fff;
  border-radius: 50%;
  animation: nba-spinner 1s linear infinite;
  margin-bottom: 10px;
}

@keyframes nba-spinner {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 顯示/隱藏動畫 */
.nba-lightbox.nba-lightbox--show {
  display: block;
  animation: nba-fade-in 0.4s ease;
}

.nba-lightbox.nba-lightbox--hide {
  animation: nba-fade-out 0.3s ease;
}

@keyframes nba-fade-in {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes nba-fade-out {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.9);
  }
}
@media (max-width: 850px) {
  .nba-lightbox__score {
    font-size: 72px;
  }
  .nba-lightbox__live-text {
    font-size: 16px;
  }

  .nba-lightbox__team-logo {
    max-width: 160px;
  }
  .nba-lightbox__score-bg {
    margin-top: -150px;
  }
}
@media (max-width: 500px) {
  .nba-lightbox__score {
    font-size: 34px;
  }
  .nba-lightbox__live-text {
    font-size: 16px;
    padding: 0 10px;
  }

  .nba-lightbox__score-section {
    margin-top: -50px;
  }
  .nba-lightbox__score-section-bg {
    margin-top: -180px;
  }
  .nba-lightbox__score-bg {
    margin-top: -70px;
  }
  .nba-lightbox__content {
    max-width: 350px;
    height: 240px;
  }
  .nba-lightbox__team-logo {
    max-width: 86px;
  }
}
@media (max-width: 320px) {
  .nba-lightbox__score-section {
    margin-top: 18px;
  }
}
