/* ===========================
   공통 스타일
   =========================== */

body {
  font-family:
    "Pretendard",
    -apple-system,
    BlinkMacSystemFont,
    "Malgun Gothic",
    sans-serif;
}
[x-cloak] {
  display: none !important;
}

/* 카운트다운 애니메이션 */
@keyframes countPop {
  0% {
    transform: scale(0.2);
    opacity: 0;
  }
  50% {
    transform: scale(1.35);
    opacity: 1;
  }
  70% {
    transform: scale(0.88);
    opacity: 1;
  }
  85% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
.count-pop {
  animation: countPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 페이드인 — opacity만 사용 (translateY 제거: layout 재계산 방지) */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.fade-in {
  animation: fadeIn 0.25s ease-out;
  will-change: opacity;
}

/* 펄스 글로우 — box-shadow 대신 pseudo-element + opacity로 GPU 가속 */
.pulse-glow {
  position: relative;
}
.pulse-glow::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  background: rgba(168, 85, 247, 0.35);
  filter: blur(20px);
  z-index: -1;
  animation: pulseGlowOp 2s ease-in-out infinite;
  will-change: opacity;
}
@keyframes pulseGlowOp {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; }
}

/* 스피너 */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.spinner {
  animation: spin 1s linear infinite;
}

/* 웹캠 좌우 반전 */
.mirror {
  transform: scaleX(-1);
}

/* 터치 최적화 */
button,
a,
label {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* 스크롤바 숨기기 */
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* 9:16 키오스크 컨테이너 */
.kiosk-container {
  position: relative;
  aspect-ratio: 9 / 16;
  width: min(100vw, calc(100vh * 9 / 16));
  max-height: 100vh;
  overflow: hidden;
  container-type: inline-size;
}

/* 썸네일 그리드 선택 효과 */
.thumb-selected {
  outline: 3px solid rgba(168, 85, 247, 0.9);
  outline-offset: 2px;
}
