@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

:root {
  --bg-dark: #06080f;
  --bg-gradient: radial-gradient(circle at 50% 40%, #1a2145 0%, #06080f 100%);
  --accent: #8a6bff;
  --light: #cfcfff;
  --muted: #99a2c9;
  --glow: rgba(140,110,255,0.4);
  --transition: all 0.6s cubic-bezier(0.25,1,0.5,1);
  --radius: 16px;
}

html, body {
  margin: 0;
  height: 100%;
  overflow-x: hidden;
  background: var(--bg-gradient);
  color: var(--light);
  font-family: "Poppins", sans-serif;
}

/* Parallax Light Layers */
#parallax-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 25% 35%, rgba(140,120,255,0.1) 0%, transparent 60%),
    radial-gradient(circle at 80% 60%, rgba(100,180,255,0.08) 0%, transparent 60%);
  transform: translate3d(0,0,0);
  transition: transform 2s ease-out;
  filter: blur(50px);
}

/* Header */
.gallery-header {
  position: relative;
  text-align: center;
  z-index: 2;
  padding: 60px 20px 20px;
}

.gallery-header h1 {
  font-size: 2.6rem;
  letter-spacing: 0.02em;
  color: #e9ebff;
  text-shadow: 0 0 12px rgba(255,255,255,0.1);
}

.subtitle {
  color: var(--muted);
  font-size: 1rem;
  margin-top: 6px;
}

/* Gallery Room */
.gallery-room {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 30px;
  padding: 40px 6vw 120px;
  position: relative;
  z-index: 2;
  perspective: 1200px;
}

.art-piece {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.05);
  backdrop-filter: blur(12px);
  box-shadow: 0 5px 20px rgba(0,0,0,0.4);
  transform: translateY(30px) scale(0.98);
  opacity: 0;
  transition: var(--transition);
}

.art-piece.visible {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.art-piece img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 1.2s ease, filter 0.8s ease;
}

.art-piece:hover img {
  transform: scale(1.07);
  filter: brightness(1.1);
}

.art-info {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Navigation */
.nav-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 20px 0 60px;
  z-index: 3;
  position: relative;
}

.nav-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--light);
  font-weight: 600;
  padding: 12px 22px;
  border-radius: var(--radius);
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.nav-btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.1);
  box-shadow: 0 0 20px var(--glow);
  transform: translateY(-3px);
}

.nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Footer */
.gallery-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 40px 0 30px;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), #533bff);
  border-radius: 6px;
}

/* Responsive */
@media (max-width: 700px) {
  .gallery-header h1 { font-size: 2rem; }
  .gallery-room { grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); }
}
