/* ==========================================================================
   Cozy Pastel Retro Design System (Inspired by Reference)
   ========================================================================== */
:root {
  --bg-outer: #f6d2dc;
  --bg-card: #fcf7ec;
  --bg-card-inner: #fbf5e6;
  --border-dark: #5a4e42;
  --border-subtle: #d8cdbf;
  --text-dark: #4a3e33;
  --text-sub: #786a5b;
  --text-muted: #9c8e7e;
  
  --pink-pastel: #f4b4c4;
  --pink-soft: #fde8ee;
  --pink-accent: #f095aa;
  --pink-shadow: #e2859b;
  
  --yellow-sparkle: #fff280;
  --cream-white: #ffffff;
  
  --font-bubble: 'Rubik Bubbles', 'DynaPuff', cursive, sans-serif;
  --font-display: 'DynaPuff', cursive, sans-serif;
  --font-body: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  --font-accent: 'Outfit', sans-serif;
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --shadow-retro: 3px 4px 0 #5a4e42;
  --shadow-retro-sm: 2px 2px 0 #5a4e42;
  --shadow-retro-hover: 4px 6px 0 #5a4e42;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-outer);
  font-family: var(--font-body);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px 80px 20px;
  overflow-x: hidden;
  position: relative;
  cursor: default;
}

/* ==========================================================================
   Background Decorative Retro Stars & Orbits (from reference)
   ========================================================================== */
.bg-star-deco {
  position: fixed;
  color: rgba(255, 255, 255, 0.7);
  pointer-events: none;
  z-index: 0;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.4));
  animation: floatStar 8s ease-in-out infinite alternate;
}

.bg-star-deco svg {
  width: 100%;
  height: 100%;
}

.deco-left-top {
  top: 60px;
  left: 20px;
  width: 160px;
  height: 160px;
}

.deco-right-mid {
  top: 40%;
  right: 25px;
  width: 180px;
  height: 180px;
  animation-delay: -3s;
}

.deco-left-bottom {
  bottom: 80px;
  left: 30px;
  width: 150px;
  height: 150px;
  animation-delay: -5s;
}

@keyframes floatStar {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-12px) rotate(4deg); }
}

/* ==========================================================================
   Sparkle Particle Layer (Click Effects)
   ========================================================================== */
.sparkle-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99999;
  overflow: hidden;
}

.sparkle-particle {
  position: absolute;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: sparkleAnim 0.7s cubic-bezier(0.12, 0.8, 0.32, 1) forwards;
  will-change: transform, opacity;
}

@keyframes sparkleAnim {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) translate(0, 0) scale(0.2) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) scale(1.3) rotate(var(--rot));
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(calc(var(--tx) * 1.3), calc(var(--ty) * 1.3)) scale(0.4) rotate(calc(var(--rot) * 1.8));
  }
}

/* ==========================================================================
   Central Site Card Container
   ========================================================================== */
.site-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 980px;
  background-color: var(--bg-card);
  border: 2px solid var(--border-dark);
  border-radius: var(--radius-lg);
  box-shadow: 0 15px 35px rgba(90, 78, 66, 0.15), var(--shadow-retro);
  padding: 36px 36px 44px 36px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Top Pill Badge */
.top-badge-wrap {
  display: flex;
  justify-content: center;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 18px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-dark);
  background-color: var(--bg-card-inner);
  font-family: var(--font-accent);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dark);
}

.pill-badge .sparkle-icon {
  color: var(--pink-accent);
  font-size: 0.85rem;
}

/* ==========================================================================
   Gallery Header & Bubbly 3D Title
   ========================================================================== */
.gallery-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.bubble-title {
  font-family: var(--font-bubble);
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #ffffff;
  /* 3D Retro Drop Shadow & Outline matching reference image */
  text-shadow: 
    -2.5px -2.5px 0 var(--border-dark),
     2.5px -2.5px 0 var(--border-dark),
    -2.5px  2.5px 0 var(--border-dark),
     2.5px  2.5px 0 var(--border-dark),
     0px    5px   0 var(--border-dark),
     2px    7px   0 var(--border-dark),
    -2px    7px   0 var(--border-dark),
     4px    9px   0 rgba(90, 78, 66, 0.4);
  line-height: 1;
  user-select: none;
  transition: transform 0.2s ease;
}

.bubble-title:hover {
  transform: scale(1.02);
}

.sub-caption {
  font-family: var(--font-accent);
  font-size: 0.95rem;
  color: var(--text-sub);
  letter-spacing: -0.01em;
}

/* ==========================================================================
   Central Highlight & Stack Gallery Section
   ========================================================================== */
.gallery-stage-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.stack-gallery-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  height: 440px;
  position: relative;
}

/* Side Stack Columns (Vertical Slat Preview Cards) */
.stack-column {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
}

