.gallery {
  padding: 120px 0;
  background: #000;
  color: #fff;
}

.gallery-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.gallery-title {
  font-family: 'Inter', sans-serif;
  font-size: 48px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: left;
  margin-bottom: 32px;
  color: #fff;
}

.gallery-carousel {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding-bottom: 80px;
}

.gallery-list {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0;
  margin: 0;
  list-style: none;
  -webkit-overflow-scrolling: touch;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  -webkit-accelerator: hardware;
}

.gallery-list::-webkit-scrollbar {
  display: none;
}

.gallery-item {
  flex: 0 0 auto;
  width: 90%;
  border-radius: 12px;
  overflow: hidden;
  background: #1a1a1a;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  -webkit-accelerator: hardware;
  -webkit-will-change: auto;
  will-change: auto;
  -webkit-transform-origin: center center;
  transform-origin: center center;
}

.gallery-image {
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: center;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-image-rendering: -webkit-optimize-contrast;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  -webkit-transform-origin: center center;
  transform-origin: center center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-accelerator: hardware;
  -webkit-mask-image: none;
  mask-image: none;
}

.gallery-carousel-container {
  position: absolute;
  top: 40%;
  left: 0;
  right: 0;
  transform: translateY(-40%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 10;
}

.gallery-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 10;
}

.gallery-carousel-btn {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  pointer-events: auto;
  margin: 0 20px;
}

.gallery-carousel-btn:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.1);
}

.gallery-carousel-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.gallery-carousel-btn img {
  width: 24px;
  height: 24px;
}

.gallery-pagination {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  pointer-events: auto;
  z-index: 10;
  background-color: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
  border-radius: 50px;
  padding: 8px 16px;
}

.gallery-pagination-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}

.gallery-pagination-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.gallery-pagination-dot.active {
  background: #fff;
  transform: scale(1.2);
}

/* 갤러리 재생/일시정지 버튼 스타일 */
.gallery-carousel .carousel-play-pause-btn {
  bottom: 40px;
  left: 20px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 0.3s ease;
  z-index: 10;
  pointer-events: auto;
}

.gallery-carousel .carousel-play-pause-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.gallery-carousel .carousel-play-pause-btn:focus {
  outline: 2px solid white;
  outline-offset: 2px;
}

.gallery-carousel .carousel-play-pause-btn .play-icon,
.gallery-carousel .carousel-play-pause-btn .pause-icon {
  width: 16px;
  height: 16px;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
  .gallery {
    padding: 60px 0;
  }

  .gallery-title {
    font-size: 32px;
    margin-bottom: 40px;
  }

  .gallery-container {
    padding: 0 16px;
  }

  .gallery-item {
    width: 80%;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-accelerator: hardware;
    -webkit-will-change: auto;
    will-change: auto;
  }

  .gallery-controls {
    margin: 0 10px;
  }

  .gallery-carousel-btn {
    width: 40px;
    height: 40px;
    margin: 0 10px;
  }

  .gallery-carousel-btn img {
    width: 20px;
    height: 20px;
  }

  .gallery-pagination {
    bottom: 15px;
  }

  .gallery-carousel .carousel-play-pause-btn {
    width: 28px;
    height: 28px;
    left: 0;
    bottom: 30px;
    z-index: 100;
  }

  .gallery-carousel .carousel-play-pause-btn .play-icon,
  .gallery-carousel .carousel-play-pause-btn .pause-icon {
    width: 14px;
    height: 14px;
  }
}
