:root {
  --primary: #10b981;
  --bg: #ffffff;
  --bg-dark: #0f172a;
  --text: #1e293b;
  --text-dark: #f1f5f9;
  --header-bg: #ffffff;
  --header-bg-dark: #ffffff;
  --footer-text: #475569;
  --footer-text-dark: #cbd5e1;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  overflow-y: scroll;
}

body {
  font-family: "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.dark {
  background: var(--bg-dark);
  color: var(--text-dark);
}

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--text);
}

body.dark .header {
  background: #ffffff;
  border-bottom-color: rgba(0, 0, 0, 0.08);
  color: var(--text);
}

body.dark .header .nav-link,
body.dark .header .navbar-brand,
body.dark .header .lang-btn,
body.dark .header .icon-btn {
  color: var(--text);
}

.navbar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 1024px) {
  .navbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: 1rem;
  }

  .navbar-brand {
    grid-column: 1;
    justify-self: start;
  }

  .nav-menu {
    grid-column: 2;
    justify-self: center;
  }

  .nav-actions {
    grid-column: 3;
    justify-self: end;
  }
}

.navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  gap: 0.25rem;
}

.logo-primary-text {
  font-family: "Ma Shan Zheng", "STXingkai", "KaiTi", cursive;
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.logo-secondary-text {
  font-size: 0.875rem;
  font-style: italic;
  opacity: 0.85;
}

@media (min-width: 640px) {
  .logo-primary-text,
  .logo-secondary-text { font-size: 1.75rem; }
}

.nav-toggle { display: none; }
.nav-toggle-label { display: none; cursor: pointer; padding: 0.5rem; }
.nav-menu { display: flex; list-style: none; gap: 0.5rem; flex-wrap: wrap; }

.nav-link {
  text-decoration: none;
  color: inherit;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.95rem;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.nav-link:visited,
.nav-link:active {
  color: inherit;
}

.nav-link:focus {
  outline: none;
}

.nav-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.nav-link:hover,
.nav-link.active { color: var(--primary); }

body.dark .nav-link:hover,
body.dark .nav-link.active { color: var(--primary); }

.nav-actions { display: flex; align-items: center; gap: 0.5rem; }

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.375rem;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn svg { width: 1.25rem; height: 1.25rem; }

.theme-toggle .sun { display: none; }
body.dark .theme-toggle .moon { display: none; }
body.dark .theme-toggle .sun { display: block; }

.lang-wrapper { position: relative; }

.lang-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.875rem;
  color: inherit;
  border-radius: 0.375rem;
  transition: background 0.2s;
}

.lang-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

body.dark .lang-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.lang-menu a:hover {
  background: rgba(16, 185, 129, 0.1);
  color: var(--primary);
}

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.25rem);
  min-width: 120px;
  background: #fff;
  border-radius: 0.375rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  list-style: none;
  padding: 0.25rem 0;
  display: none;
  z-index: 50;
}

