﻿:root {
  --bg-primary: #0a0814;
  --bg-secondary: #130f24;
  --bg-card: rgba(28, 21, 56, 0.65);
  --primary-purple: #9b5de5;
  --primary-glow: rgba(155, 93, 229, 0.35);
  --accent-gold: #ffd166;
  --text-main: #f8f9fa;
  --text-muted: #a09cb0;
  --border-glass: rgba(255, 255, 255, 0.12);
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(155, 93, 229, 0.4);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-purple);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(circle at top left, #1f1235 0%, var(--bg-primary) 70%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 3D 视差背景（壁纸 + 光晕 + 暗角三层） ---------- */
.bg-3d {
  position: fixed;
  inset: 0;
  z-index: -2;
  perspective: 900px;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg-primary);
}

.bg-3d-layer {
  position: absolute;
  inset: -6%;
  will-change: transform;
}

.bg-3d-photo {
  background: url("../assets/images/bts-wallpaper.jpg") center 32% / cover no-repeat;
  transform: rotateX(var(--tiltX, 0deg)) rotateY(var(--tiltY, 0deg)) scale(1.12);
  transition: transform 0.4s cubic-bezier(0.2, 0.6, 0.3, 1);
  filter: brightness(0.85) saturate(0.92);
  animation: bgDrift 46s ease-in-out infinite alternate;
}

/* 缓慢漂移，让静止页面也有呼吸感 */
@keyframes bgDrift {
  0%   { transform: rotateX(var(--tiltX, 0deg)) rotateY(var(--tiltY, 0deg)) scale(1.12) translate(0, 0); }
  50%  { transform: rotateX(var(--tiltX, 0deg)) rotateY(var(--tiltY, 0deg)) scale(1.15) translate(-1.2%, 0.8%); }
  100% { transform: rotateX(var(--tiltX, 0deg)) rotateY(var(--tiltY, 0deg)) scale(1.12) translate(0.9%, -0.6%); }
}

/* 紫色光晕层：视差幅度比照片大，制造前后景深 */
.bg-3d-glow {
  background:
    radial-gradient(55% 45% at 28% 18%, rgba(155, 93, 229, 0.20), transparent 70%),
    radial-gradient(48% 42% at 76% 72%, rgba(94, 60, 180, 0.18), transparent 70%),
    radial-gradient(40% 35% at 55% 45%, rgba(255, 209, 102, 0.05), transparent 70%);
  transform: translate3d(calc(var(--mx, 0) * 26px), calc(var(--my, 0) * 26px), 0);
  transition: transform 0.5s ease-out;
  mix-blend-mode: screen;
}

/* 暗角层：压暗四周，保证前景文字可读 */
.bg-3d-vignette {
  background:
    linear-gradient(180deg, rgba(10, 8, 20, 0.42) 0%, rgba(10, 8, 20, 0.22) 35%, rgba(10, 8, 20, 0.82) 100%),
    radial-gradient(130% 100% at 50% 40%, transparent 55%, rgba(10, 8, 20, 0.55) 100%);
}

@media (prefers-reduced-motion: reduce) {
  .bg-3d-photo { animation: none; }
}

/* ---------- Home Page ---------- */
.home-body {
  overflow-x: hidden;
}

.home-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  text-align: center;
  padding: 2rem 1.2rem;
  animation: fadeIn 0.8s ease-out;
}

.home-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.home-title {
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  font-weight: 800;
  margin: 0;
  line-height: 1.1;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.55);
}

.home-title span {
  background: linear-gradient(135deg, #c9b8ff, var(--primary-purple) 60%, #7c5cff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.home-tagline {
  max-width: 560px;
  color: #d8d4e8;
  font-size: 1.02rem;
  line-height: 1.6;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

/* 登录卡片 */
.home-login {
  width: min(420px, 92vw);
  background: rgba(20, 14, 40, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 1.6rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  margin-top: 0.6rem;
}

.home-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
  flex: 1;
}

.home-form-group label {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.home-form-group input,
.home-form-group select {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  font-size: 0.92rem;
  outline: none;
  width: 100%;
}

.home-form-group select option {
  background: #1a1430;
  color: #fff;
}

.home-form-group input:focus,
.home-form-group select:focus {
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 3px rgba(155, 93, 229, 0.18);
}

.home-form-row {
  display: flex;
  gap: 0.8rem;
}

.home-enter-btn {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  border: none;
  background: linear-gradient(135deg, var(--primary-purple), #6c4dc4);
  color: #fff;
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.35);
  transition: var(--transition-smooth);
}

.home-enter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(124, 92, 255, 0.5);
}

.home-login-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
}

/* 欢迎回来视图 */
.home-welcome-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-align: left;
}

