﻿.spot-wrap {
  position: relative;
  display: inline-block;
  width: 104px;
  height: 133px;
  z-index: 1000;
}

.spot-wrap a {
  display: block;
}

.spot-wrap a:focus {
  outline: 4px solid #fff;
  outline-offset: 4px;
}

.spot-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: polygon(99.04% 0.75%, 99.04% 82.86%, 0.96% 99.80%, 0.96% 0.75%);
}

.spot-border {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  opacity: 1;
  transition: opacity 180ms ease-out;
}

.spot-progress {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

.spot-progress .progress-indicator {
  opacity: 0;
  stroke-dasharray: 0;
  stroke-dashoffset: 0;
  stroke-linecap: round;
}

/* ============================================================================
   클릭 유도 아이콘
   ============================================================================ */
.spot-click-hint {
  position: absolute;
  top: 112px;
  right: 50%;
  margin-right: -42px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  z-index: 10;
}

.click-hint-icon {
  width: 48px;
  height: 48px;
  opacity: 0.4;
  transition: opacity 0.8s ease;
  transform: translate3d(0, 0, 0);
  transform-origin: center center;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  position: relative;
  z-index: 10;
  -webkit-transform: translate3d(0, 0, 0);
  display: block;
  object-fit: contain;
}

.spot-click-hint:hover .click-hint-icon {
  opacity: 1;
  transition: opacity 0.8s ease;
  animation: bounceUp 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  -webkit-animation: bounceUp 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.spot-click-hint:after {
  content: '';
  position: absolute;
  z-index: 0;
  top: -14px;
  right: 11px;
  width: 48px;
  height: 48px;
  background: url('https://img.imbc.com/commons/2018/image/main/click_hover.png') no-repeat center center;
  background-size: contain;
  opacity: 0;
  transform: translate3d(0, 0, 0);
  transform-origin: center center;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: opacity 0.5s ease;
  pointer-events: none;
  -webkit-transform: translate3d(0, 0, 0);
  display: block;
}

.spot-click-hint:hover:after {
  opacity: 1;
  animation: bounceUp 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  -webkit-animation: bounceUp 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.spot-click-hint:not(:hover) .click-hint-icon {
  opacity: 0.4;
  transition: opacity 0.8s ease;
  animation: bounceDown 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  -webkit-animation: bounceDown 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.spot-click-hint:not(:hover):after {
  opacity: 0;
  animation: bounceDown 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  -webkit-animation: bounceDown 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes bounceUp {
  0% {
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
  }
  30% {
    transform: translate3d(0, -10px, 0);
    -webkit-transform: translate3d(0, -10px, 0);
  }
  60% {
    transform: translate3d(0, -6px, 0);
    -webkit-transform: translate3d(0, -6px, 0);
  }
  90% {
    transform: translate3d(0, -8px, 0);
    -webkit-transform: translate3d(0, -8px, 0);
  }
  100% {
    transform: translate3d(0, -8px, 0);
    -webkit-transform: translate3d(0, -8px, 0);
  }
}

@-webkit-keyframes bounceUp {
  0% {
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
  }
  30% {
    transform: translate3d(0, -10px, 0);
    -webkit-transform: translate3d(0, -10px, 0);
  }
  60% {
    transform: translate3d(0, -6px, 0);
    -webkit-transform: translate3d(0, -6px, 0);
  }
  90% {
    transform: translate3d(0, -8px, 0);
    -webkit-transform: translate3d(0, -8px, 0);
  }
  100% {
    transform: translate3d(0, -8px, 0);
    -webkit-transform: translate3d(0, -8px, 0);
  }
}

@keyframes bounceDown {
  0% {
    transform: translate3d(0, -8px, 0);
    -webkit-transform: translate3d(0, -8px, 0);
  }
  30% {
    transform: translate3d(0, 3px, 0);
    -webkit-transform: translate3d(0, 3px, 0);
  }
  60% {
    transform: translate3d(0, -2px, 0);
    -webkit-transform: translate3d(0, -2px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
  }
}

@-webkit-keyframes bounceDown {
  0% {
    transform: translate3d(0, -8px, 0);
    -webkit-transform: translate3d(0, -8px, 0);
  }
  30% {
    transform: translate3d(0, 3px, 0);
    -webkit-transform: translate3d(0, 3px, 0);
  }
  60% {
    transform: translate3d(0, -2px, 0);
    -webkit-transform: translate3d(0, -2px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
  }
}

/* ============================================================================
   광고 레이어
   ============================================================================ */
.main-ad-layer {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 74px;
  box-sizing: border-box;
  background-color: rgba(0, 0, 0, 0);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 999;
  transition: background-color 180ms ease-out, opacity 180ms ease-out;
}

.main-ad-layer.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.main-ad-layer.is-closing {
  transition: background-color 180ms ease-in, opacity 180ms ease-in;
}

.main-ad-content {
  position: relative;
  width: 100%;
  max-width: 1220px;
  opacity: 0;
  transition: opacity 220ms ease-out;
}

.main-ad-layer.is-visible .main-ad-content {
  opacity: 1;
}

.main-ad-layer.is-closing .main-ad-content {
  opacity: 0;
}

.ad-player {
  position: relative;
  width: 1220px;
  height: 686px;
  background: #000;
  overflow: hidden;
}

.ad-hover-controls {
  position: absolute;
  inset: 0;
  z-index: 10;
}

.ad-overlay {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.00) 78.94%, rgba(0, 0, 0, 0.80) 100%), linear-gradient(180deg, rgba(0, 0, 0, 0.00) 79.52%, rgba(0, 0, 0, 0.80) 100%), rgba(0, 0, 0, 0.20);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
}

.ad-player img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ad-player .ad-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ad-audio-toggle {
  position: absolute;
  left: 40px;
  bottom: 40px;
  width: 32px;
  height: 32px;
  border: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 10;
  outline: none;
}

.ad-audio-toggle:focus {
  opacity: 1;
  visibility: visible;
  outline: none;
}

.ad-audio-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.ad-audio-toggle::before,
.ad-audio-toggle::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
}

.ad-audio-toggle::before {
  width: 32px;
  height: 32px;
  background: url('https://img.imbc.com/commons/2018/image/main/ico-muted.png');
}

.ad-audio-toggle.is-unmuted::before {
  background: url('https://img.imbc.com/commons/2018/image/main/ico-unmuted.png');
}

.main-ad-close {
  position: absolute;
  width: 40px;
  height: 40px;
  top: 16px;
  right: 16px;
  background: url('https://img.imbc.com/commons/2018/image/main/ico-ad-close.png') no-repeat !important;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.ad-learn-more {
  position: absolute;
  right: 24px;
  bottom: 40px;
  color: #FFF;
  font-family: 'pretend-regular';
  font-size: 20px;
  font-style: normal;
  font-weight: 500;
  line-height: 36px;
  letter-spacing: -0.5px;
  text-decoration: none;
  padding: 4px 16px;
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.40);
  background: rgba(0, 0, 0, 0.40);
  backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  outline: none;
}

.ad-learn-more:focus {
  opacity: 1;
  visibility: visible;
  outline: none;
}

.ad-learn-more:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.ad-status-text {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #FFF;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 26px;
  line-height: 32px;
  white-space: nowrap;
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.ad-status-bold {
  font-weight: 800;
}

.ad-status-normal {
  font-weight: 400;
  letter-spacing: -0.65px;
}

.ad-hover-controls:hover > *,
.ad-hover-controls.is-focused > * {
  opacity: 1;
  visibility: visible;
}