/* 缅怀主题：深色典雅、庄重、温润黄金微光 */
:root {
  --bg-main: #0c0d10;
  --bg-card: #15171e;
  --bg-card-hover: #1e212b;
  --accent-gold: #d4af37;
  --accent-gold-soft: rgba(212, 175, 55, 0.25);
  --accent-gold-bright: #f3e5ab;
  --text-main: #f0f0f2;
  --text-muted: #9a9ea8;
  --text-dim: #656975;
  --border-color: rgba(212, 175, 55, 0.2);
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --shadow-main: 0 12px 36px rgba(0, 0, 0, 0.6);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* 顶部柔和环境光 */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 400px;
  background: radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.site-wrap {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 120px 16px;
}

/* 头部 */
.site-header {
  text-align: center;
  margin-bottom: 28px;
  padding: 12px 0;
}

.candle-icon {
  font-size: 2.2rem;
  margin-bottom: 8px;
  display: inline-block;
  filter: drop-shadow(0 0 12px rgba(245, 197, 24, 0.7));
  animation: flicker 3s infinite ease-in-out;
}

@keyframes flicker {
  0%, 100% { opacity: 0.95; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(0.97); }
  75% { opacity: 1; transform: scale(1.02); }
}

.memorial-title {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--accent-gold-bright);
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
  margin-bottom: 6px;
}

.memorial-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* 核心轮播展示大框 */
.stage-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-main);
  margin-bottom: 32px;
}

.stage-frame {
  position: relative;
  width: 100%;
  height: 68vh;
  min-height: 460px;
  max-height: 720px;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-viewport {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.media-viewport img,
.media-viewport video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: opacity 0.5s ease;
  user-select: none;
}

.media-viewport img.fade-in {
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0.2; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.loading-spinner {
  color: var(--text-muted);
  font-size: 1rem;
}

/* 控制按钮 */
.controls-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  pointer-events: none;
}

.nav-btn {
  pointer-events: auto;
  background: rgba(18, 20, 26, 0.65);
  color: var(--accent-gold-bright);
  border: 1px solid rgba(212, 175, 55, 0.3);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(8px);
}

.nav-btn:hover {
  background: rgba(212, 175, 55, 0.3);
  transform: scale(1.1);
  border-color: var(--accent-gold);
}

/* 底部说明 */
.media-caption-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  pointer-events: none;
}

.caption-date {
  font-size: 0.85rem;
  color: var(--accent-gold);
  font-weight: 500;
  margin-bottom: 2px;
}

.caption-title {
  font-size: 1.1rem;
  font-weight: 500;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
  max-width: 70%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.caption-index {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* 工具栏 */
.stage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 6px 4px 6px;
  flex-wrap: wrap;
  gap: 10px;
}

.tool-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.tool-btn:hover,
.tool-btn.active {
  background: var(--accent-gold-soft);
  border-color: var(--accent-gold);
  color: var(--accent-gold-bright);
}

.filter-group {
  display: flex;
  gap: 8px;
}

.filter-chip {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.filter-chip.active,
.filter-chip:hover {
  background: var(--accent-gold);
  color: #000;
  font-weight: 500;
  border-color: var(--accent-gold);
}

/* 缩略图胶卷 */
.filmstrip-section {
  margin-bottom: 36px;
}

.section-title {
  font-size: 1.1rem;
  color: var(--accent-gold-bright);
  font-weight: 500;
  margin-bottom: 14px;
  letter-spacing: 1px;
}

.filmstrip-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.filmstrip-scroll::-webkit-scrollbar {
  height: 6px;
}
.filmstrip-scroll::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.thumb-item {
  flex: 0 0 100px;
  height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 2px solid transparent;
  background: #111;
  transition: var(--transition);
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.65;
  transition: opacity 0.2s;
}

.thumb-item.active {
  border-color: var(--accent-gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.35);
}

.thumb-item.active img,
.thumb-item:hover img {
  opacity: 1;
}

.thumb-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,0.65);
  font-size: 0.65rem;
  padding: 1px 4px;
  border-radius: 3px;
  color: var(--accent-gold-bright);
}

/* 页脚 */
.site-footer {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 32px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.tribute-action {
  margin-top: 16px;
}

.flower-btn {
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--border-color);
  color: var(--accent-gold-bright);
  padding: 10px 24px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: var(--transition);
}

.flower-btn:hover {
  background: var(--accent-gold);
  color: #000;
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.5);
}

/* 悬浮背景音乐盒 */
.music-floating-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  background: rgba(21, 23, 30, 0.88);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-main);
  backdrop-filter: blur(12px);
  border-radius: 40px;
  display: flex;
  align-items: center;
  padding: 6px 16px 6px 8px;
  gap: 12px;
  transition: var(--transition);
}

.music-disc-wrap {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid var(--accent-gold);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.vinyl-disc {
  font-size: 1.1rem;
}

.vinyl-disc.spinning {
  animation: spin 5s linear infinite;
}

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

.music-details {
  display: flex;
  flex-direction: column;
}

.music-track-title {
  font-size: 0.85rem;
  color: var(--accent-gold-bright);
  font-weight: 500;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-track-ctrls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

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

.ctrl-btn:hover {
  color: #fff;
}

.play-pause-btn {
  color: var(--accent-gold);
  font-size: 1.1rem;
}

/* 响应式适配移动端 */
@media (max-width: 768px) {
  .site-wrap {
    padding: 16px 12px 100px 12px;
  }
  .stage-frame {
    height: 52vh;
    min-height: 340px;
  }
  .memorial-title {
    font-size: 1.5rem;
  }
  .caption-title {
    font-size: 0.95rem;
  }
  .nav-btn {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }
  .music-floating-widget {
    bottom: 16px;
    right: 16px;
  }
}