.home-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-purple), #6c4dc4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.4rem;
  color: #fff;
  flex-shrink: 0;
}

.home-welcome-title {
  margin: 0;
  font-size: 1.05rem;
}

.home-welcome-sub {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.home-switch-link {
  background: none;
  border: none;
  color: #b39dfa;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.home-switch-link:hover {
  color: #d0c6ff;
}

.home-footer a {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.25);
  padding-bottom: 2px;
}

.home-footer a:hover {
  color: #fff;
  border-bottom-color: #fff;
}

@media (max-width: 520px) {
  .home-form-row { flex-direction: column; }
}

/* ---------- Home Page 滚动区 ---------- */
.home-hero {
  position: relative;
  padding-bottom: 4.5rem;
}

.home-scroll-cue {
  position: absolute;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: cueBounce 2.2s ease-in-out infinite;
}

@keyframes cueBounce {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.75; }
  50%      { transform: translate(-50%, 8px); opacity: 1; }
}

.home-features {
  padding: 5rem 1.4rem 3rem;
  max-width: 1060px;
  margin: 0 auto;
}

.home-section-title {
  text-align: center;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin: 0 0 2.6rem;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.home-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.home-feature-card {
  background: rgba(20, 14, 40, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass);
  border-radius: 18px;
  padding: 1.6rem 1.4rem;
  text-align: left;
  transition: var(--transition-smooth);
}

.home-feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary-purple);
  box-shadow: 0 18px 44px rgba(124, 92, 255, 0.25);
}

.home-feature-icon {
  font-size: 1.9rem;
  margin-bottom: 0.7rem;
}

.home-feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.08rem;
  color: #c9b8ff;
}

.home-feature-card p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: #d8d4e8;
}

.home-cta {
  text-align: center;
  padding: 4rem 1.4rem 6rem;
}

.home-cta h2 {
  font-size: clamp(1.7rem, 4.5vw, 2.6rem);
  margin: 0 0 0.6rem;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.home-cta p {
  color: #d8d4e8;
  margin: 0 0 1.8rem;
}

.home-cta-btn {
  display: inline-block;
  padding: 0.9rem 2.2rem;
  font-size: 1.02rem;
  font-weight: 700;
  border-radius: 12px;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-purple), #6c4dc4);
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.35);
  transition: var(--transition-smooth);
}

.home-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(124, 92, 255, 0.5);
}

.home-footer-end {
  padding: 2rem 1rem 2.6rem;
}

.home-footer-end p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* 滚动渐入动画 */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s cubic-bezier(0.2, 0.6, 0.3, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .home-scroll-cue { animation: none; }
}

@media (max-width: 860px) {
  .home-feature-grid { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(19, 15, 36, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--primary-purple);
  text-shadow: 0 0 12px var(--primary-glow);
}

.era-nav ul {
  display: flex;
  list-style: none;
  gap: 0.75rem;
}

.era-nav button {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.88rem;
  transition: var(--transition-smooth);
}

.era-nav button:hover,
.era-nav button.active {
  background: var(--primary-purple);
  color: #fff;
  border-color: var(--primary-purple);
  box-shadow: 0 0 14px var(--primary-glow);
}

.main-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.sidebar {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  padding: 1.25rem;
  border-radius: 16px;
  height: fit-content;
}

.sidebar h2 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.song-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.song-list li {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.92rem;
}

.song-list li:hover {
  background: rgba(255, 255, 255, 0.05);
}

.song-list li.active {
  background: rgba(155, 93, 229, 0.15);
  border-color: rgba(155, 93, 229, 0.35);
  color: #fff;
  font-weight: 600;
}

.stage {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  min-height: 520px;
}

.view-switch {
  display: flex;
  gap: 1.5rem;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.3rem 0;
  position: relative;
  transition: var(--transition-smooth);
}

.tab-btn.active {
  color: #fff;
}

.tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: -0.75rem;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-purple);
  box-shadow: 0 0 10px var(--primary-purple);
}

