@charset "UTF-8";

/* 썸네일/모달 공통 컬러 변수 */
:root {
  --hover-thumb-highlight: rgba(255, 226, 59, 0.95);
}

/* 게임 썸네일 hover 애니메이션(이미지 회전/확대 + 오버레이 + CTA 버튼) */

/* 썸네일 이미지를 부드럽게 확대/회전시키기 위한 기본 transition */
.gamediv .gameimg img {
  width: 100%;
  transition: all 0.3s;
}

/* 썸네일 하단의 기본 어두운 그라디언트 (main.css에 있던 효과 보존) */
.gamediv {
  position: relative;
  overflow: hidden;
}

/* 썸네일에 마우스 오버할 때 스와이프되는 하이라이트(사선 그라디언트) */
.gamediv::before {
  content: "";
  position: absolute;
  width: 50px;
  height: 400px;
  top: -100px;
  left: -130px;
  transform: rotateZ(30deg);
  background: linear-gradient(to right, rgba(58, 255, 161, 0), rgba(255, 226, 59, 0.95));
  transition: left 0.4s ease, opacity 0.4s ease;
  opacity: 0;
  pointer-events: none;
  z-index: 8;
}

/* 스와이프 라인을 오른쪽으로 이동시켜 하이라이트 보이기 */
.gamediv:hover::before {
  left: 300px;
  opacity: 0.6;
}

/* hover 시 노출되는 어두운 오버레이 */
.gamediv .blackbg {
  display: none;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 6;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0);
}

/* hover 때 중앙에 띄워줄 플레이 버튼 */
.gamediv .playbut {
  display: none;
  position: absolute;
  overflow: hidden;
  left: 50%;
  top: 50%;
  z-index: 12;
  transform: translate(-50%, -50%);
  width: max-content;
  min-height: 42px;
  line-height: 42px;
  background-color: var(--color-gameplay-button);
  color: #fff;
  font-size: 15px;
  padding: 0 36px;
  border-radius: 6px;
  transition: all 0.3s;
  white-space: nowrap;
  text-align: center;
  overflow: visible;
  box-sizing: border-box;
}

/* 버튼 테두리 애니메이션용 스팬 기본값 */
.gamediv .playbut span {
  position: absolute;
}

/* 버튼 상단 라인 이동 애니메이션 */
.gamediv .playbut span:first-child {
  animation: animation-span-1 infinite linear;
  animation-duration: 2s;
  width: 100%;
  height: 2px;
  top: 0;
  left: 0;
}

/* 버튼 우측 라인 이동 애니메이션 */
.gamediv .playbut span:nth-child(2) {
  animation: animation-span-2 infinite linear;
  animation-duration: 2s;
  animation-delay: 1s;
  width: 2px;
  height: 100%;
  top: 0;
  right: 0;
}

/* 버튼 하단 라인 이동 애니메이션 */
.gamediv .playbut span:nth-child(3) {
  animation: animation-span-3 infinite linear;
  animation-duration: 2s;
  width: 100%;
  height: 2px;
  bottom: 0;
  right: 0;
}

/* 버튼 좌측 라인 이동 애니메이션 */
.gamediv .playbut span:nth-child(4) {
  animation: animation-span-4 infinite linear;
  animation-duration: 2s;
  animation-delay: 1s;
  width: 2px;
  height: 100%;
  top: 0;
  left: 0;
}

/* 상단 라인을 좌→우로 움직이며 그라디언트를 흘려보내는 애니메이션 */
@keyframes animation-span-1 {
  0% {
    background: linear-gradient(to left, var(--color-gameplay-button-ani1), var(--color-gameplay-button-ani2));
    transform: translateX(-250px);
  }
  100% {
    background: linear-gradient(to left, var(--color-gameplay-button-ani1), var(--color-gameplay-button-ani2));
    transform: translateX(250px);
  }
}

/* 오른쪽 라인을 아래→위로 움직이는 애니메이션 */
@keyframes animation-span-2 {
  0% {
    background: linear-gradient(to top, var(--color-gameplay-button-ani1), var(--color-gameplay-button-ani2));
    transform: translateY(-200px);
  }
  100% {
    background: linear-gradient(to top, var(--color-gameplay-button-ani1), var(--color-gameplay-button-ani2));
    transform: translateY(200px);
  }
}