.stack-slat-item {
  width: 66px;
  height: 420px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-dark);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background-color: #000;
  box-shadow: var(--shadow-retro-sm);
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.3, 1);
  flex-shrink: 0;
}

.stack-slat-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.85) contrast(0.95);
  transition: transform 0.35s ease, filter 0.35s ease;
  pointer-events: none;
}

.stack-slat-item:hover {
  width: 86px;
  transform: translateY(-4px);
  box-shadow: var(--shadow-retro);
  border-color: var(--pink-accent);
}

.stack-slat-item:hover img {
  filter: brightness(1) saturate(1.1);
  transform: scale(1.08);
}

.stack-slat-item .slat-tag {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(90, 78, 66, 0.85);
  color: #fff;
  font-family: var(--font-accent);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
}

/* Center Hero Card (The Selected Active Image) */
.center-hero-card {
  flex: 1;
  max-width: 540px;
  height: 440px;
  border-radius: var(--radius-lg);
  border: 2.5px solid var(--border-dark);
  background-color: var(--bg-card-inner);
  box-shadow: var(--shadow-retro);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 0.3s ease;
}

.center-hero-card:hover {
  transform: scale(1.015) translateY(-3px);
  box-shadow: 0 12px 25px rgba(90, 78, 66, 0.2), var(--shadow-retro-hover);
}

.hero-image-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #f7efe1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.center-hero-card:hover .hero-image-frame img {
  transform: scale(1.03);
}

/* Retro Circular Pink Sticker Badge ("ZOOM / CLICK" like "DRAG" in reference) */
.floating-sticker-badge {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background-color: var(--pink-pastel);
  border: 2px solid var(--border-dark);
  box-shadow: var(--shadow-retro-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-dark);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.1;
  pointer-events: none;
  transform: rotate(-10deg);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 5;
}

.floating-sticker-badge small {
  font-family: var(--font-accent);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

.center-hero-card:hover .floating-sticker-badge {
  transform: rotate(5deg) scale(1.12);
  background-color: var(--pink-accent);
  color: #fff;
}

/* Hover Overlay Text */
.hero-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(90, 78, 66, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.overlay-text {
  background: var(--bg-card);
  border: 1.5px solid var(--border-dark);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-family: var(--font-accent);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-retro-sm);
  color: var(--text-dark);
  transform: translateY(8px);
  transition: transform 0.25s ease;
}

.center-hero-card:hover .hero-hover-overlay {
  opacity: 1;
}

.center-hero-card:hover .overlay-text {
  transform: translateY(0);
}

/* ==========================================================================
   Navigation Controls (Prev / Next Buttons)
   ========================================================================== */
.gallery-nav-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
}

.nav-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--bg-card-inner);
  border: 2px solid var(--border-dark);
  color: var(--text-dark);
  font-family: var(--font-accent);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: var(--shadow-retro-sm);
  transition: all 0.2s ease;
}

.nav-pill-btn:hover {
  background-color: var(--pink-pastel);
  transform: translateY(-2px);
  box-shadow: var(--shadow-retro);
}

.nav-pill-btn:active {
  transform: translateY(1px);
  box-shadow: 1px 1px 0 var(--border-dark);
}

.nav-pill-btn svg {
  width: 16px;
  height: 16px;
}

.slide-indicator-pill {
  font-family: var(--font-accent);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-dark);
  background: var(--bg-card-inner);
  border: 1.5px solid var(--border-dark);
  padding: 6px 16px;
  border-radius: var(--radius-full);
}

.slide-indicator-pill .slash {
  margin: 0 4px;
  color: var(--text-muted);
}

/* ==========================================================================
   Artwork Info Card (Retro Scalloped Card from reference)
   ========================================================================== */
.artwork-info-section {
  width: 100%;
}

.scalloped-card {
  background-color: var(--pink-soft);
  border: 2px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 22px 28px;
  box-shadow: var(--shadow-retro-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: transform 0.25s ease;
}

.scalloped-card:hover {
  transform: translateY(-2px);
}

.scallop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.star-rating {
  color: #f59e0b;
  font-size: 0.95rem;
  letter-spacing: 2px;
}

.format-badge {
  font-family: var(--font-accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--bg-card);
  border: 1.5px solid var(--border-dark);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  color: var(--text-dark);
}

.art-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.01em;
}

.art-desc {
  font-size: 0.92rem;
  color: var(--text-sub);
  line-height: 1.5;
}

.card-footer-action {
  margin-top: 6px;
  display: flex;
  justify-content: flex-end;
}

.cute-zoom-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--pink-pastel);
  border: 2px solid var(--border-dark);
  color: var(--text-dark);
  font-family: var(--font-accent);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 9px 20px;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: var(--shadow-retro-sm);
  transition: all 0.2s ease;
}

.cute-zoom-btn:hover {
  background-color: var(--pink-accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-retro);
}