.slice-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 1.25rem;
}

.slice-viewer {
  position: relative;
  width: 100%;
  height: 380px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-glass);
  background: #000;
}

.slice-viewer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease-in-out;
}

.slice-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 40%, rgba(10,8,20,0.88) 100%);
}

.slice-info {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 2;
}

.location-badge {
  align-self: flex-start;
  background: rgba(155, 93, 229, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--primary-purple);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.caption-text {
  font-size: 1.05rem;
  line-height: 1.5;
  color: #f1f1f1;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.author-tag {
  font-size: 0.8rem;
  color: var(--accent-gold);
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.ctrl-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.ctrl-btn:hover {
  background: var(--primary-purple);
  box-shadow: 0 0 10px var(--primary-glow);
}

.slice-indicators {
  display: flex;
  gap: 0.5rem;
}

.indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: var(--transition-smooth);
}

.indicator-dot.active {
  background: var(--primary-purple);
  width: 22px;
  border-radius: 999px;
  box-shadow: 0 0 8px var(--primary-purple);
}

.upload-trigger-area {
  display: flex;
  justify-content: center;
}

.chat-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 1rem;
  position: relative; /* 供歌词背景定位 */
}

/* ---------- 滚动歌词背景 ---------- */
.lyrics-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent);
}

.lyrics-bg-scroll {
  animation: lyricsScroll 70s linear infinite;
}

@keyframes lyricsScroll {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}

.lyrics-bg p {
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.6;
  color: rgba(179, 157, 250, 0.14);
  text-align: center;
  padding: 1rem 1.2rem;
  white-space: pre-wrap;
  text-shadow: 0 0 24px rgba(124, 92, 255, 0.3);
}

/* 聊天内容浮在歌词背景之上 */
.chat-container > *:not(.lyrics-bg) {
  position: relative;
  z-index: 1;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--border-glass);
}

.room-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #06d6a0;
  border-radius: 50%;
  box-shadow: 0 0 8px #06d6a0;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.heart-cheer-btn {
  background: rgba(155, 93, 229, 0.2);
  border: 1px solid var(--primary-purple);
  color: #fff;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.82rem;
  transition: var(--transition-smooth);
}

.heart-cheer-btn:hover {
  background: var(--primary-purple);
  transform: scale(1.05);
}

.chat-messages {
  flex: 1;
  min-height: 280px;
  max-height: 340px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-right: 0.5rem;
}

/* 聊天室消息布局（气泡式：自己的靠右，别人的靠左带头像） */
.chat-msg {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-msg.mine {
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-purple), #b39dfa);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.msg-body {
  max-width: 78%;
  display: flex;
  flex-direction: column;
}

.chat-msg.mine .msg-body {
  align-items: flex-end;
}

.msg-sender {
  font-size: 0.74rem;
  color: #b39dfa;
  margin-bottom: 0.3rem;
}

.chat-msg.mine .msg-sender {
  color: var(--text-muted);
}

.msg-sender .time-stamp {
  color: var(--text-muted);
  margin-left: 0.4rem;
  font-size: 0.68rem;
}

.msg-bubble {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-glass);
  padding: 0.6rem 0.9rem;
  border-radius: 14px;
  border-top-left-radius: 4px;
}

.chat-msg.mine .msg-bubble {
  background: rgba(124, 92, 255, 0.22);
  border-color: rgba(179, 157, 250, 0.5);
  border-top-left-radius: 14px;
  border-top-right-radius: 4px;
}

.user-text {
  font-size: 0.88rem;
  line-height: 1.45;
  word-break: break-word;
}

.msg-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.3rem;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.msg-ip {
  background: rgba(255, 255, 255, 0.07);
  padding: 0.08rem 0.45rem;
  border-radius: 6px;
}

