:root {
  --wallpaper-url: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: #131320;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow-x: hidden;
  background: radial-gradient(120% 120% at 50% 0%, #ddeafe 0%, #f4f6ff 40%, #ffffff 100%);
}

.background {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: -2;
}

.background::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--wallpaper-url);
  background-size: cover;
  background-position: center;
  filter: saturate(110%) brightness(0.9);
  transform: scale(1.02);
  transition: background-image 0.8s ease;
}

.background::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0.92) 45%, rgba(255, 255, 255, 0.95) 100%);
  backdrop-filter: blur(8px);
}

.orb {
  position: absolute;
  border-radius: 50%;
  opacity: 0.45;
  animation: float 16s ease-in-out infinite;
  z-index: -1;
}

.orb-a {
  width: 540px;
  height: 540px;
  background: radial-gradient(circle at 30% 30%, rgba(104, 214, 255, 0.55), transparent 60%);
  top: -220px;
  left: -180px;
}

.orb-b {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle at 70% 70%, rgba(180, 123, 255, 0.45), transparent 70%);
  bottom: -160px;
  right: -80px;
  animation-delay: -6s;
}

.orb-c {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle at 40% 40%, rgba(255, 179, 107, 0.45), transparent 60%);
  top: 30%;
  right: 18%;
  animation-delay: -10s;
}

@keyframes float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0, -18px, 0) scale(1.03);
  }
}

.hero {
  text-align: center;
  padding: 140px 24px 56px;
  max-width: 780px;
}

.hero .eyebrow {
  letter-spacing: 0.4em;
  font-size: 0.75rem;
  margin-bottom: 16px;
  background: linear-gradient(105deg, #5b21b6 0%, #2563eb 35%, #22d3ee 75%, #f59e0b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gradient-title {
  font-size: clamp(2.6rem, 6vw, 3.8rem);
  font-weight: 600;
  background: linear-gradient(105deg, #5b21b6 0%, #2563eb 35%, #22d3ee 75%, #f59e0b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-emote {
  font-size: 1.2rem;
  font-weight: 400;
  background: linear-gradient(105deg, #5b21b6 0%, #2563eb 35%, #22d3ee 75%, #f59e0b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  margin: 12px 0 4px;
}

.updated {
  margin-top: 18px;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(105deg, #5b21b6 0%, #2563eb 35%, #22d3ee 75%, #f59e0b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .sub {
  margin-top: 20px;
  font-size: 1.05rem;
  color: #485266;
  line-height: 1.75;
}

.content {
  width: min(1120px, 92vw);
  display: flex;
  flex-direction: column;
  gap: 64px;
  padding-bottom: 120px;
}

.module-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.module-header h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 600;
  color: #1f2937;
}

.module-header p {
  margin: 0;
  font-size: 1rem;
  color: #5b6477;
  max-width: 560px;
}

.nav-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.nav-card {
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  padding: 26px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  box-shadow: 0 30px 60px -35px rgba(40, 60, 120, 0.45);
  transition: transform 0.45s ease, box-shadow 0.45s ease, border 0.45s ease;
  backdrop-filter: blur(22px);
}

.nav-card:hover,
.nav-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 36px 60px -28px rgba(40, 60, 120, 0.55);
  border-color: rgba(104, 214, 255, 0.85);
}

.card-body h3 {
  margin: 12px 0 10px;
  font-size: 1.28rem;
}

.card-body p {
  margin: 0;
  color: #5b6477;
  line-height: 1.6;
  font-size: 0.95rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #1d4ed8;
  background: rgba(79, 70, 229, 0.12);
  text-transform: uppercase;
}

.arrow {
  font-size: 1.6rem;
  color: #1d4ed8;
  align-self: center;
  transition: transform 0.4s ease;
}

.nav-card:hover .arrow,
.nav-card:focus-visible .arrow {
  transform: translateX(6px);
}

.media-bar {
  width: min(1120px, 92vw);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  padding: 24px;
  margin: 40px 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 24px 60px -40px rgba(40, 60, 120, 0.55);
  backdrop-filter: blur(16px);
}

.media-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
}

.media-title {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #64748b;
}

.media-track {
  margin: 0;
  font-size: 1rem;
  color: #1f2937;
}

#bgm {
  flex: 1;
  min-width: 240px;
}

