/* ==========================================================================
   全局壳层（全站统一暖阳花影系）：门禁、灵动岛导航、歌单黑胶留声机、抽屉与弹窗
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0.015em;
  transition: background-color 0.5s var(--ease-cinema), color 0.4s var(--ease-cinema);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

[hidden] {
  display: none !important;
}

/* 暖阳花影环境光与细腻纸纹 */
.ambient-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 16% 18%, var(--ambient-glow-1), transparent 46%),
    radial-gradient(circle at 84% 24%, var(--ambient-glow-2), transparent 44%),
    radial-gradient(circle at 50% 88%, var(--ambient-glow-3), transparent 50%);
}

.film-grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* ================= 暖阳花境进站门禁（与主站完全统一暖色） ================= */
.unlock-gate {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 75% 22%, rgba(255, 204, 144, 0.48), transparent 45%),
    radial-gradient(circle at 22% 78%, rgba(244, 169, 168, 0.36), transparent 48%),
    linear-gradient(160deg, #fff8f1 0%, #fdede2 52%, #fbe5d6 100%);
  color: var(--text-primary);
  transition: opacity 0.65s var(--ease-cinema), transform 0.65s var(--ease-cinema);
}

.unlock-gate.is-leaving {
  opacity: 0;
  transform: scale(1.03);
  pointer-events: none;
}

.gate-card {
  width: min(560px, 100%);
  padding: 46px 44px 40px;
  border-radius: 30px;
  background: rgba(255, 253, 250, 0.88);
  border: 1px solid rgba(212, 116, 89, 0.28);
  box-shadow: 0 28px 75px rgba(162, 96, 68, 0.16), inset 0 1px 0 #ffffff;
  backdrop-filter: blur(22px);
  text-align: center;
}

.gate-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--accent);
  margin-bottom: 14px;
}
.gate-ornament span {
  width: 56px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 116, 89, 0.55), transparent);
}
.gate-ornament i {
  font-style: normal;
  font-size: 15px;
}

.gate-kicker {
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.gate-title {
  font-family: var(--font-serif-zh);
  font-weight: 600;
  font-size: clamp(32px, 4.4vw, 44px);
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.gate-title em {
  font-family: var(--font-serif-en);
  font-style: italic;
  color: var(--accent);
  padding: 0 6px;
}

.gate-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.gate-identities {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 28px;
}

.identity-Option {
  flex: 1;
  max-width: 185px;
  padding: 16px 12px;
  border-radius: 22px;
  background: rgba(253, 245, 236, 0.7);
  border: 1px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all 0.28s var(--ease-cinema);
}
.identity-Option:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.identity-Option.is-active {
  background: linear-gradient(145deg, rgba(212, 116, 89, 0.14), rgba(255, 236, 219, 0.65));
  border-color: var(--accent);
  box-shadow: 0 10px 26px rgba(212, 116, 89, 0.16);
}

.identity-avatar-ring {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ffe5d4, #fbd3c4);
}
.identity-avatar-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.identity-fallback {
  font-family: var(--font-serif-zh);
  font-size: 22px;
  color: var(--accent-bright);
}
.identity-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}
.identity-tag {
  font-size: 11.5px;
  color: var(--text-muted);
}
.identity-divider {
  color: var(--accent);
  font-size: 18px;
}

.gate-input-wrap {
  display: flex;
  gap: 10px;
  background: #fffcf8;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 6px 6px 6px 20px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.gate-input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(212, 116, 89, 0.12);
}
.gate-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 15px;
  letter-spacing: 0.08em;
}
.gate-input-wrap input::placeholder {
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #df8568, #c96449);
  color: #fffdf9;
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.22s var(--ease-cinema), box-shadow 0.22s;
}
.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(212, 116, 89, 0.34);
}
.btn-gold i {
  font-style: normal;
}

.gate-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding: 0 6px;
  font-size: 12px;
  color: var(--text-muted);
}
.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.checkbox-inline input {
  accent-color: var(--accent);
}
.gate-error {
  margin-top: 12px;
  font-size: 13px;
  color: #c94854;
}

/* ================= 顶部灵动岛导航 ================= */
.app-shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
}