.chat-msg .reply-btn {
  margin-top: 0;
  padding: 0.05rem 0.2rem;
}

.chat-form {
  display: flex;
  gap: 0.75rem;
}

.chat-form input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  outline: none;
}

.chat-form input:focus {
  border-color: var(--primary-purple);
}

.btn-primary {
  background: var(--primary-purple);
  border: none;
  color: #fff;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  box-shadow: 0 4px 18px rgba(155, 93, 229, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
}

.modal {
  border: none;
  background: transparent;
  padding: 0;
  margin: auto;
  max-width: 500px;
  width: 90%;
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 1.75rem;
  color: var(--text-main);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.form-group label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.form-group-row {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.form-group-row label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-size: 0.85rem;
}

.form-group-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-purple);
}

.form-group input, .form-group textarea {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  font-size: 0.9rem;
  outline: none;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.player-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(10, 8, 20, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-glass);
  position: sticky;
  bottom: 0;
  z-index: 100;
}

.track-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.track-title {
  font-weight: 600;
  color: #fff;
}

.track-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Spotify Embed 播放器 */
.spotify-embed-wrapper {
  flex: 1;
  max-width: 420px;
  min-width: 280px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
}

.spotify-embed-wrapper iframe {
  display: block;
  width: 100% !important;
}

/* Spotify 紧凑播放器固定 80px；QQ 音乐页面较高，按各自 iframe height 属性显示 */
.spotify-embed-wrapper iframe[title="Spotify Player"] {
  height: 80px !important;
}

.spotify-embed-wrapper iframe[title="QQ Music Player"] {
  height: 180px !important;
}

.spotify-embed-wrapper iframe[title="NetEase Player"] {
  height: 86px !important;
}

.spotify-fallback {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  padding: 1rem;
}

/* iTunes 30s 试听回退 */
.itunes-fallback {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
}

.itunes-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

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

/* ---------- 本地音源自定义播放器 ---------- */
.custom-player {
  flex: 1;
  max-width: 420px;
  min-width: 280px;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.play-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-purple), #6c4dc4);
  box-shadow: 0 4px 16px rgba(155, 126, 222, 0.45);
  transition: transform 0.15s, box-shadow 0.2s;
  flex-shrink: 0;
}

.play-circle:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 22px rgba(155, 126, 222, 0.65);
}

.play-circle:active {
  transform: scale(0.95);
}

.player-middle {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.progress-wrap {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  touch-action: none; /* 允许指针拖动 */
}

.progress-bar {
  position: relative;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary-purple), #b39dfa);
  transition: width 0.15s linear;
}

/* 可拖动的进度圆点（悬停/拖动时显示） */
.progress-bar::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px rgba(179, 157, 250, 0.8);
  opacity: 0;
  transition: opacity 0.2s;
}

.progress-wrap:hover .progress-bar::after,
.progress-wrap.dragging .progress-bar::after {
  opacity: 1;
}

.progress-wrap.dragging .progress-bar {
  transition: none; /* 拖动时去掉过渡，跟手 */
}

/* ---------- 登录资料 + 同频房在线状态（本机模拟） ---------- */
.profile-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  padding: 0.3rem 0.9rem 0.3rem 0.3rem;
  cursor: pointer;
  color: #fff;
  transition: var(--transition-smooth);
}

.profile-chip:hover {
  border-color: var(--primary-purple);
  background: rgba(124, 92, 255, 0.15);
}

.profile-chip .avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-purple), #b39dfa);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.profile-meta {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.25;
}

.profile-name { font-size: 0.85rem; font-weight: 600; }
.profile-sub { font-size: 0.68rem; color: var(--text-muted); }

.live-status-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7c5cff;
  box-shadow: 0 0 8px #7c5cff;
  flex-shrink: 0;
  animation: livePulse 1.6s infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.reply-quote {
  font-size: 0.72rem;
  color: var(--text-muted);
  border-left: 2px solid var(--primary-purple);
  padding-left: 0.5rem;
  margin: 0.3rem 0;
  opacity: 0.85;
}

