:root {
  --bg: #061927;
  --bg-2: #092c43;
  --ink: #f6fbff;
  --muted: rgba(221, 237, 250, 0.72);
  --line: rgba(199, 223, 241, 0.22);
  --accent: #f5a51d;
  --blue: #3b82f6;
  --cyan: #6bd5ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
}

button {
  font: inherit;
}

.deck-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 620px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(59, 130, 246, 0.38), transparent 28%),
    radial-gradient(circle at 84% 22%, rgba(245, 165, 29, 0.23), transparent 24%),
    linear-gradient(135deg, #04131e 0%, #08263a 45%, #061927 100%);
}

.ambient {
  position: absolute;
  width: 38vmax;
  height: 38vmax;
  border-radius: 50%;
  filter: blur(54px);
  opacity: 0.28;
  pointer-events: none;
  animation: floatGlow 12s ease-in-out infinite alternate;
}

.ambient-a {
  left: -12vmax;
  top: 8vmax;
  background: #2f8cff;
}

.ambient-b {
  right: -14vmax;
  bottom: -10vmax;
  background: #f0a31d;
  animation-delay: -4s;
}

.scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image: linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 100% 9px;
  mask-image: linear-gradient(transparent, black 12%, black 86%, transparent);
}

.topbar,
.controlbar {
  position: absolute;
  left: 32px;
  right: 32px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.topbar {
  top: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: rgba(246, 251, 255, 0.86);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 22px rgba(245, 165, 29, 0.85);
}

.ghost-button {
  height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(14px);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.ghost-button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.34);
}

.stage {
  position: absolute;
  inset: 70px 104px 78px;
  z-index: 10;
  display: grid;
  place-items: center;
  perspective: 1600px;
}

.slide-card {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, calc((100vh - 164px) * 16 / 9));
  max-height: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  box-shadow:
    0 34px 100px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: translateZ(0);
}

.slide-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.18) 45%, transparent 54%) -150% 0 / 70% 100% no-repeat,
    linear-gradient(rgba(255, 255, 255, 0.14), transparent 18%);
  opacity: 0.8;
}

.slide-card.is-loading::after {
  content: "Loading videos...";
  position: absolute;
  color: var(--muted);
  font-size: 18px;
}

.slide-card.enter-next,
.slide-card.enter-prev {
  animation-duration: 620ms;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  animation-fill-mode: both;
}

.slide-card.enter-next {
  animation-name: slideInNext;
}

.slide-card.enter-prev {
  animation-name: slideInPrev;
}

.slide-card.flash::before {
  animation: sheen 720ms ease;
}

.slide-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  user-select: none;
  background: #050b14;
  transform: translateZ(0);
  transition: opacity 240ms ease;
  will-change: opacity, transform;
}

.slide-video.is-active {
  z-index: 1;
  opacity: 1;
}

.slide-video.enter-next {
  animation: imageInNext 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.slide-video.enter-prev {
  animation: imageInPrev 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.example-overlay {
  position: absolute;
  inset: 0;
  display: none;
  pointer-events: none;
}

.example-card-overlay {
  z-index: 12;
}

#exampleOverlay {
  z-index: 32;
}

.example-overlay.is-visible {
  display: block;
}

.example-action {
  position: absolute;
  min-width: 128px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(125, 172, 232, 0.46);
  border-radius: 999px;
  color: #dcecff;
  font: 750 14px/1 "Pretendard", "Noto Sans KR", system-ui, sans-serif;
  letter-spacing: 0;
  background:
    linear-gradient(135deg, rgba(38, 76, 130, 0.78), rgba(29, 55, 88, 0.76)),
    rgba(9, 20, 34, 0.78);
  box-shadow:
    0 10px 24px rgba(8, 16, 28, 0.3),
    0 0 0 4px rgba(92, 146, 211, 0.08);
  cursor: pointer;
  pointer-events: auto;
  opacity: 0;
  transform: translate(-50%, calc(-50% + 10px)) scale(0.98);
  animation: exampleButtonIn 620ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.example-action:hover {
  filter: brightness(1.08);
  transform: translate(-50%, -50%) scale(1.04);
  box-shadow:
    0 14px 32px rgba(8, 16, 28, 0.38),
    0 0 0 5px rgba(92, 146, 211, 0.12);
}

.example-button-page-09 {
  position: absolute;
  left: 50%;
  top: auto;
  bottom: 58px;
  min-width: 188px;
  height: 48px;
  padding: 0 24px;
  font-size: 16px;
  z-index: 35;
  transform: translateX(-50%);
  animation-name: exampleBottomButtonIn;
}

.case-button {
  top: 43%;
  min-width: 112px;
  height: 34px;
  font-size: 13px;
  transform: translate(-50%, calc(-50% + 10px)) scale(0.98);
  animation-name: exampleButtonIn;
}

.case-button-01 {
  left: 16.2%;
}

.case-button-02 {
  left: 33.3%;
}

.case-button-03 {
  left: 50.4%;
  display: none;
}

.case-button-04 {
  left: 67.6%;
}

.case-button-05 {
  left: 84.7%;
}

.example-button-page-11 {
  position: absolute;
  left: 50%;
  top: auto;
  bottom: 58px;
  min-width: 218px;
  height: 48px;
  padding: 0 24px;
  font-size: 16px;
  z-index: 35;
  transform: translateX(-50%);
  animation-name: exampleBottomButtonIn;
}

.example-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 32px;
  background: rgba(2, 8, 17, 0.76);
  backdrop-filter: blur(10px);
}

.example-modal.is-visible {
  display: grid;
}

.example-dialog {
  width: min(1180px, 92vw);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  overflow: hidden;
  background: #07111f;
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.58);
}

