/* Skip link removed */

:focus-visible {
  outline: 3px solid #0a84ff;
  outline-offset: 2px;
}

/* Theme tokens */
:root {
  --brand: #03060f;
  --ink: #ffffff;
  --muted: #888888;
  --duration: 1400ms;
  --fade: 520ms;
}

/* Base reset */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--ink);
  background: #03060f;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh; /* fill viewport on mobile too */
  overflow: auto; /* allow scroll */
}

/* Local font */
@font-face {
  font-family: 'MinusCre';
  src: url('./font/MINUS_CRE.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

img, svg { display: block; max-width: 100%; height: auto; }

/* Page layout */
.page { 
  min-height: 100dvh; 
  display: grid; 
  grid-template-rows: 1fr; 
  background: transparent !important;
}
.header { display: flex; align-items: center; justify-content: center; padding: 20px; }
.brand { font-weight: 800; letter-spacing: 0.32em; font-size: 12px; text-transform: uppercase; opacity: 0.6; }

/* Global Wallet Button Styling */
.site-wallet-button {
  position: fixed;
  top: 20px;
  right: 80px;
  z-index: 100;
}

.site-wallet-button .wallet-adapter-button {
  background: rgba(255,255,255,0.1) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2) !important;
  border-radius: 999px !important;
  font-family: 'Funnel Sans', sans-serif !important;
  font-weight: 600 !important;
  height: 40px !important;
  line-height: 40px !important;
  padding: 0 16px !important;
  font-size: 14px !important;
}

.site-wallet-button .wallet-adapter-button:hover {
  background: rgba(255,255,255,0.2) !important;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  background: transparent;
}
.title { font-size: clamp(28px, 6vw, 56px); margin: 0 0 8px; letter-spacing: -0.01em; }
.subtitle { margin: 0 0 10px; font-size: clamp(16px, 2.2vw, 20px); opacity: 0.8; }
.note { margin: 0; color: var(--muted); font-size: 15px; }

/* Hero with background image (replaces GlassHero) */
.hero--bg {
  /* Use SVG for crisp rendering on all resolutions */
  background-image: url('./assets/hero-bg.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.footer { padding: 24px; text-align: center; color: var(--muted); font-size: 13px; }

/* Sections (new main page layout) */
.site { display: block; }

.section { padding: 72px 20px; }
.section .container { max-width: 960px; margin: 0 auto; }
.section h2 { margin: 0 0 12px; font-size: clamp(22px, 4.4vw, 36px); }
.section p { margin: 0; font-size: 16px; opacity: 0.9; }
.galaxy-group { position: relative; }
.section--about { position: relative; background: transparent; color: #fff; }
.section--about .container { position: relative; z-index: 5; }
.section--team { position: relative; background: transparent; color: #fff; }
.section--team .container { position: relative; z-index: 5; }
.galaxy-canvas { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

/* Team grid */
.team-grid { display: grid; gap: 24px; align-items: start; }
.team-grid--simple {
  grid-template-columns: repeat(4, 1fr);
}
.section--team h2 { text-align: center; margin-left: auto; margin-right: auto; margin-bottom: 40px; font-size: clamp(28px, 6vw, 48px); font-family: 'Funnel Sans', sans-serif; }
.team-card { display: flex; flex-direction: column; gap: 10px; position: relative; }
.team-card__box {
  aspect-ratio: 1 / 1;
  border-radius: 22px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  display: grid; place-items: center;
  position: relative;
  z-index: 1;
}
.team-card__img { width: 70%; height: 70%; object-fit: cover; border-radius: 16px; box-shadow: 0 6px 18px rgba(0,0,0,0.18); }
.team-card__meta { text-align: center; position: relative; z-index: 10; }
.team-card__name { font-weight: 700; font-size: 16px; line-height: 1.2; }
.team-card__role { font-size: 13px; opacity: 0.7; margin-top: 2px; }
.team-card__handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 6px;
  height: auto;
  cursor: pointer;
  pointer-events: auto;
  border-radius: 8px;
  transition: transform .15s ease;
  position: relative;
  z-index: 1000; /* ensure on top of any local effects */
}
.team-card__handle:hover { transform: translateY(-1px); }
.team-card__x { width: 26px; height: 26px; display: inline-block; filter: brightness(0) invert(1); }
@media (max-width: 1100px) {
  .team-grid--simple { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .team-grid--simple { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .team-grid--simple { grid-template-columns: repeat(2, 1fr); }
}

/* Old about copy styles removed */

/* About: new split layout inspired by reference */
.about-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: clamp(20px, 4vw, 48px);
}
.about-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-left: -80px; /* shift About text further left on large screens */
}
.about-kicker {
  font-weight: 800;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  opacity: 0.8;
  margin: 0 0 10px;
  font-size: 12px;
}
.about-wordmark {
  margin: 18px 0 12px; /* space between kicker and logo */
  max-width: 420px;
}
.about-wordmark-img {
  display: block;
  width: 100%;
  height: auto;
}
.about-description {
  margin: 0 0 28px;
  font-size: clamp(16px, 2.2vw, 20px);
  max-width: 48ch;
  opacity: 0.95;
}
.about-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  margin-top: 25px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  position: relative;
  isolation: isolate; /* keep glow under the button but above background */
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.28);
  /* remove backdrop blur for performance */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 8px 26px rgba(0,0,0,0.35);
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  align-self: flex-start; /* align left within the left column */
  text-align: center;
}
.about-cta::before {
  /* remove glowing gradient halo for performance */
  content: none;
}
.about-cta:hover { transform: translateY(-1px); box-shadow: 0 12px 34px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.45); }
.about-cta:active { transform: translateY(0); }

.about-right { position: relative; align-self: stretch; width: 100%; overflow: visible; display: grid; place-items: center; }
.about-art {
  position: relative;
  width: 150%;
  height: clamp(560px, 72vh, 1100px);
  overflow: visible;
  margin-top: 40px; /* shift image lower within the About section */
}
.about-art img {
  display: block;
  width: clamp(900px, 95vw, 1800px);
  height: auto;
  object-fit: contain;
  transform: none;
}

@media (max-width: 900px) {
  .about-hero {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .about-left {
    align-items: flex-start;
    margin-left: 0; /* reset on smaller screens */
  }
  .about-description { max-width: 60ch; }
  .about-art {
    width: 100%;          /* prevent horizontal overflow on mobile */
    height: auto;
    margin-top: 24px;     /* slightly less vertical offset on small screens */
  }
  .about-art img {
    width: 100%;
    max-width: 100%;
    transform: none;
    object-fit: contain;
  }
}

@media (max-width: 640px) {
  .section { padding: 56px 16px; }
  .section .container { max-width: 720px; }
}

/* Solnautz burn counter styles */
.section--burn {
  position: relative;
  background: rgba(3, 7, 18, 0.9);
  color: #fff;
  overflow: hidden;
}
.section--burn::before {
  content: "";
  position: absolute;
  inset: -10px;
  background-image: url('./assets/burn.gif');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(18px);
  opacity: 0.6;
  transform: scale(1.05);
  z-index: 0;
}
.section--burn .container {
  max-width: 960px;
  position: relative;
  z-index: 1;
}
.section--burn h2 {
  text-align: center;
  margin-bottom: 8px;
  font-size: clamp(32px, 4vw, 56px);
}
.burn-number {
  margin: 0 0 14px;
  /* Make burn value visually much larger than the heading */
  font-size: 96px;
  font-weight: 800;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.01rem;
  text-align: center;
  line-height: 1;
}
#burnedCount {
  font-size: 2.6em; /* explicitly boost digits relative to the base */
  font-weight: 900;
}
.burn-number span:last-child {
  font-size: 3.5em; /* make the flame clearly larger than the digits */
}

/* Animated flame next to the burn total */
.burn-flame {
  display: inline-block;
  height: 2.5em;
  width: auto;
  margin-left: 0.1em;
  vertical-align: middle;
}

@media (max-width: 768px) {
  .burn-number {
    font-size: 56px;
  }
}
.burn-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  max-width: 420px;
  width: 100%;
  margin: 6px auto 2px;
}
.burn-updated {
  display: none; /* hidden for now; can be re-enabled later */
  margin: 4px 0;
  font-size: 15px;
  opacity: 0.9;
}
.burn-progress-outer {
  width: 100%;
  max-width: 420px;
  height: 18px;
  /* Container with no visible styling so segments can appear as two separate pills */
  border-radius: 0;
  border: none;
  background: transparent;
  margin: 4px auto 8px;
  position: relative;
  overflow: visible;
}
.burn-progress-fill {
  display: flex;
  width: 100%;
  height: 100%;
  gap: 8px; /* visual space between the two bars */
}
.burn-progress-segment {
  height: 100%;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.4);
  transition: flex-grow 0.4s ease-out;
}
.burn-progress-segment--alive {
  /* Alive segment */
  background: #FFD55F;
}
.burn-progress-segment--burned {
  /* Burned / total collection segment */
  background: #FF9161;
}
.burn-label {
  font-size: 13px;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  font-weight: 700; /* make Alive / Total numbers bolder */
}
.burn-label--left {
  text-align: left;
}
.burn-label--right {
  text-align: right;
}
.burn-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr);
  align-items: flex-end;
  gap: 32px;
}
.burn-main {
  display: flex;
  flex-direction: column;
  margin-left: -250px; /* shift burn info block further to the left on large screens */
}
.burn-progress-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 420px;
  width: 100%;
  margin: 4px auto 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.8;
}
.burn-footer-label {
  white-space: nowrap;
  font-weight: 700; /* make ALIVE / TOTAL COLLECTION labels bolder */
}
.burn-footer-label--left {
  text-align: left;
}
.burn-footer-label--right {
  text-align: right;
}