.reply-btn {
  background: none;
  border: none;
  color: #b39dfa;
  font-size: 0.72rem;
  cursor: pointer;
  padding: 0;
  margin-top: 0.25rem;
  display: block;
}

.reply-btn:hover { text-decoration: underline; }

.reply-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #b39dfa;
  background: rgba(124, 92, 255, 0.1);
  border: 1px dashed rgba(179, 157, 250, 0.4);
  border-radius: 8px;
  padding: 0.35rem 0.7rem;
  margin-bottom: 0.5rem;
}

.reply-indicator button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.95rem;
}

/* ---------- Memory slice like button ---------- */
.slice-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.6rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  backdrop-filter: blur(4px);
}

.slice-like-btn:hover {
  background: rgba(124, 92, 255, 0.35);
  transform: scale(1.06);
}

.slice-like-btn.liked {
  background: rgba(124, 92, 255, 0.45);
  border-color: #b39dfa;
  box-shadow: 0 0 12px rgba(124, 92, 255, 0.6);
}

.time-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* QQ 音乐跳转按钮回退 */
.qq-link-fallback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.qq-link-fallback a {
  color: #fff;
  background: var(--primary-purple);
  text-decoration: none;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.qq-link-fallback a:hover {
  filter: brightness(1.15);
}

/* ---------- 切片下方评论面板 ---------- */
.slice-comments-panel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.slice-comments-header {
  font-size: 0.85rem;
  color: var(--text-muted);
  border-bottom: 1px dashed var(--border-glass);
  padding-bottom: 0.45rem;
}

.slice-comments-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 0.3rem;
}

/* ---------- 论坛体评论（楼层） ---------- */
.forum-post {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.75rem 0.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  animation: fadeIn 0.3s ease-out;
}

.forum-post:last-child {
  border-bottom: none;
}

.forum-post.fp-mine {
  background: rgba(124, 92, 255, 0.06);
}

.fp-avatar {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary-purple), #6c4dc4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
}

.fp-main {
  flex: 1;
  min-width: 0;
}

.fp-head {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.25rem;
}

.fp-user {
  font-weight: 600;
  font-size: 0.88rem;
  color: #c9b8ff;
}

.fp-floor {
  font-size: 0.72rem;
  color: var(--primary-purple);
  background: rgba(155, 93, 229, 0.14);
  padding: 0.05rem 0.45rem;
  border-radius: 4px;
}

.fp-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0.8;
}

.fp-content p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-main, #eee);
  word-break: break-word;
  white-space: pre-wrap;
}

.fp-quote {
  font-size: 0.78rem;
  color: var(--text-muted);
  border-left: 2px solid var(--primary-purple);
  padding-left: 0.5rem;
  margin-bottom: 0.35rem;
  opacity: 0.85;
}

.fp-quote b {
  color: #b39dfa;
}

.fp-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.3rem;
}

.fp-ip {
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.6;
}

/* ---------- Group Chats 标签页卡片 ---------- */
.group-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.group-card:hover {
  border-color: var(--primary-purple);
  background: rgba(124, 92, 255, 0.1);
  transform: translateY(-1px);
}

.group-card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-purple), #6c4dc4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.group-card-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  gap: 0.15rem;
}

.group-card-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
}

.group-card-preview {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.group-card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.group-card-online {
  color: #06d6a0;
}

.group-open-btn {
  flex-shrink: 0;
}

/* ---------- 歌词按钮与面板 ---------- */
.lyrics-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.lyrics-toggle:hover {
  color: var(--primary-purple);
  border-color: var(--primary-purple);
}

.lyrics-panel {
  position: fixed;
  right: 24px;
  bottom: 96px;
  width: min(340px, 90vw);
  max-height: 46vh;
  overflow-y: auto;
  background: var(--card-bg, #1a1626);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.2rem 1.4rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  z-index: 200;
}

.lyrics-panel p {
  font-size: 0.88rem;
  line-height: 1.9;
  color: var(--text-muted);
  text-align: center;
}

.lyrics-panel p:first-child {
  color: var(--primary-purple);
}

/* ---------- Lounge Sub-tabs ---------- */
.lounge-subtabs {
  display: flex;
  gap: 1.5rem;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
}

.subtab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.25rem 0;
  position: relative;
  transition: var(--transition-smooth);
}

.subtab-btn.active {
  color: #fff;
}

.subtab-btn.active::after {
  content: "";
  position: absolute;
  bottom: -0.6rem;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-gold);
  box-shadow: 0 0 8px rgba(255, 209, 102, 0.5);
}

