/* ============================================
   星落拾贰 — 沉浸式星空探索数字作品
   CSS 样式表
   ============================================ */

:root {
  --color-bg: #080814;
  --color-star: #fffef8;
  --color-star-dim: #9e9680;
  --color-constellation: rgba(230, 200, 150, 0.48);
  --color-constellation-hover: rgba(255, 210, 120, 0.92);
  --color-constellation-glow: rgba(255, 170, 70, 0.55);
  --color-accent: #e2b860;
  --color-accent-secondary: #c8a0d8;
  --color-text: #f0ede4;
  --color-text-secondary: #c8c0b0;
  --color-text-muted: #8a8278;
  --color-modal-bg: rgba(14, 12, 20, 0.96);
  --color-modal-border: rgba(200, 170, 110, 0.35);
  --color-modal-overlay: rgba(4, 4, 10, 0.75);
  --color-tag-bg: rgba(200, 160, 100, 0.15);
  --color-tag-text: #d4b878;
  --font-title: "Georgia", "Noto Serif SC", "Source Han Serif SC", serif;
  --font-body: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-glow: 0 0 30px rgba(220, 170, 80, 0.25);
  --shadow-glow-strong: 0 0 60px rgba(220, 170, 80, 0.4);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--color-bg);
  font-family: var(--font-body);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-user-select: none;
  cursor: default;
}

#starfield-canvas {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
}

#constellation-svg {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 3;
  pointer-events: none;
}

#constellation-svg g[data-constellation] {
  pointer-events: auto;
  cursor: pointer;
}

.constellation-line {
  stroke: var(--color-constellation);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  filter: drop-shadow(0 0 2px rgba(220, 180, 100, 0.35));
  transition: stroke var(--transition-fast), stroke-width var(--transition-fast), filter var(--transition-fast);
}

.constellation-star {
  fill: rgba(255, 240, 210, 0.7);
  filter: drop-shadow(0 0 3px rgba(255, 200, 120, 0.5));
  transition: fill var(--transition-fast), r var(--transition-fast), filter var(--transition-fast);
}

.constellation-label {
  fill: var(--color-text-secondary);
  font-family: var(--font-body);
  font-size: 11px;
  text-anchor: start;
  pointer-events: none;
  opacity: 0.55;
  letter-spacing: 0.04em;
  transition: opacity var(--transition-fast), fill var(--transition-fast);
}

.constellation-label-icon {
  color: var(--color-text-secondary);
  opacity: 0.55;
  transition: opacity var(--transition-fast), color var(--transition-fast);
}

g[data-constellation]:hover .constellation-line {
  stroke: var(--color-constellation-hover);
  stroke-width: 2.4;
  filter: drop-shadow(0 0 6px rgba(255, 180, 60, 0.7));
}

g[data-constellation]:hover .constellation-star {
  fill: rgba(255, 235, 180, 0.95);
  r: 3.8;
  filter: drop-shadow(0 0 8px rgba(255, 180, 50, 0.85));
}

g[data-constellation]:hover .constellation-label,
g[data-constellation]:hover .constellation-label-icon {
  opacity: 1;
  fill: var(--color-accent);
  color: var(--color-accent);
}

g[data-constellation].active .constellation-line {
  stroke: var(--color-constellation-hover);
  stroke-width: 2.6;
  filter: drop-shadow(0 0 8px rgba(255, 170, 40, 0.75));
}

g[data-constellation].active .constellation-star {
  fill: rgba(255, 225, 140, 1);
  r: 4.2;
  filter: drop-shadow(0 0 10px rgba(255, 160, 30, 0.9));
}

g[data-constellation].active .constellation-label,
g[data-constellation].active .constellation-label-icon {
  opacity: 1;
  fill: var(--color-accent);
  color: var(--color-accent);
}