body.dark .lang-menu { background: #1e293b; }
.lang-menu.open { display: block; }

.lang-menu a {
  display: block;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  color: inherit;
  font-size: 0.875rem;
}

.page-main { flex: 1; width: 100%; }

.page-body-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

/* Screen-reader only (SEO headings without visual change) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.gallery-main {
  flex: 1;
}

.gallery-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1rem 2.5rem;
}

.gallery-header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.gallery-title {
  font-family: "Ma Shan Zheng", "STXingkai", "KaiTi", cursive;
  font-size: clamp(2rem, 5vw, 2.75rem);
  letter-spacing: 0.1em;
  font-weight: 400;
}

body.dark .gallery-title {
  color: var(--text-dark);
}

.gallery-grid {
  display: grid;
  gap: 1rem;
}

/* 横图 1–6：每行 2 张，统一高度 */
.gallery-grid--landscape {
  grid-template-columns: repeat(2, 1fr);
}

.gallery-grid--landscape .gallery-item {
  display: flex;
}

.gallery-grid--landscape .gallery-thumb {
  flex: 1;
  width: 100%;
}

.gallery-grid--landscape .gallery-thumb img {
  width: 100%;
  height: clamp(280px, 32vw, 400px);
  min-height: clamp(280px, 32vw, 400px);
  max-height: clamp(280px, 32vw, 400px);
  object-fit: cover;
}

/* 竖图 7–9：每行 3 张 */
.gallery-grid--portrait {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 1rem;
}

.gallery-grid--portrait .gallery-item {
  display: flex;
}

.gallery-grid--portrait .gallery-thumb {
  flex: 1;
  width: 100%;
}

.gallery-grid--portrait .gallery-thumb img {
  width: 100%;
  height: clamp(320px, 38vw, 480px);
  min-height: clamp(320px, 38vw, 480px);
  max-height: clamp(320px, 38vw, 480px);
  object-fit: cover;
  object-position: top center;
}

.gallery-item {
  margin: 0;
  overflow: hidden;
  border-radius: 0.65rem;
  background: rgba(0, 0, 0, 0.04);
}

body.dark .gallery-item {
  background: rgba(255, 255, 255, 0.04);
}

.gallery-thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  line-height: 0;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  max-height: 520px;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.gallery-thumb:hover img {
  transform: scale(1.03);
  filter: brightness(1.05);
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.88);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.gallery-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.gallery-lightbox img {
  max-width: min(96vw, 1100px);
  max-height: 90vh;
  object-fit: contain;
  border-radius: 0.35rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.gallery-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.gallery-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

@media (max-width: 640px) {
  .gallery-page {
    padding: 0.75rem 0.75rem 2rem;
  }

  .gallery-grid {
    gap: 0.5rem;
  }

  .gallery-grid--landscape {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid--landscape .gallery-thumb img {
    height: clamp(140px, 42vw, 200px);
    min-height: clamp(140px, 42vw, 200px);
    max-height: clamp(140px, 42vw, 200px);
  }

  .gallery-grid--portrait {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery-grid--portrait .gallery-thumb img {
    height: clamp(160px, 48vw, 260px);
    min-height: clamp(160px, 48vw, 260px);
    max-height: clamp(160px, 48vw, 260px);
  }
}

/* Events / calendar page */
.events-page-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url("1.webp") center 32% / cover no-repeat;
  filter: brightness(0.7);
  transform: scale(1.02);
}

.events-page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.35) 100%
  );
}

body.events-layout .events-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 3.5rem - 10rem);
  padding: 2rem 1rem 3rem;
}

body.events-layout .footer {
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

body.events-layout .footer-lang a {
  color: #6ee7b7;
}

.events-page {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

.events-card {
  text-align: center;
  padding: 3rem 2rem 2.75rem;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.events-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.85rem;
}

.events-title {
  font-family: "Ma Shan Zheng", "STXingkai", "KaiTi", cursive;
  font-size: clamp(2.25rem, 6vw, 3.25rem);
  font-weight: 400;
  letter-spacing: 0.14em;
  color: #ffffff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.events-divider {
  width: 3rem;
  height: 2px;
  margin: 1.5rem auto;
  background: linear-gradient(90deg, transparent, #6ee7b7, transparent);
  border-radius: 999px;
}

.events-soon {
  font-family: "Ma Shan Zheng", "STXingkai", "KaiTi", cursive;
  font-size: clamp(2rem, 5.5vw, 2.85rem);
  letter-spacing: 0.28em;
  color: #ffffff;
  text-indent: 0.28em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
}

.events-desc {
  margin-top: 1.25rem;
  font-size: 1.02rem;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.82);
}

.events-desc-en {
  margin-top: 0.5rem;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.48);
  font-style: italic;
}

.events-contact-link {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.65rem 1.35rem;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  color: #ffffff;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid rgba(110, 231, 183, 0.45);
  background: rgba(16, 185, 129, 0.12);
  transition: background 0.25s, border-color 0.25s, transform 0.2s;
}

.events-contact-link:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(110, 231, 183, 0.7);
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .events-card {
    padding: 2.25rem 1.25rem 2rem;
  }

  .events-soon {
    letter-spacing: 0.2em;
    text-indent: 0.2em;
  }
}

.page-banner {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.page-banner-bg {
  position: absolute;
  inset: 0;
  background-image: url("1.webp");
  background-size: cover;
  background-position: center 32%;
  filter: brightness(0.7);
}

.page-banner-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.35) 100%);
}

.page-banner-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
}

.page-banner-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: #f8fafc;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
}

.contact-page-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url("1.webp") center 32% / cover no-repeat;
  filter: brightness(0.7);
  transform: scale(1.02);
}

.contact-page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.35) 100%
  );
}

body.contact-layout .contact-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 3.5rem - 10rem);
  padding: clamp(4.5rem, 18vh, 7rem) 1rem 2rem;
}

body.contact-layout .footer {
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

body.contact-layout .footer-lang a {
  color: #6ee7b7;
}

.contact-page {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.contact-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 1rem;
}

.contact-email-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.contact-social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  margin-top: 2.5rem;
  width: 100%;
}

