@font-face {
  font-family: "Hyperspace.otf";
  src: url("/Hyperspace\ Bold.otf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

body {
  font-family: Arial, sans-serif;
  height: 100vh;
  margin: 0;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.content1 {
  max-width: 100%;
  height: auto;

  display: block;
  margin: 50px auto;
}
.content2 {
  display: inline-block;
  max-height: 90vh;
  max-width: 150%;
}

/* 가로스크롤 */
.scroll-container {
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  max-width: 90vw;
}

/* 메뉴 아이콘 */
.close-icon {
  position: fixed;
  /* 위치 */
  top: 2vh;
  right: 13vw;

  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  height: 33px;
  transform: translateZ(50px); /* X아이콘도 3D 입체감 추가 */
}

.close-icon div {
  width: 30px;
  height: 5px;
  background: #685f64;
}

.close-icon div:nth-child(1) {
  transform: rotate(45deg) translate(20px);
}
.close-icon div:nth-child(2) {
  transform: rotate(-45deg) translate(20px);
}

.title {
  display: flex;
  align-items: center;
  justify-content: center;

  margin-bottom: 50px;
}
.title p {
  font-family: "Hyperspace.otf", Verdana, sans-serif;
  font-size: 5vw;
  text-shadow: 3px 3px 3px rgb(114, 114, 114);
  margin: 0;
}

.frame {
  display: flex;
  flex-direction: column;

  /* 센터정렬 */
  justify-content: center;
  align-items: center;
  width: 100%;
}

.frame.blur {
  filter: blur(7px);
  transition: filter 0.2s ease; /* 부드럽게 */
}

.apart {
  padding: 0 15%;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
  .apart { padding: 0 10px; }
  .title p { font-size: 8vw; }
  .popup-content { max-width: 100vw; }
  .close-icon { display: none; }
  .content2 { margin: 0 30px; max-height: 40vh; }
}

/* 부드러운 색상 변화를 위한 transition */
.glass1 {
  transition: fill 0.3s ease;
}
/* 마우스 커서를 변경하여 상호작용 가능함을 나타냄 (선택 사항) */
.glass1:hover {
  fill: rgb(243, 217, 23);
  cursor: pointer;
}

/* 클릭 시 반짝이는 효과 */
@keyframes glow {
  0% {
    fill: rgb(243, 217, 23);
  }
  30% {
    fill: #fff;
    filter: drop-shadow(0 0 10px rgb(243, 217, 23));
  }
  50% {
    fill: rgb(255, 255, 150);
  }
  100% {
    fill: rgb(243, 217, 23);
  }
}

.glass-clicked {
  animation: glow 0.6s ease forwards;
}

.st0 {
  fill: none;
}
.st0,
.st1 {
  stroke-linecap: round;
  stroke-linejoin: round;
}
.st0,
.st1,
.st2 {
  stroke: #685f64;
}
.st3,
.st2 {
  fill: #1e1c1d;
}
.st4,
.st1 {
  fill: #221f20;
}
.st5 {
  fill: #fff;
  stroke: #fff;
}
.st5,
.st2 {
  stroke-miterlimit: 10;
}

/* --- Video Dialog styling --- */
dialog#videoDialog {
  display: none;
  opacity: 0;
  transform: scale(0.95);
  border: none;
  background: transparent;
  padding: 0;
  margin: auto;
  max-width: 90vw;
  max-height: 85vh;
  outline: none;
  overflow: visible;
  
  transition: 
    opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    display 0.4s allow-discrete,
    overlay 0.4s allow-discrete;
}

/* Open state */
dialog#videoDialog[open] {
  display: block;
  opacity: 1;
  transform: scale(1);
}

/* Starting style for entering top-layer */
@starting-style {
  dialog#videoDialog[open] {
    opacity: 0;
    transform: scale(0.95);
  }
}

/* Animate the backdrop */
dialog#videoDialog::backdrop {
  background-color: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  transition:
    display 0.4s allow-discrete,
    overlay 0.4s allow-discrete,
    background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    backdrop-filter 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

dialog#videoDialog[open]::backdrop {
  background-color: rgba(10, 10, 10, 0.75);
  backdrop-filter: blur(10px);
}

@starting-style {
  dialog#videoDialog[open]::backdrop {
    background-color: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
  }
}

/* Video container - strictly 9:16 aspect ratio */
.video-container {
  position: relative;
  width: auto;
  height: 80vh; /* Responsive height */
  aspect-ratio: 9 / 16;
  background-color: #000;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Video element covers the 9:16 area */
#modalVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Floating close button */
.dialog-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(20, 20, 20, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  backdrop-filter: blur(4px);
  transition: all 0.25s ease;
}

.dialog-close-btn:hover {
  background: rgba(243, 217, 23, 0.9); /* Yellow color on hover matching window glow */
  color: #000;
  border-color: transparent;
  transform: scale(1.1) rotate(90deg);
}

.dialog-close-btn svg {
  display: block;
}

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
  dialog#videoDialog,
  dialog#videoDialog::backdrop {
    transition-duration: 0.1s;
    transform: none;
  }

  @starting-style {
    dialog#videoDialog[open] {
      transform: none;
    }
  }
}

/* Video error overlay fallback styling */
.video-error-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(15, 15, 15, 0.95);
  color: #eee;
  padding: 30px;
  text-align: center;
  z-index: 5;
}

.error-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  max-width: 80%;
}

.error-icon {
  color: #f3d917; /* Yellow theme color */
  animation: pulse-alert 2s infinite ease-in-out;
}

.error-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin: 0;
  color: #fff;
}

.error-msg {
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
  color: #ccc;
}

.error-msg strong {
  color: #f3d917;
  background: rgba(243, 217, 23, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

@keyframes pulse-alert {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(243, 217, 23, 0.5));
  }
}