/* ---------- Slice Comments Section ---------- */
.comments-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 1rem;
  overflow-y: auto;
  padding-right: 0.3rem;
}

.comments-header {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed var(--border-glass);
}

.comments-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.comments-empty .muted {
  font-size: 0.82rem;
  margin-top: 0.4rem;
  opacity: 0.7;
}

.comment-slice-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.comment-slice-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.comment-slice-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.comment-slice-meta {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.comment-slice-location {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary-purple);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comment-slice-author {
  font-size: 0.75rem;
  color: var(--accent-gold);
}

.comment-count-badge {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  flex-shrink: 0;
}

.comment-slice-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 0.3rem;
}

.no-comments-yet {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 1.5rem 0;
  opacity: 0.7;
}

/* 评论消息复用聊天样式 */
.comment-msg {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  animation: fadeIn 0.3s ease-out;
}

.comment-msg.mine {
  flex-direction: row-reverse;
}

.comment-msg .msg-body {
  max-width: 80%;
}

.comment-msg.mine .msg-body {
  align-items: flex-end;
}

/* 评论表单 */
.comment-form {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.3rem;
}

.comment-form input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  outline: none;
}

.comment-form input:focus {
  border-color: var(--primary-purple);
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
}

/* 邀请入群按钮 */
.invite-btn {
  background: linear-gradient(135deg, var(--primary-purple), #6c4dc4);
  border: none;
  color: #fff;
  padding: 0.2rem 0.6rem;
  border-radius: 8px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.invite-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px var(--primary-glow);
}

.invite-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* 切片评论数徽章（在切片视图上） */
.slice-comments-badge {
  font-size: 0.72rem;
  color: #b39dfa;
  background: rgba(155, 93, 229, 0.15);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  align-self: flex-start;
  margin-top: 0.3rem;
}

.slice-comments-badge.comments-off {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
}

/* ---------- Status Derby（3D 赛马棋） ---------- */
.derby-container {
  flex: 1;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 1.4rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 520px;
  overflow: hidden;
}

.derby-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-bottom: 1px dashed var(--border-glass);
  padding-bottom: 0.7rem;
}

.derby-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #c9b8ff;
}

.derby-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.derby-stage {
  flex: 1;
  position: relative;
  perspective: 1100px;
  overflow: hidden;
  border-radius: 14px;
}

/* 棋盘整体 3D 俯视角 */
.derby-board {
  position: absolute;
  inset: 0;
  transform: rotateX(26deg);
  transform-style: preserve-3d;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding: 0.6rem 0.4rem;
  background:
    linear-gradient(180deg, rgba(20, 14, 40, 0.55), rgba(10, 8, 20, 0.75)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 2px, transparent 2px 48px);
  border-radius: 14px;
  border: 1px solid var(--border-glass);
}

/* 每条赛道 */
.derby-lane {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transform-style: preserve-3d;
}

.derby-team {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 150px;
  flex-shrink: 0;
}

.derby-team-emoji {
  font-size: 1.25rem;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  transform: translateZ(26px);
}

.derby-team-name {
  font-size: 0.82rem;
  color: #d8d4e8;
  transform: translateZ(26px);
}

.derby-team-count {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--text-muted);
  transform: translateZ(26px);
}

.derby-track {
  flex: 1;
  position: relative;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0%, rgba(155, 93, 229, 0.12) 88%, rgba(255, 209, 102, 0.25) 100%);
  border: 1px solid var(--border-glass);
  transform-style: preserve-3d;
}

/* 赛道格子刻度 */
.derby-track::before {
  content: "";
  position: absolute;
  inset: 6px;
  background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 15 - 2px), rgba(255, 255, 255, 0.12) calc(100% / 15 - 2px) calc(100% / 15));
  pointer-events: none;
}