.top-island {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  width: min(1340px, calc(100vw - 36px));
  padding: 9px 14px 9px 18px;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-star {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ffe7d4, #fbd2c4);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 15px;
}
.brand-titles {
  display: flex;
  flex-direction: column;
  line-height: 1.18;
}
.brand-titles strong {
  font-family: var(--font-serif-zh);
  font-size: 14.5px;
  font-weight: 600;
}
.brand-titles small {
  font-size: 11px;
  color: var(--text-muted);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.main-nav::-webkit-scrollbar {
  display: none;
}

.nav-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all 0.25s var(--ease-cinema);
}
.nav-pill:hover {
  color: var(--text-primary);
  background: var(--bg-pill);
}
.nav-pill.is-active {
  color: var(--text-inverse);
  background: linear-gradient(135deg, var(--accent), #e08a67);
  font-weight: 500;
  box-shadow: 0 6px 16px rgba(212, 116, 89, 0.25);
}
.nav-pill .nav-num {
  font-family: var(--font-serif-en);
  font-size: 12px;
  opacity: 0.78;
}
.nav-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 8px var(--rose);
}

.island-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.actor-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 7px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  font-size: 12.5px;
  transition: transform 0.2s;
}
.actor-chip:hover {
  transform: translateY(-1px);
}
.actor-chip img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}
.actor-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
}
.actor-chip small {
  color: var(--accent);
}

.icon-circle-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-pill);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 14px;
  transition: all 0.22s;
}
.icon-circle-btn:hover {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.page-stage {
  padding-top: 86px;
  min-height: 100vh;
}

/* ================= 智能黑胶留声机（带弹出选歌单） ================= */
.vinyl-dock {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 190;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 16px 8px 9px;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  transition: opacity 0.35s, transform 0.35s;
}
.vinyl-dock.is-ducked {
  opacity: 0.68;
}

.vinyl-playlist-popover {
  position: fixed;
  right: 22px;
  bottom: 84px;
  z-index: 195;
  width: 290px;
  max-height: 340px;
  overflow-y: auto;
  padding: 14px;
  border-radius: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(22px);
}
.playlist-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  padding: 0 4px 10px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 8px;
}
.playlist-item-btn {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.playlist-item-btn:hover {
  background: var(--bg-pill);
  color: var(--text-primary);
}
.playlist-item-btn.is-current {
  background: var(--accent-soft);
  color: var(--accent-bright);
  font-weight: 600;
}

.vinyl-disc {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, #5b3c31 0%, #2b1d18 42%, #473028 56%, #241713 100%);
  border: 1.5px solid rgba(212, 116, 89, 0.5);
  position: relative;
  display: grid;
  place-items: center;
  animation: vinylSpin 9s linear infinite;
  animation-play-state: paused;
}
.vinyl-disc.is-spinning {
  animation-play-state: running;
}
.vinyl-center {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f6b894, #d47459);
  color: #fffdf9;
  font-size: 8px;
  display: grid;
  place-items: center;
}

@keyframes vinylSpin {
  to {
    transform: rotate(360deg);
  }
}

.vinyl-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 148px;
}
.vinyl-track-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.vinyl-status-tag {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--accent);
}
.vinyl-track-name {
  font-size: 12px;
  font-weight: 600;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vinyl-controls {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11.5px;
  color: var(--text-secondary);
}
.vinyl-controls button:hover {
  color: var(--accent);
}

/* ================= 抽屉、弹窗与轻提示 ================= */
.drawer-backdrop,
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 320;
  background: rgba(74, 45, 34, 0.32);
  backdrop-filter: blur(8px);
}

.settings-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 330;
  width: min(500px, 94vw);
  background: var(--bg-primary);
  border-left: 1px solid var(--border-strong);
  box-shadow: -20px 0 60px rgba(110, 66, 44, 0.18);
  display: flex;
  flex-direction: column;
}
.drawer-head {
  padding: 24px 26px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-head h2 {
  font-family: var(--font-serif-zh);
  font-size: 21px;
  font-weight: 600;
}
.eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 4px;
  font-weight: 600;
}
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 26px 40px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.modal-backdrop {
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 360;
}
.modal-card {
  width: min(640px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bg-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-soft);
}

.global-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 600;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  border: 1px solid var(--accent-border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
  font-size: 13.5px;
}
.toast-star {
  color: var(--accent);
}

/* 通用表单与按钮 */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 13.5px;
  transition: all 0.22s;
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--accent), #e08a67);
  color: var(--text-inverse);
  font-weight: 600;
  font-size: 13.5px;
  transition: all 0.22s;
}
.btn-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(212, 116, 89, 0.28);
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-group label {
  font-size: 12.5px;
  color: var(--text-secondary);
  font-weight: 500;
}
.field-input,
.field-textarea,
.field-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
}
.field-input:focus,
.field-textarea:focus,
.field-select:focus {
  border-color: var(--accent);
  background: #fffdfb;
}
.field-textarea {
  resize: vertical;
  min-height: 84px;
}