/* --- 点击放大动画 --- */
g[data-constellation] {
  transform-origin: center;
  transform-box: fill-box;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

g[data-constellation].burst {
  transform: scale(1.55);
}

.constellation-glow {
  filter: url(#glow-filter);
}

#ui-overlay {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 4;
  pointer-events: none;
}

.header {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 28px 36px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
}

.header-title {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #f0e0c0 0%, #e2b860 40%, #c8a0d8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(220, 170, 80, 0.4));
  line-height: 1.2;
  pointer-events: auto;
  cursor: pointer;
}

.header-subtitle {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  letter-spacing: 0.05em;
  margin-top: 4px;
  font-weight: 400;
}

.header-hint {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  padding: 8px 16px;
  border: 1px solid rgba(200, 170, 110, 0.25);
  border-radius: 20px;
  background: rgba(14, 12, 20, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: auto;
  transition: border-color var(--transition-fast);
}

.header-hint:hover {
  border-color: rgba(200, 170, 110, 0.55);
}

/* --- Wish Canvas --- */
#wish-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* --- Wish Card --- */
.wish-card {
  max-width: 420px;
  width: 88vw;
  padding: 36px 32px 28px;
  text-align: center;
}

.wish-icon {
  margin-bottom: 12px;
}

.wish-icon svg {
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 0 10px rgba(220, 170, 80, 0.5));
  animation: wishPulse 2s ease-in-out infinite;
}

@keyframes wishPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(220, 170, 80, 0.5)); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 18px rgba(240, 200, 100, 0.7)); }
}

.wish-title {
  font-family: var(--font-title);
  font-size: 1.4rem;
  color: var(--color-text);
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.wish-subtitle {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 22px;
}

.wish-input {
  font-family: var(--font-body);
  font-size: 1rem;
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(200, 170, 110, 0.3);
  background: rgba(16, 14, 22, 0.8);
  color: var(--color-text);
  outline: none;
  text-align: center;
  letter-spacing: 0.04em;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.wish-input::placeholder {
  color: rgba(180, 170, 160, 0.4);
}

.wish-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 16px rgba(220, 170, 80, 0.2);
}

.wish-counter {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  text-align: right;
  margin-top: 4px;
  margin-bottom: 0;
  letter-spacing: 0.04em;
}

.wish-submit {
  font-family: var(--font-body);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  padding: 12px 32px;
  border-radius: 24px;
  border: 1px solid rgba(240, 190, 60, 0.4);
  background: rgba(220, 160, 40, 0.15);
  color: #f0c860;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: 16px;
}

.wish-submit:hover {
  background: rgba(220, 160, 40, 0.3);
  box-shadow: 0 0 20px rgba(240, 190, 60, 0.35);
  transform: translateY(-1px);
  color: #ffe8a0;
}

@media (max-width: 640px) {
  .wish-card { padding: 28px 20px 24px; }
  .wish-title { font-size: 1.2rem; }
}

/* ============================================
   实时星象观测
   ============================================ */

.starchart-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #040410;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.starchart-overlay.visible {
  opacity: 1;
  visibility: visible;
}

#starchart-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}

#starchart-canvas:active {
  cursor: grabbing;
}

.starchart-close {
  position: absolute;
  top: 20px; right: 28px;
  z-index: 5;
  width: 44px; height: 44px;
  border: 1px solid rgba(200, 200, 220, 0.2);
  border-radius: 50%;
  background: rgba(8, 8, 18, 0.7);
  color: #aab;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  backdrop-filter: blur(6px);
}

.starchart-close:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(180, 50, 30, 0.5);
}

