:root {
  /* Slightly smaller to reduce fill rate */
  --cube-size: 100px;
}

html {
  box-sizing: border-box;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

body {
  /* 匹配主站背景：顶部冷灰线性渐变 + 头顶大号径向淡光 */
  background:
    radial-gradient(1000px 520px at 50% -10%, #f0f2f5, transparent 60%),
    linear-gradient(#f6f7f9, #f3f4f6 40%, #eff1f4 100%);
  overflow: hidden;
  font-size: 10px;
}

body,
html {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}

.container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  margin: auto;
  perspective: 800px;
  visibility: hidden;
}

.scene {
  transform-style: preserve-3d;
  transform: rotateX(-30deg) rotateY(55deg);
  will-change: transform;
}

.track {
  transform-style: preserve-3d;
  will-change: transform;
}

.walker {
  transform-style: preserve-3d;
  position: relative;
  display: flex;
  will-change: transform;
}

.walker--2 {
  transform-style: preserve-3d;
  transform: rotateX(180deg) translateY(-1px);
}
.walker--2 .face {
  opacity: 0.6;
}
.walker--2 .cube--1 .face {
  background: #f6edf0;
}
.walker--2 .cube--2 .face {
  background: #eaebf1;
}

.cube {
  position: relative;
  width: var(--cube-size);
  height: var(--cube-size);
  transform-style: preserve-3d;
  will-change: transform;
}

.face {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  overflow: hidden;
  will-change: transform, opacity;
}

/* 发光文案（读取 data-label） */
.face::after{
  content: attr(data-label);
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#ffffff;
  font-family: "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  font-weight:800;
  letter-spacing:.08em;
  font-size: calc(var(--cube-size) * 0.22);
  pointer-events:none;
  text-transform: uppercase;
}

/* 不同方块的文本发光颜色 */
/* Lighter glow for better performance */
.cube--1 .face::after{
  text-shadow: 0 0 10px rgba(255,140,0,.45);
}
.cube--2 .face::after{
  text-shadow: 0 0 10px rgba(16,185,129,.45);
}

/* Smaller cubes on small screens to reduce GPU load */
@media (max-width: 720px){
  :root{ --cube-size: 100px; }
}

.face--front {
  transform: translateZ(calc(var(--cube-size)/2));
}

.face--back {
  transform: translateZ(calc((var(--cube-size)*-1)/2)) rotateY(180deg);
}

.face--left {
  transform: translateX(calc((var(--cube-size)*-1)/2)) rotateY(-90deg);
}

.face--right {
  transform: translateX(calc(var(--cube-size)/2)) rotateY(90deg);
}

.face--top {
  transform: translateY(calc((var(--cube-size)*-1)/2)) rotateX(90deg);
}

.face--bottom {
  transform: translateY(calc(var(--cube-size)/2)) rotateX(-90deg);
}

.cube--1 .face {
  background: rgba(255, 140, 0, 0.9);
}
.cube--1 .face--front, .cube--1 .face--back {
  background: rgba(229, 103, 0, 0.9);
}
.cube--1 .face--left, .cube--1 .face--right {
  background: rgba(255, 122, 0, 0.9);
}

.cube--2 .face {
  background: rgba(16, 185, 129, 0.9);
}
.cube--2 .face--front, .cube--2 .face--back {
  background: rgba(5, 150, 105, 0.9);
}
.cube--2 .face--left, .cube--2 .face--right {
  background: rgba(14, 159, 110, 0.9);
}

.gsap-3-logo {
  width: 20vw;
  max-width: 150px;
  position: fixed;
  bottom: 15px;
  right: 15px;
}

/*  ==========================================================
	Collection Linl
	========================================================== */
.collection {
  position: fixed;
  z-index: 1000;
  top: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
}

.collection__link {
  position: relative;
  margin-bottom: 16px;
  color: black;
  font-family: Helvetica, sans-serif;
  text-decoration: none;
  font-size: 16px;
}
.collection__link span {
  display: block;
  position: absolute;
  bottom: -3px;
  left: 0;
  height: 1px;
  width: 10%;
  background-color: black;
  content: "";
  transition: width 0.3s;
}
.collection__link:hover span {
  width: 100%;
}
