/* ------------------------------------------------*/
/* Base CSS Styles Start */
/* ------------------------------------------------*/
*,
*::before,
*::after {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

button {
  background: none !important;
  border: none !important;
}

button:active,
button:focus {
  outline: none !important;
}

button::-moz-focus-inner {
  border: 0 !important;
}

input::-moz-focus-inner {
  border: 0 !important;
}

::-moz-selection {
  background-color: #343434;
  color: #b6b6b6;
  text-shadow: none;
}

::selection {
  background-color: #343434;
  color: #b6b6b6;
  text-shadow: none;
}

html {
  font-size: 52.5%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  -ms-user-select: none;
  -moz-user-select: -moz-none;
  -khtml-user-select: none;
  -webkit-user-select: none;
  user-select: none;
  cursor: default;
}

@media only screen and (min-width: 1200px) {
  html {
    font-size: 58%;
  }
}

@media only screen and (min-width: 1400px) {
  html {
    font-size: 62.5%;
  }
}

body {
  min-width: 320px;
  overflow: hidden !important;
  font: normal 400 1.6rem/1.7 "Pretendard", sans-serif;
  background-color: #252525;
  color: #616161;
  line-height: 1;
}

.section {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-in-out;
}

.section.open {
  opacity: 1;
  visibility: visible;
}

/* ====== 로딩 오버레이 ====== */
#loading {
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  inset: 0;
  z-index: 9999;
  background: #0f1115; /* 다크톤 배경 */
  color: #dfe3ea;
  transition: opacity 0.5s ease;
}
#loading.close {
  opacity: 0;
  pointer-events: none;
}

.loader-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
}

/* 1줄: 브랜드명 – 은은한 그라데이션 + 살짝 반짝임 */
.loader-title {
  font-family: "HeirofLight", sans-serif;
  font-size: min(5rem, 90vw);
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: transparent;
  background: linear-gradient(90deg, #a8b5ff, rgb(254, 154, 68));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* 2줄: 타이핑처럼 한 글자씩 뜨고 사라지는 루프 */
.loader-typing {
  display: inline-flex;
  align-items: baseline;
}

.letters {
  display: inline-flex;
}

.letters span {
  font-size: 2rem;
  font-weight: 200;
  letter-spacing: 0.04em;
  color: #b9c2cf;
  opacity: 0;
  transform: translateY(6px);
  filter: blur(2px);
  /* 각 글자 애니메이션 – 순차 노출 후 사라짐 */
  animation: type 2.4s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.12s);
}

@keyframes type {
  0% {
    opacity: 0;
    transform: translateY(6px);
    filter: blur(2px);
  }
  10% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
  80% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-4px);
    filter: blur(2px);
  }
}

img {
  text-decoration: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  pointer-events: none;
}

a {
  text-decoration: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  outline: 0;
  color: #fff;
}
a:hover,
a:active,
a:visited {
  text-decoration: none;
}

.color-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.color-layer.dark {
  background-color: rgba(0, 0, 0, 0.7);
}
.color-layer.gd {
  background: rgb(0, 0, 0);
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0) 30%,
    rgba(0, 0, 0, 0) 50%,
    rgba(0, 0, 0, 1) 100%
  );
}

.btn-style {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 500px;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.5s ease-in-out;
}

/* LIQUID GLASS STYLES */
.glass-filter {
  position: absolute;
  z-index: -10;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  backdrop-filter: blur(0px);
  /* filter: url(#glass-distortion); */
}
.glass-specular {
  position: absolute;
  z-index: -9;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow: inset 1px 1px 1px 0 rgba(255, 255, 255, 0.5), inset -1px -1px 0px 0px rgba(255, 255, 255, 0.25);
}

.animate__animated {
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
}

/* ------------------------------------------------*/
/* Base CSS Styles End */
/* ------------------------------------------------*/

.pano {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -999;
}
.ui-section {
  pointer-events: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 90%;
  height: 95%;
}
.ui-section.close {
  opacity: 0;
  visibility: hidden;
}
.ui-section > * {
  pointer-events: auto;
}

.top-bar {
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  transition: all 0.2s ease-in-out;
  opacity: 1;
}
.top-bar > * {
  pointer-events: auto;
}
.top-bar.close {
  -webkit-animation-name: bounceOutUp;
  animation-name: bounceOutUp;
}

.logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.8rem;
}
.logo-box img {
  width: auto;
  height: 3.4rem;
  object-fit: contain;
}

.langbox {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  gap: 0.5rem;
}
.flag {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 500px;
}
.flag h1 {
  font-size: 1.2rem;
  font-weight: 400;
  text-align: center;
  line-height: 0;
  margin: 0 auto;
}
.flag.active {
  background-color: rgba(0, 0, 0, 0.3);
}
.flag:hover {
  background-color: rgba(254, 154, 68, 1);
}
.flag img {
  width: auto;
  height: 2.5rem;
}

.divider::after {
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 500px;
}

.menu-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
}
.menu-toggle.open {
  opacity: 1;
  visibility: visible;
}
.menu-toggle:hover {
  opacity: 1;
  transform: scale(1.05);
}
.menu-toggle span {
  font-size: 2.8rem;
  color: #fff;
  vertical-align: middle;
}