.cute-zoom-btn svg {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   Bottom Thumbnail Strip
   ========================================================================== */
.mini-thumbnails-bar {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding-top: 4px;
}

.mini-thumb {
  width: 72px;
  height: 52px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-dark);
  overflow: hidden;
  background-color: #000;
  cursor: pointer;
  box-shadow: var(--shadow-retro-sm);
  opacity: 0.6;
  transition: all 0.2s ease;
}

.mini-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mini-thumb:hover {
  opacity: 0.95;
  transform: translateY(-3px);
}

.mini-thumb.active {
  opacity: 1;
  border-color: var(--pink-accent);
  box-shadow: 0 0 0 2px var(--pink-pastel), var(--shadow-retro);
  transform: translateY(-3px) scale(1.05);
}

/* ==========================================================================
   Footer Guide
   ========================================================================== */
.site-footer {
  text-align: center;
  padding-top: 8px;
  border-top: 1.5px dashed var(--border-subtle);
}

.footer-guide {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Zoom & Pan Lightbox Modal (Cozy Pastel Theme)
   ========================================================================== */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  user-select: none;
}

.lightbox-modal.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(65, 52, 44, 0.92);
  backdrop-filter: blur(14px);
}

.lightbox-toolbar {
  position: relative;
  z-index: 10010;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  background: var(--bg-card);
  border-bottom: 2px solid var(--border-dark);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pill-badge.mini {
  padding: 3px 12px;
  font-size: 0.72rem;
  background-color: var(--pink-soft);
}

.lightbox-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-dark);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.zoom-badge {
  font-family: var(--font-accent);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
  background: var(--bg-card-inner);
  border: 1.5px solid var(--border-dark);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  min-width: 60px;
  text-align: center;
}

.tool-circle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-card-inner);
  border: 2px solid var(--border-dark);
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-retro-sm);
  transition: all 0.15s ease;
}

.tool-circle-btn:hover {
  background: var(--pink-pastel);
  transform: translateY(-2px);
}

.tool-circle-btn:active {
  transform: translateY(1px);
}

.tool-circle-btn.close {
  background: #fca5a5;
  margin-left: 8px;
}

.tool-circle-btn.close:hover {
  background: #f87171;
  color: #fff;
}

.tool-circle-btn svg {
  width: 16px;
  height: 16px;
}

/* Lightbox Stage */
.lightbox-stage {
  position: relative;
  z-index: 10005;
  flex: 1;
  width: 100%;
  height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lightbox-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
}

.lightbox-content.panning {
  cursor: grabbing !important;
}

.lightbox-content img {
  max-width: 90%;
  max-height: 85%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  border: 3px solid #ffffff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transform-origin: center center;
  will-change: transform;
  pointer-events: auto;
}

/* Lightbox Prev / Next Arrows */
.lightbox-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border-dark);
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10010;
  box-shadow: var(--shadow-retro-sm);
  transition: all 0.2s ease;
}

.lightbox-nav-arrow:hover {
  background: var(--pink-pastel);
  transform: translateY(-50%) scale(1.1);
  box-shadow: var(--shadow-retro);
}

.lightbox-nav-arrow.prev {
  left: 24px;
}

.lightbox-nav-arrow.next {
  right: 24px;
}

.lightbox-nav-arrow svg {
  width: 20px;
  height: 20px;
}

.lightbox-bottom-tip {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1.5px solid var(--border-dark);
  padding: 6px 18px;
  border-radius: var(--radius-full);
  color: var(--text-sub);
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: var(--shadow-retro-sm);
  display: flex;
  gap: 10px;
  pointer-events: none;
  z-index: 10010;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 860px) {
  .site-card {
    padding: 24px 20px;
  }
  .bubble-title {
    font-size: 3rem;
  }
  .stack-gallery-container {
    height: 380px;
  }
  .stack-slat-item {
    width: 48px;
    height: 360px;
  }
  .stack-slat-item:hover {
    width: 68px;
  }
  .center-hero-card {
    height: 380px;
  }
}

@media (max-width: 600px) {
  body {
    padding: 16px 8px;
  }
  .site-card {
    padding: 20px 14px;
    border-radius: 18px;
  }
  .bubble-title {
    font-size: 2.4rem;
  }
  .stack-gallery-container {
    height: 320px;
    gap: 8px;
  }
  .stack-slat-item {
    width: 36px;
    height: 300px;
  }
  .stack-slat-item:hover {
    width: 50px;
  }
  .center-hero-card {
    height: 320px;
  }
  .floating-sticker-badge {
    width: 54px;
    height: 54px;
    bottom: 12px;
    right: 12px;
  }
  .lightbox-title {
    font-size: 0.95rem;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .lightbox-bottom-tip {
    display: none;
  }
  .footer-guide {
    font-size: 0.75rem;
  }
}
