:root {
  color-scheme: dark;
  font-family: 'Inter', system-ui, sans-serif;
  background: #080812;
  color: #eef2ff;
  accent-color: #8dd7ff;
}

* {
  box-sizing: border-box;
}

html, body {
  min-height: 100%;
  margin: 0;
}

body {
  background: radial-gradient(circle at top, rgba(123, 97, 255, 0.22), transparent 35%),
              radial-gradient(circle at 20% 20%, rgba(0, 214, 255, 0.12), transparent 28%),
              linear-gradient(180deg, #05050d 0%, #0f1221 100%);
  color: #f8fafc;
}

.page-shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 24px 36px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  background: rgba(15, 18, 33, 0.76);
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.22);
}

.brand {
  display: flex;
  gap: 18px;
  align-items: center;
}

.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  font-size: 30px;
  border-radius: 18px;
  background: linear-gradient(145deg, #6d53ff, #3fa7ff);
  box-shadow: 0 20px 45px rgba(56, 94, 235, 0.24);
}

.brand h1 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 2.2vw, 2.6rem);
}

.gallery-shell {
  margin-top: 28px;
  min-height: 72vh;
}

.gallery-view {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: stretch;
  opacity: 1;
  transition: opacity 320ms ease;
}

.gallery-view.loading {
  min-height: 36vh;
  place-items: center;
}

.loader {
  text-align: center;
  padding: 48px 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.loader strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.art-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  min-height: 240px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.art-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 70px rgba(0,0,0,0.18);
}

.art-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 10, 32, 0.08), rgba(8, 9, 18, 0.3));
}

.art-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 480ms ease;
}

.art-card:hover img {
  transform: scale(1.03);
}

.art-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 18px 18px;
  color: #f8fbff;
  font-size: 0.95rem;
  line-height: 1.4;
  z-index: 1;
  text-shadow: 0 8px 20px rgba(0,0,0,0.28);
}

.full-view {
  position: relative;
  opacity: 0;
  transition: opacity 320ms ease;
}

.full-view.visible {
  opacity: 1;
}

.full-view.hidden {
  display: none;
}

.back-button {
  border: 0;
  outline: none;
  border-radius: 999px;
  padding: 12px 18px;
  background: rgba(255,255,255,0.08);
  color: #f8fbff;
  font-size: 0.95rem;
  cursor: pointer;
  margin-bottom: 18px;
  transition: background 200ms ease, transform 200ms ease;
}

.back-button:hover {
  background: rgba(255,255,255,0.14);
  transform: translateY(-1px);
}

.full-frame {
  display: grid;
  gap: 16px;
}

.full-image {
  width: 100%;
  max-height: calc(100vh - 210px);
  object-fit: contain;
  border-radius: 28px;
  box-shadow: 0 34px 110px rgba(0,0,0,0.28);
  background: #05050d;
}

.full-caption {
  margin: 0;
  color: #d4deff;
  font-size: 1rem;
  padding: 0 10px;
}

.page-footer {
  margin-top: 34px;
  padding: 24px 22px;
  border-radius: 24px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #a7b1d9;
  font-size: 0.95rem;
}

@media (max-width: 760px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .gallery-view {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .art-card {
    min-height: 200px;
  }
}
