:root {
  color-scheme: dark;
  --bg: #000;
  --text: #fff;
  --muted: rgba(255, 255, 255, 0.48);
  --line: rgba(255, 255, 255, 0.9);
}

* {
  box-sizing: border-box;
}

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

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  cursor: default;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
a {
  cursor: default;
}

body::before,
body::after,
.cosmic-glow {
  display: none;
}

#stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.view {
  display: none;
}

.view.is-visible {
  display: block;
}

.home-view.is-visible {
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.flowing-menu-wrap {
  width: 100%;
  height: min(600px, 72vh);
  overflow: hidden;
  background: transparent;
}

.flowing-menu-item {
  position: relative;
  height: 25%;
  overflow: hidden;
  text-align: center;
  border-top: 1px solid var(--line);
}

.flowing-menu-item:first-child {
  border-top: 0;
}

.flowing-menu-link {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  font-size: 4vh;
  font-weight: 600;
  text-transform: uppercase;
}

.flowing-marquee {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  background: #fff;
  pointer-events: none;
  transform: translateY(101%);
  transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.flowing-menu-item.from-top .flowing-marquee {
  transform: translateY(-101%);
}

.flowing-menu-item:hover .flowing-marquee,
.flowing-menu-item:focus-within .flowing-marquee {
  transform: translateY(0);
}

.flowing-menu-item.is-leaving.from-top .flowing-marquee {
  transform: translateY(-101%);
}

.flowing-menu-item.is-leaving.from-bottom .flowing-marquee {
  transform: translateY(101%);
}

.flowing-marquee-wrap {
  height: 100%;
  width: 200%;
  display: flex;
  transform: translateX(0);
}

.flowing-marquee-inner {
  display: flex;
  align-items: center;
  height: 100%;
  width: max-content;
  animation: marquee 15s linear infinite;
}

.flowing-marquee-part {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0 2vw;
  color: #000;
  font-size: 4vh;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}

.flowing-marquee-img {
  flex: 0 0 auto;
  width: 200px;
  height: 7vh;
  margin: 0 2vw;
  border-radius: 999px;
  background-position: center;
  background-size: cover;
}

.category-view {
  min-height: 100vh;
  padding: 32px clamp(18px, 5vw, 70px) clamp(42px, 7vh, 72px);
  background: transparent;
}

.category-heading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  width: min(1240px, 100%);
  margin: 0 auto 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  font-size: 36px;
  font-weight: 300;
  line-height: 1;
}

.category-heading h1 {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 36px;
  font-weight: 400;
  line-height: 1.1;
}

.category-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.category-wall-shell {
  position: relative;
  width: min(1240px, 100%);
  height: calc(100vh - 170px);
  min-height: 520px;
  margin: 0 auto;
  overflow-y: auto;
  scrollbar-width: none;
}

.category-wall-shell::-webkit-scrollbar {
  display: none;
}

.category-wall-shell::before,
.category-wall-shell::after {
  position: sticky;
  left: 0;
  z-index: 5;
  display: block;
  width: 100%;
  height: 22vh;
  pointer-events: none;
  content: "";
}

.category-wall-shell::before {
  top: 0;
  margin-bottom: -22vh;
  background: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.92) 22%, rgba(0, 0, 0, 0.54) 62%, transparent 100%);
}

.category-wall-shell::after {
  bottom: 0;
  margin-top: -22vh;
  background: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0.92) 22%, rgba(0, 0, 0, 0.54) 62%, transparent 100%);
}

.category-grid {
  width: 100%;
  margin: 0 auto;
  column-count: 3;
  column-gap: clamp(10px, 1vw, 16px);
}

.gallery-item {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 0 clamp(10px, 1vw, 16px);
  break-inside: avoid;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
}

.gallery-item img,
.gallery-item video {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: brightness(0.68) saturate(0.9);
}

.gallery-item:hover img,
.gallery-item:hover video {
  filter: brightness(0.88) saturate(1);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 36px;
  background: rgba(0, 0, 0, 0.94);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-media {
  max-width: min(92vw, 1500px);
  max-height: 88vh;
}

.lightbox-media img,
.lightbox-media video {
  display: block;
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
}

.lightbox-close {
  position: fixed;
  top: 22px;
  right: 28px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  color: rgba(255, 255, 255, 0.78);
  font-size: 30px;
  line-height: 1;
}

.empty {
  margin: 12vh auto 0;
  color: var(--muted);
  font-size: 18px;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-20%);
  }
}

@media (max-width: 900px) {
  .flowing-menu-link,
  .flowing-marquee-part {
    font-size: 3.4vh;
  }

  .flowing-marquee-img {
    width: 160px;
  }

  .category-view {
    padding: 34px 14px;
  }

  .category-grid {
    column-count: 2;
  }
}

@media (max-width: 520px) {
  .flowing-menu-link,
  .flowing-marquee-part {
    font-size: 3vh;
  }

  .flowing-marquee-img {
    width: 128px;
    height: 6vh;
  }

  .category-heading {
    align-items: center;
  }

  .category-heading p {
    margin-top: 8px;
  }

  .category-grid {
    column-count: 1;
  }
}