.contact-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  transition: transform 0.2s, color 0.2s, opacity 0.2s;
  text-decoration: none;
  opacity: 0.92;
}

.contact-social a:hover {
  transform: translateY(-2px);
  color: var(--primary);
  opacity: 1;
}

.contact-social svg {
  width: 2.35rem;
  height: 2.35rem;
  fill: currentColor;
}

.contact-social .icon-xhs {
  width: auto;
  min-width: 4.25rem;
  height: 4rem;
  padding: 0 0.55rem;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.contact-title {
  font-family: "Ma Shan Zheng", "STXingkai", "KaiTi", cursive;
  font-size: clamp(2.25rem, 6vw, 3.25rem);
  font-weight: 400;
  letter-spacing: 0.14em;
  color: #ffffff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
  margin-bottom: 2rem;
}

.contact-label {
  font-size: 0.88rem;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 0.75rem;
}

.contact-email {
  display: inline-block;
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  color: #6ee7b7;
  text-decoration: none;
  word-break: break-all;
  transition: color 0.2s, text-shadow 0.2s;
}

.contact-email:hover {
  color: #a7f3d0;
  text-shadow: 0 0 20px rgba(110, 231, 183, 0.35);
}

/* Music page */
.music-page-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url("1.webp") center 32% / cover no-repeat;
  overflow: hidden;
}

.music-page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(8, 12, 28, 0.72) 42%,
    rgba(4, 10, 24, 0.88) 100%
  );
}

.music-aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.45;
  pointer-events: none;
  animation: music-aurora-drift 14s ease-in-out infinite alternate;
}

.music-aurora--1 {
  width: min(52vw, 420px);
  height: min(52vw, 420px);
  top: 8%;
  left: -8%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.75) 0%, transparent 70%);
}

.music-aurora--2 {
  width: min(48vw, 380px);
  height: min(48vw, 380px);
  top: 32%;
  right: -10%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.55) 0%, transparent 70%);
  animation-delay: -4s;
  animation-duration: 18s;
}

.music-aurora--3 {
  width: min(40vw, 320px);
  height: min(40vw, 320px);
  bottom: 12%;
  left: 28%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.4) 0%, transparent 70%);
  animation-delay: -8s;
  animation-duration: 16s;
}

@keyframes music-aurora-drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(3%, -4%) scale(1.08); }
}

@keyframes music-title-glow {
  0%, 100% { filter: drop-shadow(0 0 18px rgba(110, 231, 183, 0.35)); }
  50% { filter: drop-shadow(0 0 28px rgba(167, 139, 250, 0.45)); }
}

@keyframes music-shimmer {
  0% { background-position: 200% center; }
  100% { background-position: -200% center; }
}

@keyframes track-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cover-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes visualizer-bar {
  0%, 100% { transform: scaleY(0.35); }
  50% { transform: scaleY(1); }
}

@keyframes progress-glow-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes play-btn-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45), 0 6px 24px rgba(16, 185, 129, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0), 0 8px 28px rgba(110, 231, 183, 0.55); }
}

body.music-layout .music-main {
  position: relative;
  color: #ffffff;
}

body.music-layout .footer {
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

body.music-layout .footer-lang a {
  color: #6ee7b7;
}

body.player-open .music-main {
  padding-bottom: 6rem;
}

.music-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3.5rem;
}

.music-header {
  position: relative;
  margin-bottom: 2.25rem;
  text-align: center;
}

.music-header-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(90%, 520px);
  height: 120px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(110, 231, 183, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.music-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(167, 243, 208, 0.75);
  margin-bottom: 0.75rem;
}

.music-title {
  font-family: "Ma Shan Zheng", "STXingkai", "KaiTi", cursive;
  font-size: clamp(2.5rem, 7vw, 3.75rem);
  font-weight: 400;
  letter-spacing: 0.12em;
  color: #ffffff;
  background: linear-gradient(135deg, #ffffff 0%, #d1fae5 45%, #c4b5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: music-title-glow 4s ease-in-out infinite;
}

.music-subtitle {
  margin-top: 0.65rem;
  font-size: 1rem;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.78);
}

.music-intro {
  margin-bottom: 0.5rem;
}