/* 底部信息栏 */
.starchart-info {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 20px;
  padding: 8px 20px;
  border-radius: 20px;
  background: rgba(8, 8, 18, 0.65);
  border: 1px solid rgba(200, 200, 220, 0.12);
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.starchart-coords,
.starchart-fov,
.starchart-stars {
  font-size: 0.72rem;
  color: rgba(200, 200, 215, 0.7);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* 操作提示 */
.starchart-hint {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 10px;
  pointer-events: none;
  font-size: 0.68rem;
  color: rgba(180, 180, 195, 0.4);
  letter-spacing: 0.04em;
}

.starchart-hint-div {
  opacity: 0.3;
}

@media (max-width: 640px) {
  .starchart-close { top: 12px; right: 14px; width: 36px; height: 36px; }
  .starchart-info { gap: 12px; padding: 6px 14px; bottom: 20px; }
  .starchart-coords, .starchart-fov, .starchart-stars { font-size: 0.65rem; }
  .starchart-hint { bottom: 60px; font-size: 0.6rem; }
}

/* --- Inline SVG Icons --- */
.icon-inline {
  display: inline-block;
  vertical-align: middle;
  margin-top: -1px;
}

/* --- Game Entry Button --- */
.header-game-btn {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  padding: 8px 18px;
  border: 1px solid rgba(200, 170, 110, 0.35);
  border-radius: 20px;
  background: rgba(16, 18, 32, 0.5);
  color: var(--color-accent);
  text-decoration: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: auto;
  transition: all var(--transition-fast);
  margin-left: 8px;
}

.header-game-btn:hover {
  border-color: var(--color-accent);
  background: rgba(40, 35, 25, 0.6);
  box-shadow: 0 0 16px rgba(220, 170, 80, 0.25);
  color: #ffe0a0;
}

.header-zodiac-btn {
  background: rgba(120, 80, 180, 0.2);
  border-color: rgba(160, 120, 220, 0.35);
  color: #c8a8f0;
}

.header-zodiac-btn:hover {
  border-color: #c0a0e0;
  background: rgba(80, 40, 120, 0.5);
  box-shadow: 0 0 16px rgba(160, 100, 220, 0.3);
  color: #e0d0ff;
}

.header-orbit-btn {
  background: rgba(40, 140, 160, 0.2);
  border-color: rgba(80, 180, 200, 0.35);
  color: #80d0e8;
}

.header-orbit-btn:hover {
  border-color: #90d8f0;
  background: rgba(20, 80, 100, 0.5);
  box-shadow: 0 0 16px rgba(60, 180, 210, 0.3);
  color: #c0f0ff;
}

.header-wish-btn {
  background: rgba(220, 160, 40, 0.18);
  border-color: rgba(240, 190, 60, 0.35);
  color: #f0c860;
}

.header-wish-btn:hover {
  border-color: #f0d070;
  background: rgba(180, 120, 20, 0.45);
  box-shadow: 0 0 16px rgba(240, 190, 60, 0.35);
  color: #ffe8a0;
}

.header-starchart-btn {
  background: rgba(30, 60, 120, 0.2);
  border-color: rgba(60, 120, 200, 0.35);
  color: #80b8f0;
}

.header-starchart-btn:hover {
  border-color: #90c8ff;
  background: rgba(20, 50, 100, 0.5);
  box-shadow: 0 0 16px rgba(60, 140, 220, 0.3);
  color: #b0d8ff;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-modal-overlay);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-smooth), visibility var(--transition-smooth);
  pointer-events: auto;
}

.modal-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: var(--color-modal-bg);
  border: 1px solid var(--color-modal-border);
  border-radius: var(--radius-lg);
  padding: 36px 32px 28px;
  max-width: 480px;
  width: 90vw;
  max-height: 82vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-glow-strong);
  transform: translateY(20px) scale(0.96);
  transition: transform var(--transition-smooth);
  scrollbar-width: thin;
  scrollbar-color: rgba(200, 170, 110, 0.3) transparent;
}

.modal-overlay.visible .modal-card {
  transform: translateY(0) scale(1);
}

.modal-card::-webkit-scrollbar { width: 4px; }
.modal-card::-webkit-scrollbar-track { background: transparent; }
.modal-card::-webkit-scrollbar-thumb { background: rgba(200, 170, 110, 0.3); border-radius: 2px; }

