html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #10131a;
  color: #f4f7fb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#unity-container {
  position: fixed;
  inset: 0;
}

/* 广告入口：默认完全隐藏，Unity 就绪后延迟淡入（关卡数正下方的小胶囊） */
.monetag-offer-anchor {
  position: fixed;
  z-index: 30;
  top: calc(env(safe-area-inset-top, 0px) + 64px);
  left: 12px;
  right: auto;
  bottom: auto;
  width: auto;
  max-width: calc(100vw - 24px);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-12px) scale(0.97);
  transition:
    opacity 0.55s ease,
    transform 0.55s cubic-bezier(0.22, 0.8, 0.28, 1);
}

.monetag-offer-anchor.is-hidden {
  display: none;
}

.monetag-offer-anchor.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

#monetag-offer-slot,
.monetag-offer__button,
.monetag-offer__notice {
  pointer-events: auto;
}

.monetag-offer__button {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(12, 16, 22, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.25s ease, transform 0.15s ease;
}

.monetag-offer__button:hover {
  background: rgba(20, 28, 38, 0.8);
}

.monetag-offer__button:active {
  transform: scale(0.96);
}

.monetag-offer__button:disabled {
  opacity: 0.75;
  cursor: default;
}

.monetag-offer__button.is-loading .monetag-offer__title::after {
  content: "…";
  animation: offer-pulse 1s infinite;
}

@keyframes offer-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.monetag-offer__icon {
  font-size: 15px;
  line-height: 1;
}

.monetag-offer__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: rgba(255, 255, 255, 0.92);
}

.monetag-offer__reward {
  color: #ffd45a;
  font-size: 11px;
  font-weight: 800;
}

.monetag-offer__notice {
  box-sizing: border-box;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(12, 16, 22, 0.7);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #dce8f4;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.monetag-offer__notice.is-error {
  color: #ff9d9d;
}

#unity-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #151b25 0%, #0d1118 100%);
}

#unity-loading-bar {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
}

#unity-progress-bar-full {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #39d98a 0%, #64d2ff 100%);
  transition: width 0.15s ease;
}

#unity-warning {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: grid;
  gap: 8px;
}

.unity-banner {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.6);
  font-size: 13px;
  line-height: 1.4;
}