.music-intro p {
  font-size: 1.02rem;
  line-height: 2.05;
  margin-bottom: 1.15rem;
  text-align: justify;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

.music-intro p:last-child {
  margin-bottom: 0;
}

.music-catalog {
  margin-top: 2.75rem;
}

.music-catalog-head {
  margin-bottom: 1.35rem;
}

.music-catalog-title {
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  background: linear-gradient(90deg, #ffffff, #6ee7b7, #a78bfa);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: music-shimmer 6s linear infinite;
}

.music-catalog-hint {
  margin-top: 0.45rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.58);
}

.music-track-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.music-track {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.15rem;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s, transform 0.25s, box-shadow 0.3s;
  animation: track-enter 0.5s ease backwards;
}

.music-track:nth-child(1) { animation-delay: 0.03s; }
.music-track:nth-child(2) { animation-delay: 0.06s; }
.music-track:nth-child(3) { animation-delay: 0.09s; }
.music-track:nth-child(4) { animation-delay: 0.12s; }
.music-track:nth-child(5) { animation-delay: 0.15s; }
.music-track:nth-child(n+6) { animation-delay: 0.18s; }

.music-track:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(110, 231, 183, 0.08) 100%);
  border-color: rgba(110, 231, 183, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28), 0 0 24px rgba(16, 185, 129, 0.12);
}

.music-track.is-playing {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(139, 92, 246, 0.12) 100%);
  border-color: rgba(110, 231, 183, 0.6);
  box-shadow: 0 0 0 1px rgba(110, 231, 183, 0.25), 0 12px 36px rgba(0, 0, 0, 0.32), 0 0 32px rgba(16, 185, 129, 0.18);
}

.track-play-btn {
  flex-shrink: 0;
  width: 2.85rem;
  height: 2.85rem;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #34d399 0%, #10b981 50%, #059669 100%);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.45);
  transition: transform 0.25s, box-shadow 0.25s;
}

.track-play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 28px rgba(16, 185, 129, 0.6);
}

.music-track.is-playing .track-play-btn {
  animation: play-btn-pulse 2s ease-in-out infinite;
}

.track-play-icon {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent #fff;
  margin-left: 3px;
}