.modal-close {
  position: absolute;
  top: 14px; right: 18px;
  width: 36px; height: 36px;
  border: 1px solid rgba(200, 170, 110, 0.3);
  border-radius: 50%;
  background: rgba(14, 12, 20, 0.85);
  color: var(--color-text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  color: #f0e0c0;
  border-color: var(--color-accent);
  background: rgba(40, 35, 25, 0.7);
  box-shadow: 0 0 12px rgba(220, 170, 80, 0.3);
}

/* --- Music Toggle Button --- */
.modal-music-btn {
  position: absolute;
  top: 14px; right: 62px;
  width: 36px; height: 36px;
  border: 1px solid rgba(200, 170, 110, 0.25);
  border-radius: 50%;
  background: rgba(16, 18, 32, 0.8);
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1;
}

.modal-music-btn:hover {
  color: #f0e0c0;
  border-color: var(--color-accent);
  background: rgba(40, 35, 25, 0.7);
  box-shadow: 0 0 12px rgba(220, 170, 80, 0.3);
}

.modal-music-btn.muted {
  border-color: rgba(120, 120, 120, 0.3);
  opacity: 0.5;
}

.modal-music-btn .music-icon-on,
.modal-music-btn .music-icon-off {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.modal-music-btn .music-icon-off { opacity: 0; pointer-events: none; }
.modal-music-btn.muted .music-icon-on { opacity: 0; pointer-events: none; }
.modal-music-btn.muted .music-icon-off { opacity: 1; pointer-events: auto; }

.modal-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(30, 25, 50, 0.95) 0%, rgba(20, 16, 35, 0.9) 100%);
  border: 1px solid rgba(200, 170, 110, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(180, 140, 80, 0.15);
}

/* 星图背景层 */
.modal-icon-bg {
  position: absolute;
  inset: 6px;
  color: rgba(200, 170, 120, 0.35);
  pointer-events: none;
}

.modal-icon-bg svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* 星座符号前景层 */
.modal-icon-fg {
  position: relative;
  z-index: 1;
  color: var(--color-accent);
}

.modal-icon-fg svg {
  width: 38px; height: 38px;
  display: block;
  filter: drop-shadow(0 0 4px rgba(220, 180, 80, 0.6));
}

/* --- Element Color Bar --- */
.modal-element-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  opacity: 0.8;
}

