/* View Toggle Bar */
.view-toggle-bar {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 0 4px;
}

.view-toggle-btn {
  flex: 1;
  max-width: 140px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: 8px;
  font-family: 'Raleway', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-toggle-btn svg {
  opacity: 0.6;
}

.view-toggle-btn.active {
  background: rgba(78, 205, 196, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

.view-toggle-btn.active svg {
  opacity: 1;
  stroke: var(--accent);
}

/* Gallery Mode Container */
.gallery-container {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  height: 70vh;
  margin-top: 20px;
  margin-bottom: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  align-items: center;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  perspective: 1200px;
}

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

.gallery-scroll-wrapper {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
  padding: 0;
  transform-style: preserve-3d;
}

.gallery-spacer {
  flex: 0 0 calc(50vw - 160px); /* 160px is half of max-width 320px */
}

.gallery-card {
  position: relative;
  flex: 0 0 80vw;
  width: 80vw;
  height: 85%;
  max-width: 320px;
  max-height: 500px;
  background: #242424;
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  transition: transform 0.4s ease, opacity 0.4s ease, filter 0.4s ease;
  user-select: none;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  backface-visibility: hidden;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  transform-style: preserve-3d;
  
  /* Initial state for cards not in focus */
  transform: scale(0.85) translateZ(-200px);
  opacity: 0.4;
  filter: blur(2px);
}

.gallery-card.active {
  transform: scale(1) translateZ(0);
  opacity: 1;
  filter: blur(0);
  z-index: 10;
}

/* Remove the old prev/curr/next fixed classes since we are scrolling now */
.card-prev, .card-curr, .card-next { transform: none; opacity: inherit; filter: inherit; }


/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .gallery-card {
    transition: none !important;
  }
}
