/* ============================================================
   밸런스게임 — 공통 UI(ui-common.css) 위에 얹는 이 게임만의 것
   화면 껍데기(모달·폼·버튼·리더보드)는 ui-common.css 가 담당한다.
   여기서 바꿀 것은 아래 테마 색과 게임 전용 요소뿐.
   ============================================================ */

:root {
  --accent: #ff4757;
  --accent-rgb: 255, 71, 87;
  --btn-primary-bg: linear-gradient(135deg, #ff4757, #ee5253);
  --btn-primary-color: #fff;
  --bg-page: #12121a;
  --bg-container: #0f0c18;
  --canvas-bg: radial-gradient(circle at 50% 30%, #29203b, #0f0c18);
}


/* #score 의 min-width:54px 는 숫자를 오른쪽으로 밀어 이모지와의 간격을
   혼자 벌어지게 만들었다. 자릿수 흔들림은 공통 .hud-time 이 이미 잡는다. */

/* 모바일 온스크린 조작 버튼 (기본 숨김 -> 터치 기기에서만 노출) */
#touch-controls {
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 100%;
  display: none;
  justify-content: space-between;
  padding: 0 24px;
  pointer-events: none;
}

.ctrl-btn {
  pointer-events: auto;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
}

.ctrl-btn:active {
  background: rgba(255, 71, 87, 0.5);
  transform: scale(0.95);
}

/* PC 키보드 가이드 (PC 환경에서만 노출) */
#pc-controls-hint {
  position: absolute;
  bottom: 12px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.kbd-badge {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: bold;
  color: #eed534;
}

/* 터치 기기 미디어 쿼리 */
@media (hover: none) or (pointer: coarse) {
  #touch-controls {
    display: flex;
  }
  #pc-controls-hint {
    display: none;
  }
}

/* ============================================================
   상단 공백 광고 배너 슬라이더 (3장 3초 무한 루프, GPU 가속)
   ============================================================ */
.ad-banner-container {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: min(360px, calc(100% - 32px));
  overflow: hidden;
  z-index: 105;
}

.ad-slider-track {
  display: flex;
  width: 300%;
  animation: adCut3 9s infinite;
}

.ad-banner-slide {
  width: 33.333333%;
  flex-shrink: 0;
  display: block;
  text-decoration: none;
}

.ad-banner-img {
  width: 100%;
  height: auto;
  display: block;
}

/* 3초마다 슬라이딩 효과 없이 즉시 컷 전환 (1번 ➔ 2번 ➔ 3번 ➔ 1번) */
@keyframes adCut3 {
  0%, 33.32% {
    transform: translateX(0%);
  }
  33.33%, 66.65% {
    transform: translateX(-33.333333%);
  }
  66.66%, 99.99% {
    transform: translateX(-66.666666%);
  }
  100% {
    transform: translateX(0%);
  }
}

/* 대사와 점수 영역 사이 간격 미세 조정 (10px ➔ 6px) */
.clear-quote,
.gameover-quote {
  margin-bottom: 6px;
}