.modal-element-bar.element-fire  { background: linear-gradient(90deg, #e04030, #f08040, #e04030); }
.modal-element-bar.element-earth { background: linear-gradient(90deg, #8a9a40, #b0a860, #8a9a40); }
.modal-element-bar.element-air   { background: linear-gradient(90deg, #c8b060, #e8d880, #c8b060); }
.modal-element-bar.element-water { background: linear-gradient(90deg, #5068b0, #6088d0, #5068b0); }

.modal-name {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-text);
  margin-bottom: 4px;
}

.modal-dates {
  font-size: 0.85rem;
  color: var(--color-accent);
  margin-bottom: 20px;
  letter-spacing: 0.04em;
}

/* --- Modal Constellation Image (3D Tilt) --- */
.modal-image-wrap {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --shine-x: 50%;
  --shine-y: 50%;
  margin-bottom: 20px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(200, 170, 110, 0.2);
  background: rgba(10, 8, 16, 0.5);
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  perspective: 600px;
  transform-style: preserve-3d;
  transition: box-shadow 0.3s ease;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.5),
    0 0 0 rgba(220, 170, 80, 0);
  cursor: pointer;
}

.modal-image-wrap.tilting {
  box-shadow:
    8px 12px 24px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(220, 170, 80, 0.2);
}

/* --- 3D Image Layer --- */
.modal-image-inner {
  width: 100%;
  height: 100%;
  transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out;
  will-change: transform;
}

.modal-image-wrap:hover .modal-image-inner {
  transition: transform 0.1s ease-out;
}

.modal-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: translateZ(20px);
  filter: brightness(0.95);
  transition: filter 0.3s ease;
}

.modal-image-wrap:hover .modal-image {
  filter: brightness(1.08);
}

/* --- Dynamic Shine Overlay --- */
.modal-image-shine {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(
    circle at var(--shine-x) var(--shine-y),
    rgba(255, 255, 255, 0.25) 0%,
    rgba(255, 240, 200, 0.08) 30%,
    transparent 60%
  );
}

.modal-image-wrap:hover .modal-image-shine {
  opacity: 1;
}

/* --- Depth Shadow Layer --- */
.modal-image-shadow {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: var(--radius-md);
  box-shadow:
    inset 0 0 40px rgba(0, 0, 0, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.05);
}

.modal-section { margin-bottom: 18px; }

.modal-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.modal-section-text {
  font-size: 0.92rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  letter-spacing: 0.02em;
}

.modal-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(200, 170, 110, 0.18);
}

.modal-tag {
  font-size: 0.78rem;
  padding: 5px 14px;
  border-radius: 14px;
  background: var(--color-tag-bg);
  color: var(--color-tag-text);
  letter-spacing: 0.03em;
}

.footer {
  position: absolute;
  bottom: 24px; left: 0; right: 0;
  text-align: center;
  pointer-events: none;
}

.footer-text {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
  opacity: 0.5;
}

/* --- Video Overlay --- */
.video-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 2, 8, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.video-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.video-container {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(200, 170, 110, 0.3);
  box-shadow: 0 0 80px rgba(220, 170, 80, 0.3);
  background: #000;
  animation: videoIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes videoIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.video-player {
  display: block;
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.video-close {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  backdrop-filter: blur(4px);
}

.video-close:hover {
  background: rgba(200, 60, 40, 0.7);
  border-color: rgba(255, 100, 80, 0.7);
}

/* 标题触发提示 */
.header-title[title] {
  cursor: pointer;
  transition: text-shadow var(--transition-fast), color var(--transition-fast);
}

.header-title[title]:hover {
  text-shadow: 0 0 30px rgba(220, 180, 80, 0.5), 0 0 60px rgba(220, 170, 80, 0.3);
}

@media (max-width: 640px) {
  .video-container { max-width: 96vw; }
  .video-player { max-height: 60vh; }
}

/* --- Zodiac Checker --- */
.zodiac-card {
  max-width: 460px;
  width: 90vw;
  padding: 36px 32px 32px;
  text-align: center;
}

.zodiac-icon {
  font-size: 3rem;
  margin-bottom: 8px;
}

.zodiac-title {
  font-family: var(--font-title);
  font-size: 1.5rem;
  color: var(--color-text);
  margin-bottom: 6px;
  letter-spacing: 0.06em;
}

.zodiac-subtitle {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.zodiac-form {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 20px;
}

.zodiac-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.zodiac-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  font-weight: 600;
}

.zodiac-select {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 10px 36px 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(200, 170, 110, 0.3);
  background: rgba(16, 14, 22, 0.8);
  color: var(--color-text);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c8c0b0' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  min-width: 120px;
  transition: border-color var(--transition-fast);
}

.zodiac-select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 12px rgba(220, 170, 80, 0.2);
}

.zodiac-submit {
  font-family: var(--font-body);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  padding: 12px 32px;
  border-radius: 24px;
  border: 1px solid var(--color-accent);
  background: rgba(220, 170, 80, 0.12);
  color: var(--color-accent);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: 4px;
}

.zodiac-submit:hover {
  background: rgba(220, 170, 80, 0.25);
  box-shadow: 0 0 20px rgba(220, 170, 80, 0.3);
  transform: translateY(-1px);
}

.zodiac-retry {
  margin-top: 20px;
  border-color: rgba(200, 170, 110, 0.3);
  background: rgba(200, 170, 110, 0.06);
  color: var(--color-text-secondary);
  font-size: 0.82rem;
  padding: 10px 24px;
}

.zodiac-error {
  font-size: 0.8rem;
  color: #e06040;
  margin-top: 10px;
  min-height: 20px;
}

/* Result */
.zodiac-result-panel {
  animation: fadeUp 0.4s ease;
}

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

.zodiac-result-icon {
  font-size: 3.5rem;
  margin-bottom: 6px;
  animation: iconBounce 0.6s ease;
}

@keyframes iconBounce {
  0% { transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.zodiac-result-element {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  padding: 4px 14px;
  border-radius: 14px;
  margin-bottom: 10px;
  font-weight: 600;
}

.zodiac-result-element.el-fire  { background: rgba(240, 100, 60, 0.2);  color: #f09070; }
.zodiac-result-element.el-earth { background: rgba(160, 180, 80, 0.2);  color: #b8c870; }
.zodiac-result-element.el-air   { background: rgba(200, 180, 100,0.2);  color: #e0d090; }
.zodiac-result-element.el-water { background: rgba(80, 120, 200, 0.2);  color: #90b0e0; }

.zodiac-result-name {
  font-family: var(--font-title);
  font-size: 1.4rem;
  color: var(--color-text);
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.zodiac-result-dates {
  font-size: 0.82rem;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.zodiac-result-divider {
  width: 48px;
  height: 1px;
  background: rgba(200, 170, 110, 0.3);
  margin: 0 auto 16px;
}

.zodiac-result-intro {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  max-width: 360px;
  margin: 0 auto 16px;
}

.zodiac-result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.zodiac-tag {
  font-size: 0.76rem;
  padding: 4px 12px;
  border-radius: 14px;
  background: var(--color-tag-bg);
  color: var(--color-tag-text);
  letter-spacing: 0.03em;
}

.zodiac-tag.tag-fire  { background: rgba(240, 100, 60, 0.15);  color: #f09070; }
.zodiac-tag.tag-earth { background: rgba(160, 180, 80, 0.15);  color: #b8c870; }
.zodiac-tag.tag-air   { background: rgba(200, 180, 100,0.15);  color: #e0d090; }
.zodiac-tag.tag-water { background: rgba(80, 120, 200, 0.15);  color: #90b0e0; }

@media (max-width: 640px) {
  .zodiac-card { padding: 28px 20px 24px; }
  .zodiac-form { flex-direction: column; align-items: center; gap: 12px; }
  .zodiac-select { min-width: 200px; }
  .zodiac-result-icon { font-size: 2.8rem; }
}

/* ============================================
   360° 星座观测模式
   ============================================ */

/* --- Overlay --- */
.orbit-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(4, 4, 12, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbit-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.orbit-close {
  position: absolute;
  top: 20px; right: 28px;
  z-index: 5;
  width: 44px; height: 44px;
  border: 1px solid rgba(200, 200, 220, 0.25);
  border-radius: 50%;
  background: rgba(10, 10, 18, 0.7);
  color: #c8c8d8;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  backdrop-filter: blur(6px);
}

.orbit-close:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(200, 60, 40, 0.5);
}

/* --- Selector --- */
.orbit-selector {
  text-align: center;
  padding: 40px 20px;
}

.orbit-selector-title {
  font-family: var(--font-title);
  font-size: 1.5rem;
  color: var(--color-text);
  letter-spacing: 0.06em;
  margin-bottom: 32px;
}

.orbit-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 16px;
}

.orbit-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(200, 180, 150, 0.15);
  background: rgba(16, 14, 22, 0.6);
  cursor: pointer;
  transition: all 0.25s ease;
  color: var(--color-text-secondary);
}

.orbit-grid-item:hover {
  transform: translateY(-4px);
  border-color: rgba(220, 180, 100, 0.4);
  background: rgba(30, 24, 16, 0.7);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.orbit-grid-item.el-fire:hover  { border-color: rgba(240,120,70,0.5);  box-shadow: 0 8px 24px rgba(240,80,40,0.2); }
.orbit-grid-item.el-earth:hover { border-color: rgba(160,180,80,0.5);  box-shadow: 0 8px 24px rgba(140,160,60,0.2); }
.orbit-grid-item.el-air:hover   { border-color: rgba(210,190,100,0.5); box-shadow: 0 8px 24px rgba(200,170,80,0.2); }
.orbit-grid-item.el-water:hover { border-color: rgba(80,130,210,0.5);  box-shadow: 0 8px 24px rgba(60,100,180,0.2); }

.orbit-grid-icon { font-size: 2rem; }
.orbit-grid-sym  { font-size: 1.1rem; color: var(--color-accent); }
.orbit-grid-name { font-size: 0.78rem; letter-spacing: 0.04em; }

/* --- View --- */
.orbit-view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}

#orbit-canvas {
  flex: 1;
  width: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}

#orbit-canvas:active {
  cursor: grabbing;
}

.orbit-info {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  z-index: 2;
}

.orbit-info-name {
  font-family: var(--font-title);
  font-size: 1.6rem;
  color: var(--color-text);
  letter-spacing: 0.08em;
  text-shadow: 0 0 24px rgba(220, 170, 80, 0.5);
}

.orbit-info-element {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  padding: 3px 12px;
  border-radius: 12px;
  font-weight: 600;
}

.orbit-info-element.el-fire  { background: rgba(240,100,60,0.2);  color: #f09070; }
.orbit-info-element.el-earth { background: rgba(160,180,80,0.2);  color: #b8c870; }
.orbit-info-element.el-air   { background: rgba(200,180,100,0.2); color: #e0d090; }
.orbit-info-element.el-water { background: rgba(80,120,200,0.2);  color: #90b0e0; }

.orbit-back-btn {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  padding: 10px 24px;
  border-radius: 24px;
  border: 1px solid rgba(200, 170, 110, 0.3);
  background: rgba(14, 12, 20, 0.7);
  color: var(--color-text-secondary);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all var(--transition-fast);
}

.orbit-back-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-text);
  background: rgba(30, 24, 16, 0.8);
}

.orbit-hint-text {
  position: absolute;
  bottom: 88px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
  font-size: 0.72rem;
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
  opacity: 0.5;
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .orbit-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .orbit-grid-item { padding: 14px 8px 12px; }
  .orbit-grid-icon { font-size: 1.5rem; }
  .orbit-grid-sym { font-size: 0.9rem; }
  .orbit-grid-name { font-size: 0.7rem; }
  .orbit-selector-title { font-size: 1.2rem; }
  .orbit-close { top: 12px; right: 14px; width: 36px; height: 36px; }
  .orbit-info-name { font-size: 1.2rem; }
}

@keyframes hintPulse {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

@media (max-width: 640px) {
  .header { padding: 20px 20px 0; flex-direction: column; gap: 12px; }
  .header-title { font-size: 1.4rem; }
  .header-subtitle { font-size: 0.75rem; }
  .header-hint { font-size: 0.7rem; padding: 6px 12px; }
  .header-game-btn { font-size: 0.7rem; padding: 6px 14px; }
  .header-zodiac-btn { font-size: 0.7rem; padding: 6px 14px; }
  .header-orbit-btn { font-size: 0.7rem; padding: 6px 14px; }
  .header-wish-btn { font-size: 0.7rem; padding: 6px 14px; }
  .header-starchart-btn { font-size: 0.7rem; padding: 6px 14px; }
  .modal-card { padding: 28px 20px 22px; max-width: 94vw; border-radius: var(--radius-md); }
  .modal-name { font-size: 1.3rem; }
  .modal-section-text { font-size: 0.85rem; }
  .modal-image-wrap { aspect-ratio: 4 / 3; perspective: 400px; }
  .modal-image { transform: translateZ(12px); }
  .modal-music-btn { top: 10px; right: 52px; width: 32px; height: 32px; font-size: 0.8rem; }
}
