:root {
  --bg-1: #0f0c29;
  --bg-2: #302b63;
  --bg-3: #24243e;
  --accent: #22c55e;
  --accent-2: #a7f3d0;
  --text: #f8fafc;
  --muted: #cbd5e1;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Noto Serif SC', 'ZCOOL XiaoWei', system-ui, -apple-system, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2), var(--bg-3));
}

/* Home (index) */
.hero {
  position: relative;
  /* Fill the real viewport height on mobile to avoid a small strip showing next section */
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate; /* ensure children don't overlap next sections */
}
.hero__bg { position: absolute; inset: 0; background-position: center; background-repeat: no-repeat; background-size: cover; opacity: 0; transition: opacity 1s ease; z-index: 0; }
.hero__bg.is-active { opacity: 1; }
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; background: #000; }

.hero::before {
  content: '';
  position: absolute;
  inset: -20vh -20vw;
  background: radial-gradient(60vmax 60vmax at 20% 20%, rgba(255,255,255,0.07), transparent),
              radial-gradient(40vmax 40vmax at 80% 30%, rgba(34,197,94,0.12), transparent),
              radial-gradient(30vmax 30vmax at 50% 80%, rgba(234,179,8,0.08), transparent);
  filter: blur(20px);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(2px);
  z-index: 1;
}

.hero__content {
  position: relative;
  text-align: center;
  padding: 2rem;
  z-index: 2;
  max-width: 900px;
}