.menu-box {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  padding: 0.8rem 1.2rem;
  white-space: nowrap;
  transition: all 0.2s ease-in-out;
}
@media only screen and (max-width: 780px) {
  .menu-box {
    top: 8%;
    width: 100%;
    justify-content: space-around;
    gap: 1rem;
  }
}
.menu-box.close {
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%) translateY(-100%) scale(0.5);
}
.menu-box .item {
  cursor: pointer;
  font-size: 1.5rem;
  font-weight: 400;
  text-align: center;
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  padding: 1rem 1.2rem;
  transition: all 0.2s ease-in-out;
}
.menu-box .item:hover {
  transform: scale(1.05);
}
#hall-combo {
  position: absolute;
  top: 150%;
  transform-origin: top;
  transform: scaleY(0);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.42, 0, 0, 1);
}
#hall-combo-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.3rem 2rem;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 1rem;
  overflow: hidden;
}
#hall-combo button {
  cursor: pointer;
  font-size: 1.5rem;
  font-weight: 400;
  text-align: center;
  color: white;
  white-space: nowrap;
}
#hall-combo button:hover {
  color: rgb(254, 154, 68);
}
#hall-combo.open {
  transform: scaleY(1);
  opacity: 1;
  visibility: visible;
}

.profile-box {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease-in-out;
}
.profile-box.open {
  opacity: 1;
  visibility: visible;
}
#profile-iframe {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 50%;
  left: 5%;
  transform: translateY(-50%);
  width: min(580px, 90vw);
  height: 80vh;
  border: none;
  border-radius: 2rem;
  transition: transform 0.5s ease-in-out, left 0.5s ease-in-out;
}
@media only screen and (orientation: portrait) {
  #profile-iframe {
    left: 50%;
    transform: translate(-50%, -50%);
  }
}

.walltext-box {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);

  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease-in-out;
}
.walltext-box.open {
  opacity: 1;
  visibility: visible;
}
#walltext-iframe {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 50%;
  right: 10%;
  transform: translateY(-50%);
  width: min(580px, 90vw);
  height: min(580px, 90vw);
  background: none;
  transition: transform 0.5s ease-in-out, left 0.5s ease-in-out;
}
@media only screen and (orientation: portrait) {
  #walltext-iframe {
    right: initial;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}

.arrow-bar {
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 105%;
  transition: all 0.2s ease-in-out;
  background: none;
}
.arrow-bar > * {
  pointer-events: auto;
}
.arrows span {
  cursor: pointer;
  font-size: 9rem;
  color: #fff;
  opacity: 0.7;
  text-shadow: 0.3rem 0.3rem 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease-in-out;
  font-variation-settings: "FILL" 1, "wght" 100, "GRAD" 200, "opsz" 200;
}
.arrows span:hover {
  transform: scale(1.05);
  color: #fff;
  opacity: 1;
}

.bottom-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 0.8rem 1.2rem;
  max-width: 100%;
}
@media only screen and (max-width: 780px) {
  .bottom-bar {
    gap: 1rem;
  }
  #bottomHome,
  #bottomFs {
    opacity: 0;
    visibility: hidden;
    display: none;
  }
}
.bottom-bar.close {
  -webkit-animation-name: bounceOutDown;
  animation-name: bounceOutDown;
}
.bottom-bar .item {
  cursor: pointer;
  padding: 0.8rem;
  transition: all 0.2s ease-in-out;
}
.bottom-bar .item:hover {
  transform: scale(1.05);
}
.bottom-bar .item span {
  font-size: 2.5rem;
  color: rgba(255, 255, 255, 1);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 200, "opsz" 200;
}

/* 볼륨 슬라이더: 기본 숨김 */
.sndvol-hover {
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0;
  height: var(--bar-thickness);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease-in-out;
}
#sndVol {
  --bar-thickness: 3px; /* 트랙 높이(두께) */
  --bar-bg: rgba(255, 255, 255, 0); /* 트랙 기본색 */
  --bar-fill: rgb(162, 231, 49); /* 채워지는 색(진행색) */
  --thumb-size: 16px; /* 손잡이 크기 */
  --thumb-bg: rgb(254, 154, 68); /* 손잡이 배경 */
  --thumb-border: #ffffff; /* 손잡이 테두리 */
  --thumb-shadow: -2px 2px 2px rgba(0, 0, 0, 0.35);
  --focus-outline: #4ade80;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
}

/* 기본 리셋 */
#sndVol {
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  cursor: pointer;
}

/* ====== WebKit(Chrome/Edge/Safari/Opera) ====== */
#sndVol::-webkit-slider-runnable-track {
  height: var(--bar-thickness);
  border: 0;
  border-radius: 999px;
}
#sndVol::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: var(--thumb-size);
  height: var(--thumb-size);
  background: var(--thumb-bg);
  border: 3px solid var(--thumb-border);
  border-radius: 50%;
  box-shadow: var(--thumb-shadow);
  /* 트랙 중앙 정렬을 위한 마진 보정 */
  margin-top: calc((var(--bar-thickness) - var(--thumb-size)) / 2);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