/* 终点线 */
.derby-track::after {
  content: "🏁";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%) translateZ(20px);
  font-size: 0.95rem;
}

/* 棋子 */
.derby-piece {
  position: absolute;
  top: 50%;
  left: 0;
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  transform: translateZ(42px);
  transition: left 0.45s cubic-bezier(0.34, 1.4, 0.5, 1);
  z-index: 2;
}

.derby-piece img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.45), 0 0 14px rgba(155, 93, 229, 0.4);
}

.derby-piece-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  background: linear-gradient(135deg, var(--primary-purple), #6c4dc4);
  border: 2px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.45), 0 0 14px rgba(155, 93, 229, 0.4);
}

/* 跳动动画：走一格时弹跳 */
.derby-piece.hop {
  animation: pieceHop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pieceHop {
  0%   { margin-top: -19px; }
  40%  { margin-top: -44px; }
  70%  { margin-top: -12px; }
  100% { margin-top: -19px; }
}

/* 领先队伍棋子发光 */
.derby-piece.leading img,
.derby-piece.leading .derby-piece-fallback {
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.45), 0 0 22px rgba(255, 209, 102, 0.75);
  border-color: var(--accent-gold);
}

/* 获胜遮罩 */
.derby-winner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 8, 20, 0.55);
  backdrop-filter: blur(4px);
  z-index: 5;
}

/* hidden 属性必须显式生效，否则被上面的 display:flex 覆盖 */
.derby-winner[hidden] {
  display: none !important;
}
  animation: fadeIn 0.4s ease-out;
}

.derby-winner-card {
  text-align: center;
  background: rgba(28, 21, 56, 0.9);
  border: 1px solid var(--accent-gold);
  border-radius: 20px;
  padding: 1.8rem 2.6rem;
  box-shadow: 0 0 50px rgba(255, 209, 102, 0.35);
  animation: winnerPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes winnerPop {
  0%   { transform: scale(0.6) rotateX(30deg); opacity: 0; }
  100% { transform: scale(1) rotateX(0); opacity: 1; }
}

.derby-winner-emoji {
  font-size: 2.6rem;
  margin: 0 0 0.4rem;
}

.derby-winner-text {
  margin: 0;
  font-size: 1.1rem;
}

.derby-winner-text b {
  color: var(--accent-gold);
}

.derby-winner-sub {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.derby-newround-btn {
  margin-top: 1rem;
  padding: 0.55rem 1.4rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-purple), #6c4dc4);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.derby-newround-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(124, 92, 255, 0.45);
}

.derby-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px dashed var(--border-glass);
  padding-top: 0.7rem;
}

.derby-footer b {
  color: #c9b8ff;
}

@media (prefers-reduced-motion: reduce) {
  .derby-piece.hop, .derby-winner-card, .home-scroll-cue { animation: none; }
}

/* ---------- Group Chat Modal ---------- */
.group-chat-modal .modal-box {
  display: flex;
  flex-direction: column;
  max-height: 85vh;
}

.group-members-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--border-glass);
  margin-bottom: 0.5rem;
}

.group-member {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--text-muted);
  position: relative;
}

.group-member.online {
  color: #fff;
  background: rgba(6, 214, 160, 0.15);
  border: 1px solid rgba(6, 214, 160, 0.3);
}

.member-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-purple), #b39dfa);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
}

.member-name {
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #666;
  flex-shrink: 0;
}

.group-member.online .member-dot {
  background: #06d6a0;
  box-shadow: 0 0 6px #06d6a0;
}

/* 群聊内的 chat-messages 复用现有样式 */

@media (max-width: 900px) {
  .main-layout { grid-template-columns: 1fr; padding: 1rem; }
  .sidebar { order: 2; }
  .stage { order: 1; }
  .slice-viewer { height: 280px; }
}

@media (max-width: 600px) {
  .app-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; padding: 1rem; }
  .era-nav ul { overflow-x: auto; width: 100%; padding-bottom: 0.3rem; }
  .player-bar { flex-direction: column; gap: 0.75rem; align-items: flex-start; padding: 1rem; }
}