.footer {
  padding: 24px 0 48px;
  color: #8b94a6;
  font-size: 0.85rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (max-width: 768px) {
  .hero {
    padding-top: 120px;
  }

  .nav-card {
    padding: 24px;
  }

  .module-header {
    margin-bottom: 22px;
  }
}

/* 彩虹渐变鼠标拖尾 */
.cursor-trail {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  background: radial-gradient(circle, rgba(255, 0, 150, 0.8), rgba(0, 255, 255, 0.6));
  box-shadow: 0 0 20px rgba(255, 0, 150, 0.6), 0 0 40px rgba(0, 255, 255, 0.4);
  animation: fadeOut 0.5s ease-out forwards;
  transform: translate(-50%, -50%);
}

@keyframes fadeOut {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
  }
}

/* 左下角音乐播放器 */
.music-player {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
  transition: all 0.3s ease;
}

.music-player.collapsed {
  width: 80px;
  height: 80px;
}

.music-player.expanded {
  width: 360px;
  max-height: 500px;
}

.player-container {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 24px 60px -40px rgba(40, 60, 120, 0.55);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.player-container.collapsed {
  padding: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  justify-content: center;
  align-items: center;
}

.player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.player-cover {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.player-container.collapsed .player-cover {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  animation: spin 8s linear infinite;
}

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

.player-container.collapsed .player-info {
  display: none;
}

.player-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-artist {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.playback-controls,
.player-utility {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(79, 70, 229, 0.2);
  background: rgba(79, 70, 229, 0.08);
  color: #4338ca;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  padding: 0;
}

.icon-btn.primary {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(79, 70, 229, 0.2);
  border-color: rgba(79, 70, 229, 0.4);
  color: #1d4ed8;
}

.icon-btn .icon {
  width: 20px;
  height: 20px;
}

.icon-btn.primary .icon {
  width: 24px;
  height: 24px;
}

.icon-btn:hover {
  background: rgba(79, 70, 229, 0.18);
  border-color: rgba(79, 70, 229, 0.45);
  color: #1d4ed8;
}

#playPauseBtn .icon-pause {
  display: none;
}

#playPauseBtn.is-playing .icon-play {
  display: none;
}

#playPauseBtn.is-playing .icon-pause {
  display: block;
}

#modeBtn .icon-repeat {
  display: none;
}

#modeBtn.is-sequential .icon-shuffle {
  display: none;
}

#modeBtn.is-sequential .icon-repeat {
  display: block;
}

.player-container.collapsed .player-controls {
  display: none;
}

.toggle-btn {
  background: rgba(79, 70, 229, 0.1);
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.75rem;
  color: #1d4ed8;
  transition: all 0.2s ease;
}

.toggle-btn:hover {
  background: rgba(79, 70, 229, 0.2);
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.player-audio {
  width: 100%;
  height: 32px;
}

.player-container.collapsed .player-audio {
  display: none;
}

.playlist-container {
  max-height: 200px;
  overflow-y: auto;
  display: none;
}

.player-container.expanded .playlist-container {
  display: block;
}

.playlist-item {
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.playlist-item:hover {
  background: rgba(79, 70, 229, 0.1);
}

.playlist-item.active {
  background: rgba(79, 70, 229, 0.15);
  color: #1d4ed8;
}

.playlist-item-cover {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
}

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

.playlist-item-title {
  font-size: 0.85rem;
  font-weight: 500;
  margin: 0 0 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-item-artist {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 520px) {
  .media-bar {
    padding: 20px;
  }

  .media-track {
    font-size: 0.95rem;
  }

  .music-player.expanded {
    width: calc(100vw - 40px);
    max-width: 360px;
  }
}