.burn-footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.burn-refresh {
  border: 1px solid rgba(255,255,255,0.5);
  background: rgba(15,23,42,0.9);
  color: #fff;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease, border-color 0.2s ease;
}
.burn-refresh:hover:not(:disabled) {
  background: rgba(148,163,184,0.5);
  transform: translateY(-1px);
}
.burn-refresh:disabled {
  opacity: 0.6;
  cursor: default;
}

.burn-image-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}
.burn-image {
  display: block;
  max-width: 100%;
  height: 220px;
  object-fit: contain;
  margin-bottom: -100px; /* pull image down to sit flush with section bottom */
  transform-origin: bottom right;
  transform: scale(1.8); /* increase size in-place; tweak this factor as needed */
  margin-right: -50px; /* push image further to the right on large screens */
}

@media (max-width: 900px) {
  .burn-layout {
    grid-template-columns: 1fr;
  }
  .burn-main {
    margin-left: 0; /* reset on smaller screens so content stays centered */
  }
  .burn-image-wrap {
    justify-content: flex-end; /* move burn image further to the right on mobile */
  }
  .burn-image {
    height: 180px;
    margin-top: 30px;
    margin-bottom: -57px;
    margin-right: -15px; /* nudge image slightly past the right edge */
    transform: scale(1.2);
  }
}
.burn-error {
  margin-top: 8px;
  font-size: 13px;
  color: #fecaca;
}
.burn-error {
  margin-top: 8px;
  font-size: 13px;
  color: #fecaca;
}