.example-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  padding: 0 14px 0 22px;
  color: #f4f8ff;
  background: rgba(12, 25, 43, 0.96);
}

.example-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(190, 211, 238, 0.22);
  border-radius: 10px;
  color: #d8e6f7;
  font: 600 24px/1 Arial, sans-serif;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.example-close:hover {
  color: #ffffff;
  border-color: rgba(218, 235, 255, 0.38);
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.example-close:focus-visible {
  outline: 2px solid rgba(112, 181, 255, 0.82);
  outline-offset: 2px;
}

.example-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020812;
}

.nav-button {
  position: absolute;
  top: 50%;
  z-index: 30;
  display: grid;
  place-items: center;
  width: 62px;
  height: 92px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
  cursor: pointer;
  transform: translateY(-50%);
  transition: transform 180ms ease, background 180ms ease, opacity 180ms ease;
}

.nav-button span {
  display: block;
  margin-top: -4px;
  font-size: 72px;
  line-height: 1;
}

.nav-button:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-50%) scale(1.05);
}

.nav-button:disabled {
  cursor: default;
  opacity: 0.3;
}

.nav-prev {
  left: 28px;
}

.nav-next {
  right: 28px;
}

.controlbar {
  bottom: 24px;
}

.counter {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 86px;
  color: var(--muted);
  font-size: 15px;
}

.counter strong {
  color: var(--ink);
  font-size: 27px;
}

.progress-track {
  position: relative;
  flex: 1;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  outline: none;
}

.progress-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-50%);
}

.progress-track:focus-visible::before {
  box-shadow: 0 0 0 3px rgba(107, 213, 255, 0.28);
}

.progress-fill {
  position: absolute;
  left: 0;
  top: 50%;
  height: 6px;
  width: 10%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  box-shadow: 0 0 26px rgba(107, 213, 255, 0.55);
  transform: translateY(-50%);
  transition: width 360ms ease;
  pointer-events: none;
}

.hint {
  min-width: 94px;
  color: rgba(246, 251, 255, 0.62);
  font-size: 14px;
  text-align: right;
}

@keyframes floatGlow {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(8vw, -4vh, 0) scale(1.12);
  }
}

@keyframes slideInNext {
  from {
    opacity: 0;
    transform: translateX(9vw) rotateY(-10deg) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(0) rotateY(0) scale(1);
  }
}

@keyframes slideInPrev {
  from {
    opacity: 0;
    transform: translateX(-9vw) rotateY(10deg) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(0) rotateY(0) scale(1);
  }
}

@keyframes sheen {
  from {
    background-position: -150% 0, 0 0;
  }
  to {
    background-position: 220% 0, 0 0;
  }
}

@keyframes exampleButtonIn {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 12px)) scale(0.96);
    filter: blur(2px);
  }
  70% {
    opacity: 1;
    filter: blur(0);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    filter: blur(0);
  }
}

@keyframes exampleBottomButtonIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(12px) scale(0.96);
    filter: blur(2px);
  }
  70% {
    opacity: 1;
    filter: blur(0);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes imageInNext {
  from {
    opacity: 0.24;
    transform: translateX(4.5vw) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes imageInPrev {
  from {
    opacity: 0.24;
    transform: translateX(-4.5vw) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@media (max-width: 900px) {
  .stage {
    inset: 76px 18px 86px;
  }

  .topbar,
  .controlbar {
    left: 18px;
    right: 18px;
  }

  .brand {
    font-size: 12px;
  }

  .ghost-button {
    height: 34px;
    padding: 0 12px;
    font-size: 13px;
  }

  .nav-button {
    top: auto;
    bottom: 22px;
    width: 48px;
    height: 48px;
    transform: none;
  }

  .nav-button:hover {
    transform: scale(1.05);
  }

  .nav-button span {
    font-size: 48px;
  }

  .nav-prev {
    left: auto;
    right: 86px;
  }

  .nav-next {
    right: 24px;
  }

  .hint {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}