/* 하단 라인을 우→좌로 움직이는 애니메이션 */
@keyframes animation-span-3 {
  0% {
    background: linear-gradient(to right, var(--color-gameplay-button-ani1), var(--color-gameplay-button-ani2));
    transform: translateX(250px);
  }
  100% {
    background: linear-gradient(to right, var(--color-gameplay-button-ani1), var(--color-gameplay-button-ani2));
    transform: translateX(-250px);
  }
}

/* 왼쪽 라인을 위→아래로 움직이는 애니메이션 */
@keyframes animation-span-4 {
  0% {
    background: linear-gradient(to bottom, var(--color-gameplay-button-ani1), var(--color-gameplay-button-ani2));
    transform: translateY(200px);
  }
  100% {
    background: linear-gradient(to bottom, var(--color-gameplay-button-ani1), var(--color-gameplay-button-ani2));
    transform: translateY(-200px);
  }
}

/* hover 시 썸네일 이미지를 회전+확대 */
.gamediv:hover .gameimg img {
  transform: rotate(-10deg) scale(1.28);
  box-shadow: inset 0 0 12px rgb(255, 0, 0);
}

/* 모달 썸네일 hover 스케일/각도 */
.gameboxmodal .gamelistbox .gamelistul .gamediv .gameimg img {
  transition: transform 0.3s ease;
}

.gameboxmodal .gamelistbox .gamelistul .gamediv:hover .gameimg img {
  transform: rotate(-8deg) scale(1.2) !important;
}

/* hover 시 오버레이와 플레이 버튼을 노출 */
.gamediv:hover .blackbg,
.gamediv:hover .playbut {
  display: block;
  box-shadow: inset 0 0 6px rgba(255, 242, 128, 0.671);
}

/* hover 시 버튼을 위아래로 튕기는 모션 */
.gamediv:hover .playbut {
  transition: all 0.2s;
  animation: bounce 1s infinite ease-in-out;
}

/* 플레이 버튼 위아래 튕김 모션 정의 */
@keyframes bounce {
  0%, 100% {
    transform: translate(-50%, -50%);
  }
  50% {
    transform: translate(-50%, -45%);
  }
}

/* hover 중 버튼 자체를 강조하는 배경색 */
.gamediv .playbut:hover {
  background-color: #e2a113;
}

/* 모달 게임 버튼 전용 스타일 (assets/css/modal.css에서 이동) */
.gameboxmodal .gamelistbox .gamelistul .gamediv .playbut {
  display: none;
  position: absolute;
  overflow: hidden;
  left: 50%;
  top: 50%;
  z-index: 12;
  transform: translate(-50%, -50%);
  width: auto;
  min-width: 120px;
  height: 42px;
  line-height: 42px;
  background-color: var(--color-gameplay-button);
  color: #fff;
  font-size: 15px;
  padding: 0 0px;
  border-radius: 6px;
  transition: all 0.3s;
}
.gameboxmodal .gamelistbox .gamelistul .gamediv .playbut span {
  position: absolute;
}
.gameboxmodal .gamelistbox .gamelistul .gamediv .playbut span:first-child {
  animation: animation-span-1 infinite linear;
  animation-duration: 2s;
  width: 100%;
  height: 2px;
  top: 0;
  left: 0;
}
.gameboxmodal .gamelistbox .gamelistul .gamediv .playbut span:nth-child(2) {
  animation: animation-span-2 infinite linear;
  animation-duration: 2s;
  animation-delay: 1s;
  width: 2px;
  height: 100%;
  top: 0;
  right: 0;
}
.gameboxmodal .gamelistbox .gamelistul .gamediv .playbut span:nth-child(3) {
  animation: animation-span-3 infinite linear;
  animation-duration: 2s;
  width: 100%;
  height: 2px;
  bottom: 0;
  right: 0;
}
.gameboxmodal .gamelistbox .gamelistul .gamediv .playbut span:nth-child(4) {
  animation: animation-span-4 infinite linear;
  animation-duration: 2s;
  animation-delay: 1s;
  width: 2px;
  height: 100%;
  top: 0;
  left: 0;
}
.gameboxmodal .gamelistbox .gamelistul .gamediv:hover .blackbg,
.gameboxmodal .gamelistbox .gamelistul .gamediv:hover .playbut {
  display: block;
}
.gameboxmodal .gamelistbox .gamelistul .gamediv:hover .playbut {
  transition: all 0.2s;
  animation: bounce 1s infinite ease-in-out;
}
.gameboxmodal .gamelistbox .gamelistul .playbut:hover {
  background-color: var(--color-gameplay-button-hover);
}
