:root {
  --bg: #050506;
  --bg-soft: #0e0f12;
  --panel: #15171b;
  --panel-top: #20242b;
  --text: #f5f8ff;
  --muted: #aebdd1;
  --line: rgba(170, 202, 255, 0.22);
  --line-soft: rgba(170, 202, 255, 0.12);
  --accent: #b9c0ca;
  --accent-cool: #f2f4f8;
  --shadow-card: 0 28px 60px rgba(0, 0, 0, 0.42);
  --font-base: 'Manrope', sans-serif;
  --font-display: 'Sora', sans-serif;
  --font-note: 'Manrope', sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-base);
  background: var(--bg);
  color: var(--text);
  position: relative;
  overflow-x: hidden;
  letter-spacing: -0.01em;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(1200px 620px at 15% 120%, rgba(156, 163, 175, 0.14), transparent 62%),
    radial-gradient(980px 560px at 90% -10%, rgba(203, 213, 225, 0.1), transparent 64%),
    linear-gradient(180deg, #040405 0%, #090a0c 45%, #050506 100%);
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(980px 480px at 50% -140px, rgba(148, 163, 184, 0.12), transparent 58%),
    radial-gradient(760px 420px at 82% 18%, rgba(100, 116, 139, 0.11), transparent 60%),
    radial-gradient(680px 440px at 10% 72%, rgba(71, 85, 105, 0.1), transparent 60%);
}

.page-bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  filter: blur(0.3px) contrast(1.08);
}

.page-bg::before {
  content: '';
  position: absolute;
  width: 56vw;
  height: 56vw;
  left: -6vw;
  top: -18vw;
  background: radial-gradient(circle at 36% 34%, rgba(203, 213, 225, 0.22), rgba(148, 163, 184, 0.08) 46%, transparent 68%);
  filter: blur(24px);
  opacity: 0.62;
  animation: floatAura 14s ease-in-out infinite alternate;
}

.page-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(203, 213, 225, 0.08) 1px, transparent 1px),
    linear-gradient(130deg, rgba(100, 116, 139, 0.18), transparent 45%, rgba(148, 163, 184, 0.12));
  background-size: 3px 3px, 230% 230%;
  opacity: 0.24;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 78%);
  animation: grainShift 16s linear infinite, sheenDrift 22s ease-in-out infinite alternate;
}

.topbar,
main {
  width: min(1380px, 94vw);
  margin-inline: auto;
}

.topbar {
  margin-top: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.brand-wrap {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(121, 227, 199, 0.1), rgba(120, 180, 255, 0.1) 42%, rgba(255, 255, 255, 0.03));
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 26px rgba(0, 0, 0, 0.3);
}

.brand-orb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffffff, #8fd5ff 48%, #5ba3ff 75%);
  box-shadow: 0 0 18px rgba(134, 219, 255, 0.9), 0 0 30px rgba(91, 163, 255, 0.45);
  animation: orbPulse 3s ease-in-out infinite, orbFloat 5.5s ease-in-out infinite;
}

.brand {
  font-family: var(--font-base);
  font-size: clamp(1.05rem, 1.25vw, 1.3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

main {
  padding-top: 18px;
  padding-bottom: 52px;
}

.hero {
  padding: 58px 0 82px;
  text-align: center;
}

.hero h1 {
  margin: 0;
  max-width: 760px;
  margin-inline: auto;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.2rem, 4.8vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #ffffff 0%, var(--accent) 42%, var(--accent-cool) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 34px rgba(121, 227, 199, 0.28);
}

.hero-note {
  margin: 16px auto 0;
  max-width: 560px;
  font-family: var(--font-note);
  font-size: clamp(0.98rem, 1.45vw, 1.18rem);
  font-weight: 600;
  line-height: 1.6;
  color: #ccdaec;
  letter-spacing: 0;
  text-align: center;
}

.gallery {
  --grid-row: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: var(--grid-row);
  grid-auto-flow: row dense;
  gap: 16px;
  align-items: start;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  grid-row: span var(--row-span, 1);
  align-self: start;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(34, 28, 30, 0.98) 0%, rgba(18, 18, 22, 0.98) 100%);
  box-shadow: var(--shadow-card);
  transition: transform 0.32s ease, border-color 0.32s ease, box-shadow 0.32s ease, filter 0.32s ease;
}

.card-tall {
  width: 100%;
  justify-self: stretch;
}

.card-tall .thumb {
  aspect-ratio: 9 / 16;
  object-fit: contain;
  background: transparent;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(185, 218, 255, 0.3), rgba(255, 255, 255, 0.02));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(203, 213, 225, 0.34);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.54), 0 0 0 1px rgba(148, 163, 184, 0.24), 0 0 34px rgba(148, 163, 184, 0.18);
  filter: saturate(1.05);
}

@keyframes floatAura {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(8vw, 5vh, 0) scale(1.08);
  }
}

@keyframes grainShift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-12px, 10px, 0);
  }
}

@keyframes sheenDrift {
  0% {
    background-position: 0 0, 0% 50%;
  }
  100% {
    background-position: -12px 10px, 100% 50%;
  }
}

@keyframes orbPulse {
  0%,
  100% {
    transform: scale(1);
    filter: saturate(1);
  }
  50% {
    transform: scale(1.2);
    filter: saturate(1.25);
  }
}

@keyframes orbFloat {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 1px -2px;
  }
}

.thumb {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
  background: transparent;
}

.card:not(.card-tall) .thumb {
  aspect-ratio: 16 / 9;
}

.thumb-empty {
  background: #050505;
}

.meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 0 0 66px;
  height: 66px;
  min-height: 66px;
  max-height: 66px;
  padding: 10px 13px;
  background: linear-gradient(180deg, rgba(155, 203, 255, 0.16), rgba(135, 190, 255, 0.05));
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(171, 210, 255, 0.24);
  position: relative;
  z-index: 2;
}

.meta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(121, 227, 199, 0.2), rgba(156, 185, 255, 0.08));
  backdrop-filter: blur(8px);
  pointer-events: none;
  z-index: -1;
}

.title {
  font-family: var(--font-base);
  margin: 0;
  font-size: clamp(1.02rem, 1.1vw, 1.2rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.title-ref {
  font-size: 0.84em;
  font-weight: 700;
  opacity: 0.88;
}

.title-name {
  font-size: 1.06em;
  font-weight: 800;
}

.actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.action-btn {
  font-family: var(--font-base);
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(188, 226, 255, 0.52);
  background: linear-gradient(180deg, rgba(181, 232, 255, 0.34), rgba(95, 170, 255, 0.16));
  color: #f8fbff;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 10px 24px rgba(40, 102, 173, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.action-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(190, 245, 223, 0.9);
  background: linear-gradient(180deg, rgba(149, 244, 216, 0.42), rgba(141, 193, 255, 0.24));
  box-shadow: 0 14px 28px rgba(55, 130, 214, 0.3), 0 0 0 1px rgba(181, 236, 255, 0.2);
}

.action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 1080px) {
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar,
  main {
    width: min(94vw, 620px);
  }

  .topbar {
    margin-top: 14px;
  }

  .brand-wrap {
    padding: 9px 12px;
  }

  .hero {
    padding: 42px 0 58px;
  }

  .gallery {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 14px;
  }

  .card,
  .card-tall {
    grid-row: span 1;
  }

  .card:not(.card-tall) .thumb {
    aspect-ratio: 16 / 9;
  }

  .card-tall .thumb {
    aspect-ratio: 9 / 16;
  }
}
