/* ==========================================================
   Portfolio Image Slider Stylesheet
   Pure CSS - Dark Minimal Modern Theme
   ========================================================== */

:root {
  --bg-primary: #0a0c10;
  --bg-secondary: #131620;
  --bg-card: rgba(22, 27, 39, 0.7);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.2);
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  --accent-color: #6366f1;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --accent-glow: rgba(99, 102, 241, 0.25);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(168, 85, 247, 0.06) 0%, transparent 40%);
}

/* ----------------------------------------------------------
   사이트 헤더
   ---------------------------------------------------------- */
.site-header {
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(10, 12, 16, 0.85);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 1.1rem;
}

.logo-mark {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.25rem;
}

.logo-text {
  color: var(--text-primary);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

.status-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
}

/* ----------------------------------------------------------
   메인 갤러리 컨테이너
   ---------------------------------------------------------- */
.gallery-wrapper {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 1;
}

/* ----------------------------------------------------------
   상단 인포바 (카운터, 타이틀, 재생버튼)
   ---------------------------------------------------------- */
.slider-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.counter-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  font-family: monospace;
  font-size: 1.15rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-md);
  color: #fff;
}

#currentSlideIndex {
  color: #818cf8;
  font-size: 1.3rem;
}

.counter-badge .divider {
  color: var(--text-muted);
}

#totalSlideCount {
  color: var(--text-secondary);
}

.meta-details {
  flex: 1;
  min-width: 200px;
}

.project-tag {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: #c084fc;
  background: rgba(192, 132, 252, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.3rem;
}

.project-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  transition: opacity var(--transition-fast);
}

.slider-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.action-btn .icon {
  width: 15px;
  height: 15px;
}

/* ----------------------------------------------------------
   슬라이더 메인 뷰포트
   ---------------------------------------------------------- */
.slider-viewport-container {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
  user-select: none;
}

.slider-viewport {
  width: 100%;
  height: 620px;
  overflow: hidden;
  position: relative;
  cursor: grab;
}

.slider-viewport.is-dragging {
  cursor: grabbing;
}

.slider-track {
  display: flex;
  height: 100%;
  width: 100%;
  will-change: transform;
  transition: transform var(--transition-smooth);
}

.slider-track.no-transition {
  transition: none !important;
}

/* 개별 슬라이드 */
.slide-item {
  min-width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 1.5rem;
}

/* 이미지 배경 블러 효과 (화면을 가득 채우는 은은한 배경) */
.slide-bg-blur {
  position: absolute;
  top: -20%;
  left: -20%;
  width: 140%;
  height: 140%;
  background-size: cover;
  background-position: center;
  filter: blur(40px) brightness(0.25) saturate(1.4);
  z-index: 1;
  pointer-events: none;
  opacity: 0.8;
  transform: scale(1.1);
}

/* 실제 표시되는 이미지 컨테이너 */
.slide-img-box {
  position: relative;
  z-index: 2;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}

.slide-img-box img {
  max-width: 100%;
  max-height: 560px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.slide-img-box:hover img {
  transform: scale(1.015);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
}

.slide-zoom-hint {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  color: #fff;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  opacity: 0;
  transition: opacity var(--transition-fast);
  pointer-events: none;
}

.slide-img-box:hover .slide-zoom-hint {
  opacity: 1;
}

/* ----------------------------------------------------------
   슬라이더 네비게이션 좌/우 버튼
   ---------------------------------------------------------- */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(18, 22, 33, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

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

.prev-btn {
  left: 20px;
}

.next-btn {
  right: 20px;
}

.nav-btn:hover {
  background: rgba(99, 102, 241, 0.85);
  border-color: #818cf8;
  box-shadow: 0 6px 20px var(--accent-glow);
  transform: translateY(-50%) scale(1.08);
}

.nav-btn:active {
  transform: translateY(-50%) scale(0.96);
}

/* 진행률 바 (자동재생 시 게이지) */
.progress-bar-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  z-index: 15;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  transition: width 0.1s linear;
}

/* ----------------------------------------------------------
   하단 설명 및 도트 인디케이터
   ---------------------------------------------------------- */
.slider-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.5rem 0.25rem;
  flex-wrap: wrap;
}

.project-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 680px;
  transition: opacity var(--transition-fast);
}

/* 인디케이터 도트 */
.dots-container {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
}

.dot:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: scale(1.2);
}

.dot.active {
  width: 28px;
  background: var(--accent-gradient);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* ----------------------------------------------------------
   썸네일 스트립 네비게이션
   ---------------------------------------------------------- */
.thumbnail-strip-section {
  width: 100%;
  margin-top: 0.5rem;
}

.thumbnail-strip {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  padding: 0.5rem 0.25rem 1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.thumbnail-strip::-webkit-scrollbar {
  height: 5px;
}

.thumbnail-strip::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
}

.thumbnail-strip::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}

.thumb-item {
  flex: 0 0 110px;
  height: 75px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  background: var(--bg-card);
  transition: all var(--transition-fast);
  opacity: 0.5;
}

.thumb-item:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

.thumb-item.active {
  opacity: 1;
  border-color: #818cf8;
  box-shadow: 0 0 12px var(--accent-glow);
  transform: translateY(-2px);
}

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

/* ----------------------------------------------------------
   키보드 단축키 팁
   ---------------------------------------------------------- */
.keyboard-tips {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 1rem 0;
  border-top: 1px dashed var(--border-color);
  flex-wrap: wrap;
}

.keyboard-tips kbd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
  font-family: inherit;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ----------------------------------------------------------
   라이트박스 모달
   ---------------------------------------------------------- */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-fast), visibility var(--transition-fast);
  padding: 2rem;
}

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

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 10, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lightbox-content {
  position: relative;
  z-index: 2;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
}

.lightbox-caption {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: -45px;
  right: -5px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: rotate(90deg);
}

/* ----------------------------------------------------------
   반응형 미디어 쿼리
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .site-header {
    padding: 1rem 1.25rem;
  }

  .gallery-wrapper {
    padding: 1.25rem 1rem 2rem;
    gap: 1.25rem;
  }

  .slider-viewport {
    height: 440px;
  }

  .slide-item {
    padding: 0.75rem;
  }

  .slide-img-box img {
    max-height: 400px;
  }

  .nav-btn {
    width: 42px;
    height: 42px;
  }

  .prev-btn {
    left: 10px;
  }

  .next-btn {
    right: 10px;
  }

  .project-title {
    font-size: 1.3rem;
  }

  .thumb-item {
    flex: 0 0 85px;
    height: 58px;
  }

  .keyboard-tips {
    display: none;
  }
}

@media (max-width: 480px) {
  .slider-viewport {
    height: 360px;
  }

  .slide-img-box img {
    max-height: 330px;
  }

  .nav-btn {
    width: 36px;
    height: 36px;
  }
  
  .nav-btn svg {
    width: 18px;
    height: 18px;
  }
}
