* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #0d0f12;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #fff;
  overflow-x: hidden;
}

/* ================= FRONT PAGE / ALBUMS GRID ================= */
.albums-view {
  min-height: 100vh;
  padding: 48px 32px 80px;
  max-width: 1400px;
  margin: 0 auto;
}

.albums-header {
  margin-bottom: 36px;
  text-align: center;
}

.albums-header h1 {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.albums-header p {
  color: #8c9ba5;
  margin-top: 8px;
  font-size: 1rem;
}

.albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* Album Card */
.album-card {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  background-color: #1a1e24;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.album-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.6);
  border-color: rgba(255, 255, 255, 0.25);
}

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

.album-card:hover img {
  transform: scale(1.05);
}

/* Gradient Overlay with Name */
.album-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 40%, rgba(0, 0, 0, 0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  box-sizing: border-box;
}

.album-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.album-count {
  font-size: 0.85rem;
  color: #ccd6dd;
  margin-top: 4px;
}

/* "View All" special card highlighting */
.album-card.view-all {
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.album-card.view-all .album-overlay {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 30%, rgba(18, 30, 49, 0.95) 100%);
}

/* ================= CAROUSEL VIEW ================= */
.carousel-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: #000;
  z-index: 100;
}

.carousel-container.hidden {
  display: none;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
}

.slide {
  flex: 0 0 100vw;
  width: 100vw;
  height: 100vh;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Navigation Arrows Overlay */
.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.nav-arrow:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.nav-arrow svg {
  width: 32px;
  height: 32px;
  fill: #fff;
}

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

/* Back Button (Top Left) */
.back-btn {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.back-btn svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

/* "I'm Feeling Lucky" Button (Bottom Left) */
.lucky-btn {
  position: absolute;
  bottom: 24px;
  left: 24px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 10px 18px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lucky-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.lucky-btn svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

/* Indicators */
/* Indicator Dots */
.dots-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.2s ease;
}

.dot.active {
  background: #ffffff;
  transform: scale(1.3);
}

/* Top Right Controls Group */
.top-right-controls {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
}

.counter {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  user-select: none;
}

/* Question Mark Button */
.help-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.help-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.08);
}

/* Help Modal Overlay */
.help-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.18s ease;
}

.help-overlay.hidden {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.help-modal {
  position: relative;
  background: #181b20;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 28px 32px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7);
  color: #fff;
}

.help-modal h2 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  font-weight: 600;
}

.help-close-btn {
  position: absolute;
  top: 16px;
  right: 18px;
  background: transparent;
  border: none;
  color: #8c9ba5;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease;
}

.help-close-btn:hover {
  color: #fff;
}

.help-section {
  margin-bottom: 20px;
}

.help-section:last-child {
  margin-bottom: 0;
}

.help-section h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8c9ba5;
  margin-bottom: 10px;
}

.help-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.help-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.92rem;
  color: #d1d9e0;
}

.help-list .keys {
  display: flex;
  gap: 4px;
}

.help-list kbd {
  background: #272c35;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.82rem;
  font-family: inherit;
  color: #fff;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
}
/* When in "Full Photo" (contain) mode */
.carousel-container.contain-mode .slide img {
  object-fit: contain;
}

/* "Fill / Full Photo" Button (Bottom Right) */
.fit-toggle-btn {
  position: absolute;
  bottom: 24px;
  right: 24px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 10px 18px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.fit-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.fit-toggle-btn:active {
  transform: translateY(0) scale(0.96);
}

.fit-toggle-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Center Bottom Controls Container */
.bottom-center-controls {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 10;
}

/* Slideshow Play/Pause Toggle Button */
.autoplay-btn {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.autoplay-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

.autoplay-btn.playing {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.autoplay-btn svg {
  width: 18px;
  height: 18px;
  fill: #fff;
  transition: transform 0.15s ease;
}