.hero__tag {
  font-size: 1rem;
  color: var(--muted);
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.hero__title {
  margin: 0.8rem 0 0.4rem;
  line-height: 1.1;
  font-weight: 800;
  font-size: clamp(2.6rem, 5vw + 1rem, 5rem);
}

.hero__title span {
  display: block;
  background: linear-gradient(90deg, #a7f3d0, #22c55e 40%, #a7f3d0 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__subtitle {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.cta-button {
  display: inline-block;
  padding: 0.9rem 2.2rem;
  border-radius: 999px;
  color: #0b1220;
  font-weight: 700;
  text-decoration: none;
  background: linear-gradient(90deg, #facc15, #f59e0b);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.35);
  transition: transform .2s ease, box-shadow .2s ease;
}
.cta-button:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(245, 158, 11, 0.48); }
.cta-button:active { transform: translateY(0); }

/* Gallery Page */
.topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.topbar h1 { margin: 0; font-size: 1.25rem; font-weight: 700; }
.topbar .back { color: var(--accent-2); text-decoration: none; }
.topbar.is-sticky { position: sticky; top: 0; background: rgba(15,12,41,0.8); backdrop-filter: blur(6px); z-index: 10; }

.sections-grid {
  padding: clamp(1rem, 3vw, 2rem);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1rem, 2.2vw, 1.6rem);
  max-width: 1200px;
  margin: 0 auto;
}

.section {
  grid-column: span 12;
  /* 完全去框感：透明背景、无阴影、无额外圆角和内边距 */
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}
.section h2 { margin: 0 0 0.8rem; font-size: 1.1rem; color: var(--accent-2); }
.sr-only { position: absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.module-card { position: relative; border-radius: 18px; overflow: hidden; }
.module-overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0.0)); }
.module-title { color: #fff; font-weight: 700; font-size: 16px; text-shadow: 0 2px 8px rgba(0,0,0,0.6); }
.module-cta { background: linear-gradient(90deg, #fb923c, #f97316); color: #111827; font-weight: 800; border-radius: 999px; padding: 6px 12px; text-decoration: none; box-shadow: 0 6px 20px rgba(0,0,0,0.25); }

@media (min-width: 0px) { .section { grid-column: span 6; } }
@media (min-width: 768px) { .section { grid-column: span 6; } }

/* Carousel */
.carousel { position: relative; overflow: hidden; border-radius: 0; }
.carousel__track { display: flex; transition: transform .5s ease; }
.carousel__slide { min-width: 100%; height: 0; padding-bottom: 130%; position: relative; }
.carousel__slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
 .carousel__slide video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }

@media (min-width: 768px) { .carousel__slide { padding-bottom: 120%; } }
@media (min-width: 1200px) { .carousel__slide { padding-bottom: 110%; } }

.carousel__button {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.4); color: #fff; border: none; width: 44px; height: 44px;
  border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  transition: background .2s ease; z-index: 2;
}
.carousel__button:hover { background: rgba(0,0,0,0.55); }
.carousel__button--prev { left: 8px; }
.carousel__button--next { right: 8px; }

.carousel__dots { position: absolute; inset-inline: 0; bottom: 8px; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.carousel__dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.5); border: none; padding: 0; cursor: pointer; }
.carousel__dot.is-active { background: #fff; }

/* Hide carousel UI when requested */
.carousel--no-ui .carousel__button,
.carousel--no-ui .carousel__dots { display: none !important; }

/* Top-right small global toggle (placeholder icon) */
.global-toggle {
  position: fixed; right: 10px; top: 10px; z-index: 50;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);
  display: block; cursor: pointer;
  background-image: url('../images/yy(1).png');
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
/* remove built-in glyph, using your icon */
.global-toggle::after { content: ''; }

/* Music widget */
.music-widget {
  position: fixed;
  right: calc(14px + env(safe-area-inset-right, 0px));
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(15, 12, 41, 0.6);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  color: var(--text);
  z-index: 20;
}
.music-widget.is-hidden { display: none; }
.mw-btn {
  appearance: none;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
}
.mw-btn:hover { background: rgba(255,255,255,0.18); }
.mw-title { font-size: .9rem; color: var(--muted); padding-right: 6px; }

/* Listing Page */
.banner { height: 180px; background: rgba(255,255,255,0.06); border-bottom: 1px solid rgba(255,255,255,0.08); display: grid; place-items: center; }
.banner.is-image { background-position: center; background-size: cover; background-repeat: no-repeat; }

.cards-grid { padding: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 768px) { .cards-grid { grid-template-columns: repeat(3, 1fr); max-width: 1000px; margin: 0 auto; } }

.card { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.15); }
.card__media { position: relative; padding-bottom: 130%; overflow: hidden; }
.card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card__tag { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,0.5); color: #fff; padding: 4px 8px; border-radius: 999px; font-size: 12px; }
.card__body { padding: 10px; display: grid; gap: 6px; }
.card__title { font-size: 15px; font-weight: 700; margin: 0; }
.card__meta { color: var(--muted); font-size: 12px; }
.card__actions { display: flex; gap: 8px; }
.btn { appearance: none; border: none; border-radius: 999px; background: linear-gradient(90deg, #f59e0b, #f97316); color: #0b1220; font-weight: 700; padding: 6px 10px; cursor: pointer; }
.btn--alt { background: rgba(255,255,255,0.15); color: #fff; }

.cards-grid.is-image-only .card { padding: 0; border-radius: 12px; border: none; background: none; box-shadow: none; }
.cards-grid.is-image-only .card__media { padding-bottom: 140%; border-radius: 12px; overflow: hidden; }

.card__body.only-btn { padding: 10px; }
.card__body.only-btn .card__actions { justify-content: center; }
.card__body.only-btn .btn { width: 100%; max-width: 180px; text-align: center; }

/* Staggered offsets to create vertical rhythm across two columns */
.stagger-grid .section:nth-child(odd) { margin-top: 6px; }
.stagger-grid .section:nth-child(even) { margin-top: 22px; }
@media (min-width: 768px) {
  .stagger-grid .section:nth-child(odd) { margin-top: 10px; }
  .stagger-grid .section:nth-child(even) { margin-top: 28px; }
}
@media (min-width: 1200px) {
  .stagger-grid .section:nth-child(odd) { margin-top: 12px; }
  .stagger-grid .section:nth-child(even) { margin-top: 32px; }
}

/* Chat group button at bottom */
.chat-group-button {
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
  margin-top: 1rem;
}
.chat-btn {
  display: inline-block;
  padding: 12px 24px;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.chat-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(34, 197, 94, 0.35);
}
.chat-btn:active {
  transform: translateY(0);
}

/* Top-right corner comment tag */
.module-top-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
}
.module-top-tag a {
  display: inline-block;
  padding: 4px 8px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 11px;
  border-radius: 12px;
  backdrop-filter: blur(6px);
  transition: all 0.2s ease;
}
.module-top-tag a:hover {
  background: rgba(0,0,0,0.75);
}