#sndVol:hover::-webkit-slider-thumb {
  transform: scale(1.05);
}
#sndVol:active::-webkit-slider-thumb {
  transform: scale(1.12);
}
#sndVol:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
/* hover(또는 focus) 시 노출 */
#bottomSnd:hover .sndvol-hover {
  pointer-events: auto;
  width: 8rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.3);
  margin-left: 0.5rem;
  opacity: 1;
  visibility: visible;
}
/* 모바일/터치(hover 없음 or 조잡 포인터): 슬라이더 완전 숨김 */
@media (hover: none), (pointer: coarse) {
  .sndvol-hover {
    display: none !important;
  }
}

.show_menu {
  cursor: pointer;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 150%);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease-in-out;
}
.show_menu.open {
  opacity: 0.7;
  transform: translate(-50%, 90%);
  visibility: visible;
}
.show_menu.open:hover {
  opacity: 1;
  transform: translate(-50%, 90%) scale(1.05);
}
.show_menu span {
  font-size: 4rem;
  color: #fff;
}

/* Guide box styles */
.guide-box {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease-in-out;
  z-index: 999;
}
.guide-box.close {
  opacity: 0;
  visibility: hidden;
}
.guide-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  width: 90%;
  height: 90%;
}
.guide-header {
  font-size: 4rem;
  font-weight: 600;
  color: #fff;
  text-align: center;
}
.guide-header span {
  font-weight: 400;
  color: #e99f00;
}
.guide-content-box {
  position: relative;
  width: 90%;
}
.guide-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.guide-content div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  font-size: clamp(1.2rem, 1cqw, 2rem);
  font-weight: 200;
  color: #fff;
  text-align: center;
  line-height: 1.3;
  white-space: nowrap;
}
.guide-content span {
  font-size: clamp(10rem, 7cqw, 13rem);
  color: #fff;
  font-variation-settings: "FILL" 0, "wght" 250;
}
.guide-content.mobile {
  display: none;
  flex-direction: column;
  gap: 8vh;
}
.guide-content.mobile div {
  gap: 0.5rem;
}
.guide-content.mobile span {
  font-size: 11rem;
}
.guide-btn {
  cursor: pointer;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  border-radius: 500px;
  background-color: rgba(114, 114, 114, 0.3);
  padding: 1.5rem 2rem;
  transition: all 0.5s ease-in-out;
}
.guide-btn:hover {
  background-color: rgba(119, 224, 20, 0.7);
}
.guide-btn span {
  padding: 0.5rem;
  margin-left: 1rem;
  color: #fff;
  transition: all 0.2s ease-in-out;
}
@media only screen and (orientation: portrait) {
  .guide-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 5rem;
    transform: scale(90vw);
  }
}
@media (hover: none), (pointer: coarse) {
  .guide-content {
    display: none;
  }
  .guide-content.mobile {
    display: flex;
  }
  @media only screen and (orientation: landscape) {
    .guide-content.mobile {
      flex-direction: row;
    }
  }
}

/* Artplacer button styles */
.ap_button {
  font-size: 1.2rem;
  font-weight: 300;
  text-align: center;
  color: white;
  padding: 1rem 2rem;
  background-color: rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(3px);
  border-radius: 500px;
  transition: background-color 0.2s ease-in-out;
}
.ap_button:hover {
  background-color: rgba(254, 154, 68, 0.7);
}

/* YouTube Popup styles */
#yt-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
#yt-modal,
video {
  position: relative;
  width: min(90vw, 150vh);
  aspect-ratio: 16/9;
  border-radius: 2rem;
  will-change: transform, opacity;
  backface-visibility: hidden;
  transform: translateZ(0);
}
#yt-framewrap {
  position: absolute;
  inset: 0;
}
#yt-modal iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 3rem;
}
#yt-close {
  cursor: pointer;
  position: absolute;
  top: 3%;
  right: 3%;
  opacity: 0.7;
  transition: opacity 0.2s ease-in-out;
}
#yt-close span {
  font-size: 3rem;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 200, "opsz" 200;
}
#yt-close:hover {
  opacity: 1;
}

/* ===== 터치 탭 하이라이트 제거(모바일 사파리/크롬) ===== */
:where(
    a,
    button,
    [role="button"],
    .btn-style,
    .menu-box .item,
    .flag,
    #menuToggle,
    #hall-combo button,
    .arrows,
    .guide-btn,
    .show_menu,
    #bottomBar .item,
    .ap_button
  ) {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none; /* 길게 눌러도 검은 호출박스 방지 */
  outline: none;
  touch-action: manipulation; /* 불필요한 더블탭/줌 제스처 억제 */
}

/* 터치 리플 */
.touch-ripple {
  position: fixed;
  left: 0;
  top: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: rgba(175, 243, 49, 0.65);
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  filter: drop-shadow(0 0 8px rgba(238, 118, 20, 0.6));
  animation: ripple 0.55s ease-out forwards;
}
@keyframes ripple {
  to {
    transform: translate(-50%, -50%) scale(10);
    opacity: 0;
  }
}
