/* 全局样式 */
body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  color: black;
}


/* 全屏广告样式 */
.fullscreen-ad {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%; 
  height: 100%;
  display: flex;
  justify-content: center; /* 水平居中 */
  align-items: center; /* 垂直居中 */
  background-color: black;
  z-index: 1000;
  display: none; /* 默认隐藏 */
}

#ad-video {
  width: 100%; /* 设置宽度为 100% */
  height: 100%; /* 设置高度为 100% */
  object-fit: contain; /* 确保视频完整显示 */
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 24px;
  color: white;
  cursor: pointer;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 5px 10px;
  border-radius: 5px;
}


/* 广告控制区域样式 */
.ad-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    color: white;
    font-size: 16px;
}

.close-btn {
    font-size: 24px;
    color: white;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 5px;
    margin-right: 10px; /* 与倒计时之间添加一些间距 */
}

.countdown-timer {
    color: yellow;
    font-weight: bold;
}





/* 背景图片样式 */
#unity-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #000;
  background-size: cover;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Unity Canvas 样式 */
#unity-canvas {
  height: 100%;
  background: transparent;
  display: none;
}

/* 加载进度条容器 */
#Loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 100%;
  background: url('bg.jpg') no-repeat center center;
  background-size: cover;
  display: block;
}

.loader {
  width: 100%;
  height: 100%;
  margin: 0;
  position: absolute;
  display: block;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  text-align: center;
}

.progressbar {
  width: 70%;
  margin: 0 auto;
  padding: 1px;
  border: 2px solid #ffffff;
  border-radius: 20px;
  position: fixed;
  bottom: 15%;
  left: 0;
  right: 0;
  height: 15px;
}

/* 进度条填充部分 */
.fill {
  height: 100%;
  background: rgb(204, 21, 32);
  display: block;
  border-radius: 10px;
  transition-property: width;
  transition-duration: 1s;
}

#progress-percentage {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 12px;
}

/* 进度图片样式 */
#progress-image {
  display: block;
  margin: 10px auto 0;
  width: 50%;
  position: fixed;
  bottom: calc(15% - 20px);
  left: 50%;
  transform: translateX(-50%);
  object-fit: contain;
}

/* 进度条样式 */
#progress-bar {
  width: 100%;
  height: 20px;
  background-color: #f3f3f3;
  border-radius: 10px;
  overflow: hidden;
}

#progress-bar-fill {
  height: 100%;
  background-color: #4caf50;
  width: 0%;
  transition: width 0.3s ease;
}

/* Unity 容器样式 */
#unity-container {
  width: 100%;
  height: 100%;
  position: absolute;
}

#unity-canvas {
  height: 100%;
  background: #231F20;
}

#unity-loading-bar {
  display: none;
}

#unity-progress-bar-empty {
  width: 141px;
  height: 18px;
  margin-top: 10px;
  background: url('Build/minidapp.progress-bar-empty-dark.png') no-repeat center;
}

#unity-progress-bar-full {
  width: 0%;
  height: 18px;
  margin-top: 10px;
  background: url('Build/minidapp.progress-bar-full-dark.png') no-repeat center;
}