.music-track.is-playing .track-play-icon {
  width: 12px;
  height: 14px;
  border: none;
  margin-left: 0;
  background: linear-gradient(to right, #fff 0 4px, transparent 4px 8px, #fff 8px 12px);
  box-shadow: none;
}

.track-info {
  flex: 1;
  min-width: 0;
}

.track-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-album {
  margin-top: 0.2rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.track-badges {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.track-badge {
  font-size: 0.68rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.track-badge--local {
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
  border: 1px solid rgba(110, 231, 183, 0.35);
}

.track-badge--link {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.track-badge--missing {
  background: rgba(251, 191, 36, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

/* Bottom player */
.music-player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  transform: translateY(100%);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.music-player.is-visible {
  transform: translateY(0);
}

.music-player-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.15), rgba(139, 92, 246, 0.12), rgba(56, 189, 248, 0.1));
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.music-player.is-playing-audio .music-player-glow {
  opacity: 1;
}

.music-player-inner {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.95rem 1.35rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.2fr);
  align-items: center;
  gap: 1.25rem;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92) 0%, rgba(8, 12, 28, 0.96) 100%);
  backdrop-filter: blur(24px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.55), 0 0 40px rgba(16, 185, 129, 0.08);
}

.music-player-inner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 5%;
  right: 5%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #6ee7b7, #a78bfa, #38bdf8, transparent);
  opacity: 0.85;
}

.player-track {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.player-cover-wrap {
  position: relative;
  flex-shrink: 0;
  width: 3.75rem;
  height: 3.75rem;
}

.player-cover-ring {
  position: absolute;
  inset: -4px;
  border-radius: 0.65rem;
  border: 2px solid transparent;
  background: linear-gradient(135deg, #6ee7b7, #a78bfa, #38bdf8) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.7;
}

.music-player.is-playing-audio .player-cover-ring {
  animation: cover-spin 8s linear infinite;
}

.player-cover {
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 0.55rem;
  object-fit: cover;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.music-player.is-playing-audio .player-cover {
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.35);
}

.player-visualizer {
  display: none;
  align-items: flex-end;
  gap: 3px;
  height: 1.5rem;
  margin-left: 0.25rem;
}

.music-player.is-playing-audio .player-visualizer {
  display: flex;
}

.player-visualizer span {
  display: block;
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(180deg, #6ee7b7, #34d399);
  transform-origin: bottom;
  animation: visualizer-bar 0.9s ease-in-out infinite;
}

.player-visualizer span:nth-child(1) { animation-delay: 0s; }
.player-visualizer span:nth-child(2) { animation-delay: 0.15s; }
.player-visualizer span:nth-child(3) { animation-delay: 0.3s; }
.player-visualizer span:nth-child(4) { animation-delay: 0.45s; }
.player-visualizer span:nth-child(5) { animation-delay: 0.6s; }

.player-meta {
  min-width: 0;
}

.player-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-album {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 0.15rem;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.player-ctrl {
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}

.player-ctrl svg {
  width: 1.15rem;
  height: 1.15rem;
}

.player-ctrl:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.player-ctrl--main {
  width: 2.85rem;
  height: 2.85rem;
  background: linear-gradient(135deg, #34d399, #10b981);
  color: #fff;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.45);
}

.player-ctrl--main:hover {
  background: linear-gradient(135deg, #6ee7b7, #34d399);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.6);
}

.music-player.is-playing-audio .player-ctrl--main {
  animation: play-btn-pulse 2s ease-in-out infinite;
}

.player-ctrl--main .icon-pause {
  display: none;
}

.player-ctrl--main.is-playing .icon-play {
  display: none;
}

.player-ctrl--main.is-playing .icon-pause {
  display: block;
}

.player-progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.player-time {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.5);
  font-variant-numeric: tabular-nums;
  min-width: 2.2rem;
}

.player-progress-bar {
  position: relative;
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  overflow: visible;
}

.player-progress-glow {
  position: absolute;
  inset: -4px 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.35), rgba(167, 139, 250, 0.25));
  opacity: 0;
  filter: blur(6px);
  transition: opacity 0.3s;
  pointer-events: none;
}

.music-player.is-playing-audio .player-progress-glow {
  opacity: 1;
  animation: progress-glow-pulse 2s ease-in-out infinite;
}

.player-progress-fill {
  position: relative;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #059669, #34d399, #6ee7b7, #a78bfa);
  background-size: 200% 100%;
  animation: music-shimmer 3s linear infinite;
  box-shadow: 0 0 12px rgba(110, 231, 183, 0.5);
  transition: width 0.1s linear;
}

/* Platform modal */
.platform-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.platform-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.platform-modal-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 2rem 1.75rem 1.75rem;
  border-radius: 1.25rem;
  background: linear-gradient(160deg, rgba(30, 27, 75, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), 0 0 48px rgba(139, 92, 246, 0.15);
  backdrop-filter: blur(20px);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.platform-modal-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6ee7b7, #a78bfa, #38bdf8);
}

.platform-modal.is-open .platform-modal-card {
  transform: translateY(0) scale(1);
}

.platform-modal-close {
  position: absolute;
  top: 0.85rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.platform-modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.platform-modal-label {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.platform-modal-title {
  margin-top: 0.35rem;
  font-size: 1.35rem;
  font-weight: 600;
  color: #fff;
}

.platform-modal-links {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.platform-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1.1rem;
  border-radius: 0.75rem;
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.platform-link:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateX(4px);
}

.platform-link--netease:hover { border-color: rgba(236, 65, 65, 0.5); }
.platform-link--qq:hover { border-color: rgba(49, 194, 124, 0.5); }
.platform-link--kugou:hover { border-color: rgba(0, 144, 255, 0.5); }

.platform-link-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  flex-shrink: 0;
}

.platform-link--netease .platform-link-icon {
  background: linear-gradient(135deg, #ec4141, #c62f2f);
}

.platform-link--qq .platform-link-icon {
  background: linear-gradient(135deg, #31c27c, #1aad6b);
}

.platform-link--kugou .platform-link-icon {
  background: linear-gradient(135deg, #0090ff, #0066cc);
}

.platform-link-arrow {
  margin-left: auto;
  opacity: 0.5;
}

.platform-modal-empty {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.65);
}

.platform-modal-empty code {
  font-size: 0.85em;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.15);
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
}

@media (max-width: 768px) {
  .music-page {
    padding: 2rem 1rem 3rem;
  }

  .music-player-inner {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 0.75rem 1rem 1rem;
  }

  .player-visualizer {
    display: none !important;
  }

  .player-controls {
    justify-content: center;
  }

  .track-badges {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .music-aurora,
  .music-title,
  .music-catalog-title,
  .player-cover-ring,
  .player-visualizer span,
  .player-progress-fill,
  .music-track,
  .music-player.is-playing-audio .player-ctrl--main,
  .music-track.is-playing .track-play-btn {
    animation: none !important;
  }
}

@media (max-width: 640px) {
  .music-track {
    padding: 0.75rem 0.85rem;
  }

  .track-play-btn {
    width: 2.4rem;
    height: 2.4rem;
  }
}

.footer {
  margin-top: auto;
  padding: 3rem 1rem 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--footer-text);
}

body.dark .footer { color: var(--footer-text-dark); }

.footer-lang {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.footer-lang-icon {
  opacity: 0.85;
}

.footer-lang a,
.footer a { color: var(--primary); text-decoration: none; }

.footer-lang a:hover { text-decoration: underline; }

.footer-copyright { margin-top: 0.75rem; opacity: 0.85; }

/* Bio page */
.bio-page {
  position: relative;
  flex: 1;
  padding: 1.25rem 1.5rem 3rem 0.75rem;
  overflow: hidden;
  color: #ffffff;
}

.bio-page-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url("1.webp") center 32% / cover no-repeat;
}

.bio-page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.52) 0%,
    rgba(0, 0, 0, 0.62) 45%,
    rgba(0, 0, 0, 0.72) 100%
  );
}

.bio-card {
  max-width: 1360px;
  margin: 0 auto;
  background: transparent;
  backdrop-filter: none;
  border: none;
  border-radius: 0;
  padding: 1rem 2rem 2rem 10rem;
  box-shadow: none;
}

.bio-header {
  text-align: center;
  margin-bottom: 1.75rem;
  padding-bottom: 0;
  border-bottom: none;
}

.bio-name-cn {
  font-family: "Ma Shan Zheng", "STXingkai", "KaiTi", cursive;
  font-size: clamp(3rem, 8vw, 4.75rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 1.2;
  color: #ffffff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
}

.bio-name-en {
  margin-top: 0.5rem;
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  font-style: italic;
  letter-spacing: 0.14em;
  color: #ffffff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}

.bio-grid {
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
  margin-top: -2rem;
  max-width: 100%;
}

.bio-photo {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  margin: calc(0.5rem - 2cm) 0 0;
  align-self: start;
  justify-self: start;
}

.bio-photo img {
  width: 100%;
  border-radius: 0;
  box-shadow: none;
  object-fit: cover;
  aspect-ratio: 3 / 4;
  display: block;
  background: transparent;
  margin: 0;
}

.bio-content {
  margin: 4.5rem 0 0 0;
  padding: 0 0 0 0.5rem;
  align-self: start;
  max-width: none;
}

.bio-content p {
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  line-height: 2.05;
  margin: 0 0 1.5rem;
  color: #ffffff;
  text-align: justify;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

.bio-content p:last-child { margin-bottom: 0; }

.bio-works {
  margin-top: 1.25rem;
  padding: 0;
  border: none;
  background: transparent;
  font-size: clamp(1.1rem, 2.3vw, 1.4rem);
  line-height: 2;
  color: #ffffff;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

.bio-social {
  margin-top: 0.5rem;
  padding-top: 0;
  border-top: none;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  width: 100%;
}

.bio-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  transition: transform 0.2s, color 0.2s, opacity 0.2s;
  text-decoration: none;
  opacity: 0.92;
}

.bio-social a:hover {
  transform: translateY(-2px);
  background: transparent;
  color: var(--primary);
  opacity: 1;
}

.bio-social svg {
  width: 1.45rem;
  height: 1.45rem;
  fill: currentColor;
}

.bio-social .icon-xhs {
  width: auto;
  min-width: 3.25rem;
  height: 2.75rem;
  padding: 0 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

body:has(.bio-page) .footer {
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

body:has(.bio-page) .footer-lang a {
  color: #6ee7b7;
}

@media (max-width: 768px) {
  .bio-card { padding: 0.5rem 1rem 1.5rem 2rem; }
  .bio-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: -1rem;
  }
  .bio-photo {
    max-width: 480px;
    margin: calc(0.75rem - 2cm) 0 0;
    align-items: flex-start;
  }
  .bio-content {
    margin: 2rem 0 0 0;
    padding: 0;
  }
}

@media (max-width: 1023px) {
  .nav-toggle-label { display: flex; }
  .nav-menu {
    position: absolute;
    top: 3.5rem;
    left: 0;
    right: 0;
    flex-direction: column;
    background: #ffffff;
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: none;
  }
  body.dark .nav-menu { background: #ffffff; color: var(--text); }
  .nav-toggle:checked ~ .nav-menu { display: flex; }
  .navbar { flex-wrap: wrap; position: relative; }
  .nav-actions { order: 2; margin-left: auto; }
  .nav-toggle-label { order: 3; }
  .nav-menu { order: 4; width: 100%; }
}