/* Splash/TV effects removed */

/* Stage: fixed background layer for ImageTrail (above section backgrounds, below content) */
.stage { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 3; }

/* motion-allow overrides removed */

/* Typed headline removed */

/* Allow videos (hero) to render normally */

/* TV off overlay removed */

/* --- Gallery page --- */

.page--gallery {
  position: relative;
  min-height: 100vh;
  color: #fff;
  overflow: hidden;
  font-family: 'Funnel Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.gallery-page {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 112px 20px 72px;
}

.gallery-header {
  margin-bottom: 32px;
}

.gallery-header-inner {
  display: flex;
  justify-content: center;
}

.gallery-hero-title {
  max-width: min(720px, 90vw);
  width: 100%;
  height: auto;
}

.gallery-controls-collapsed,
.gallery-controls {
  margin-bottom: 32px;
}

.gallery-filters-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.28);
  cursor: pointer;
  color: #fff;
  font-size: 150%;
  font-family: 'Funnel Sans', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  font-weight: 700;
  line-height: 1;
  overflow: visible;
  isolation: isolate;
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: 0 8px 26px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.35);
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}

.gallery-filters-toggle::before {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 2px;
  border-radius: inherit;
  background: conic-gradient(
    from 0deg,
    #FFC0F5,
    #00E3FA,
    #5CFCA9,
    #FFD55F,
    #FF9161,
    #FFC0F5
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 1;
  z-index: -1;
}

.gallery-filters-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 34px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.45);
}

.gallery-controls-collapsed {
  display: flex;
  justify-content: center;
}

.gallery-controls {
  position: relative;
  padding: 20px;
  border-radius: 24px;
  /* Frosted, highly transparent glass so the galaxy is very visible */
  background: rgba(15, 23, 42, 0.034);
  box-shadow:
    0 18px 40px rgba(0,0,0,0.7),
    inset 0 0 0 1px rgba(148,163,184,0.25);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  isolation: isolate;
}

.gallery-controls::before {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 2px;
  border-radius: inherit;
  background: conic-gradient(
    from 0deg,
    #FFC0F5,
    #00E3FA,
    #5CFCA9,
    #FFD55F,
    #FF9161,
    #FFC0F5
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 1;
  z-index: -1;
}

.gallery-controls-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(248,250,252,0.6);
  background: rgba(15,23,42,0.9);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.gallery-search {
  margin-bottom: 16px;
}

.gallery-search label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.gallery-search label span:first-child {
  /* Nudge just the "Search by ID or name" title to the right */
  margin-left: 8px;
}

.gallery-search input {
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.7);
  padding: 8px 14px;
  background: rgba(15,23,42,0.2);
  color: #e5e7eb;
}

.gallery-filters-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.gallery-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  position: relative; /* allow custom arrow positioning */
}

.gallery-filter span {
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-left: 10px;
  text-transform: uppercase;
  opacity: 0.85;
}

.gallery-filter select {
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.7);
  padding: 6px 30px 6px 10px; /* extra right padding to make room for custom arrow */
  background: rgba(15,23,42,0.2);
  color: #e5e7eb;
  appearance: none;
  -webkit-appearance: none;
}

.gallery-filter::after {
  content: "▾";
  position: absolute;
  right: 6px; /* move this to nudge arrow left/right */
  bottom: -11px;
  pointer-events: none;
  font-size: 40px;
  color: #e5e7eb;
}

.gallery-grid-section {
  position: relative;
}

.gallery-galaxy {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.gallery-card {
  position: relative;
  border-radius: 18px;
  border: 1px solid rgba(148,163,184,0.5);
  background: radial-gradient(circle at top left, rgba(15,23,42,0.96), rgba(15,23,42,0.98));
  box-shadow: 0 18px 40px rgba(0,0,0,0.8);
  cursor: pointer;
  overflow: hidden;
  outline: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.gallery-card:hover,
.gallery-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.9);
  border-color: rgba(251,191,36,0.9);
}

.gallery-card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: radial-gradient(circle at center, rgba(30,64,175,0.5), rgba(15,23,42,1));
}

.gallery-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: rgba(148,163,184,0.9);
}

.gallery-card-body {
  padding: 8px 10px 10px;
  background: rgba(15,23,42,0.96);
  border-top: 1px solid rgba(30,64,175,0.6);
}

.gallery-card-title {
  font-size: 20px;
  font-weight: bold;
  text-align: center;
}

.gallery-loading {
  margin-top: 16px;
  font-size: 13px;
  opacity: 0.8;
}

.gallery-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 80; /* above fixed header/menu (z-index: 40) */
}

.gallery-modal {
  position: relative;
  width: min(960px, 96vw);
  max-height: min(640px, 90vh);
  background: radial-gradient(circle at top left, rgba(15,23,42,0.96), rgba(15,23,42,0.99));
  border-radius: 24px;
  border: 1px solid rgba(148,163,184,0.7);
  box-shadow:
    0 40px 80px rgba(0,0,0,0.95),
    inset 0 0 0 1px rgba(15,23,42,0.9);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 20px;
  padding: 20px 20px 24px;
  overflow: hidden;
}

.gallery-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(248,250,252,0.6);
  background: rgba(15,23,42,0.9);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  z-index: 1;
}

.gallery-modal-media {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.gallery-modal-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 18px;
  background: radial-gradient(circle at center, rgba(15,23,42,1), rgba(2,6,23,1));
}

.gallery-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px;
}

.gallery-modal-title {
  font-size: 24px;
  margin: 0 0 4px;
}

.gallery-modal-download {
  position: relative;
  align-self: flex-start;
  margin-bottom: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.28);
  cursor: pointer;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  isolation: isolate;
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: 0 8px 26px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.35);
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}

.gallery-modal-download::before {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 2px;
  border-radius: inherit;
  background: conic-gradient(
    from 0deg,
    #FFC0F5,
    #00E3FA,
    #5CFCA9,
    #FFD55F,
    #FF9161,
    #FFC0F5
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 1;
  z-index: -1;
}

.gallery-modal-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 34px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.45);
}

.gallery-modal-traits {
  margin-top: 4px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  font-size: 12px;
}

.gallery-modal-trait-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15,23,42,0.96);
  border: 1px solid rgba(55,65,81,0.8);
}

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

@media (max-width: 768px) {
  .gallery-modal-backdrop {
    align-items: stretch;
    justify-content: stretch;
  }
  .gallery-page {
    padding: 96px 16px 56px;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gallery-filters-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gallery-modal {
    grid-template-columns: 1fr;
    max-height: none;
    width: 100vw;
    height: 100dvh; /* full screen on mobile */
    margin: 0;
    border-radius: 0;
    /* extra top padding so the close button doesn't sit on the image */
    padding: 56px 14px 18px;
    overflow: auto; /* allow content scroll inside full-screen modal */
  }
  .gallery-modal-close {
    top: 10px;
    right: 10px;
  }
  .gallery-modal-media {
    max-height: 44vh; /* slightly smaller image on mobile */
  }
  .gallery-modal-traits {
    grid-template-columns: 1fr;
  }
  .gallery-modal-title {
    font-size: 26px;
  }
  .gallery-modal-download {
    font-size: 14px;
    padding: 9px 20px;
  }
  .gallery-modal-trait-row {
    padding: 6px 10px;
    font-size: 13px;
  }
}

