:root {
  --bg: #fefefe;
  --card: #ffffff;
  --line: #eee7f4;
  --text-main: #23212b;
  --text-sub: #6f6a7e;
  --brand: #8f63d8;
  --brand-strong: #6f45bc;
  --danger: #cd4a6a;
  --shadow: 0 14px 30px rgba(120, 90, 170, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  position: relative;
  overflow-x: hidden;
  color: var(--text-main);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(165deg, #ffffff 0%, #fffafd 55%, #fff8fc 100%);
}

body.modal-open {
  overflow: hidden;
}

.bg-bubble {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.bg-bubble-a {
  width: 360px;
  height: 360px;
  top: -120px;
  right: -90px;
  background: radial-gradient(circle at 40% 35%, #f0ddff 0%, transparent 70%);
}

.bg-bubble-b {
  width: 380px;
  height: 380px;
  bottom: -170px;
  left: -110px;
  background: radial-gradient(circle at 58% 42%, #ffe4f3 0%, transparent 68%);
}

.bg-bubble-c {
  width: 280px;
  height: 280px;
  top: 35%;
  left: 42%;
  background: radial-gradient(circle at 50% 50%, #f4ebff 0%, transparent 72%);
  transform: translate(-50%, -50%);
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #fffdfd, #fff7fc);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.preloader-card {
  width: min(520px, calc(100vw - 24px));
  padding: 30px 26px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.preloader-brand {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 700;
}

.preloader-card h2 {
  margin: 10px 0 14px;
  font-size: 24px;
  line-height: 1.3;
}

.preloader-bar {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #f4edff;
  border: 1px solid #e6d9f8;
}

.preloader-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, #ea82bf, var(--brand));
  transition: width 0.25s ease;
}

.preloader-text {
  margin: 12px 0 0;
  color: var(--text-sub);
  font-size: 13px;
}

.app-shell {
  --left-width: 300px;
  --right-width: 390px;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--left-width) 10px minmax(0, 1fr) 10px var(--right-width);
  align-items: stretch;
  column-gap: 8px;
  padding: 18px;
  min-height: 100vh;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease, grid-template-columns 0.62s cubic-bezier(0.22, 0.61, 0.36, 1);
}

body.app-ready .app-shell {
  opacity: 1;
  transform: translateY(0);
}

body.left-collapsed .app-shell {
  --left-width: 0px;
  grid-template-columns: 0px 0px minmax(0, 1fr) 10px var(--right-width);
}

.card {
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  padding: 16px;
  min-width: 0;
}

.playlist-panel {
  overflow: hidden;
  min-width: 0;
  transform: translateX(0);
  will-change: width, transform;
  transition:
    width 0.62s cubic-bezier(0.22, 0.61, 0.36, 1),
    padding 0.62s cubic-bezier(0.22, 0.61, 0.36, 1),
    border 0.62s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.62s cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 0.44s ease,
    transform 0.62s cubic-bezier(0.22, 0.61, 0.36, 1);
}

body.left-collapsed .playlist-panel {
  width: 0;
  height: 0;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  box-shadow: none;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transform: translateX(calc(-100% - 34px));
}

.songs-panel,
.player-stage {
  min-width: 0;
}

.col-resizer {
  align-self: stretch;
  justify-self: stretch;
  cursor: col-resize;
  border-radius: 999px;
  background: linear-gradient(180deg, #f4edff, #f6f1fb);
  border: 1px solid #eadff7;
  transition: background-color 0.2s ease;
}

.col-resizer:hover,
.col-resizer.dragging {
  background: linear-gradient(180deg, #ebdcff, #f0e5ff);
}

body.left-collapsed #leftResizer {
  width: 0;
  border-width: 0;
  opacity: 0;
  pointer-events: none;
}

.left-handle-btn {
  position: absolute;
  top: 50%;
  left: calc(var(--left-width) + 14px);
  transform: translate(-50%, -50%);
  z-index: 5;
  width: 30px;
  height: 64px;
  border: 1px solid #dfd0f3;
  border-radius: 999px;
  background: linear-gradient(180deg, #fffefe, #fdf6ff);
  color: var(--brand-strong);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(128, 92, 175, 0.18);
  transition: left 0.62s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.2s ease, box-shadow 0.2s ease;
}

.left-handle-btn:hover {
  transform: translate(-50%, -50%) scale(1.03);
  box-shadow: 0 14px 30px rgba(128, 92, 175, 0.22);
}

body.left-collapsed .left-handle-btn {
  left: 10px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.panel-header h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0.03em;
}

.panel-header p {
  margin: 6px 0 16px;
  color: var(--text-sub);
  font-size: 13px;
}

.panel-toggle-btn {
  padding: 6px 11px;
  font-size: 12px;
}

.section-title {
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--text-sub);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.playlist-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.playlist-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.playlist-item {
  border-radius: 13px;
  border: 1px solid transparent;
  background: #fff;
  padding: 10px 12px;
  transition: all 0.2s ease;
}

.playlist-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.playlist-item:hover {
  transform: translateY(-1px);
  border-color: #e3d6f2;
}

.playlist-item.active {
  border-color: #d5c0f0;
  background: linear-gradient(150deg, #fff, #fbf6ff 70%, #fceefe);
  box-shadow: inset 0 0 0 1px rgba(143, 99, 216, 0.08);
}

.playlist-name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.playlist-count {
  margin: 4px 0 0;
  color: var(--text-sub);
  font-size: 12px;
}

.playlist-actions {
  display: flex;
  gap: 6px;
}

.playlist-action-btn {
  border: 1px solid #e1d2f3;
  background: #fff;
  color: #6c6088;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  cursor: pointer;
}

.playlist-action-btn:hover {
  border-color: #c9b0e8;
}

.playlist-action-btn.danger {
  border-color: #f1ccdb;
  color: #b24e73;
  background: #fff7fb;
}

.upload-panel {
  border-top: 1px dashed var(--line);
  padding-top: 13px;
}

.upload-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 8px;
}

.upload-header .section-title {
  margin: 0;
}

.upload-lock-trigger {
  border: 1px solid #e4d5f4;
  background: linear-gradient(155deg, #fff, #fcf6ff);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  color: #6d6385;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.upload-lock-trigger:hover {
  border-color: #cbb3ea;
}

.upload-lock-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  border: 1px solid #e6daf7;
  background: #f8f1ff;
  color: #8f63d8;
}

.upload-lock-status.unlocked {
  border-color: #d8eedf;
  background: #edf9f1;
  color: #2b7a43;
}

.upload-lock-status.locked {
  border-color: #efd8e4;
  background: #fff1f8;
  color: #b75379;
}

.upload-meta input:focus,
.upload-meta select:focus {
  border-color: #d0b5f2;
  box-shadow: 0 0 0 3px rgba(143, 99, 216, 0.12);
}

.upload-drop {
  border: 1px dashed #d7c4ef;
  border-radius: 15px;
  padding: 14px 12px;
  text-align: center;
  background: linear-gradient(155deg, #ffffff, #fef7ff 72%, #fff4fa);
  transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.upload-drop.drag-over {
  border-color: var(--brand);
  background: linear-gradient(155deg, #fff, #f8f0ff, #ffeef8);
  transform: translateY(-1px);
}

.upload-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.upload-sub {
  margin: 6px 0 10px;
  font-size: 12px;
  color: var(--text-sub);
}

.upload-meta {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.upload-meta label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  color: var(--text-sub);
}

.upload-meta input,
.upload-meta select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text-main);
  outline: none;
}

.selected-files {
  margin: 10px 0 11px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 120px;
  overflow-y: auto;
}

.selected-item {
  padding: 7px 9px;
  font-size: 12px;
  border-radius: 10px;
  border: 1px solid #eadff7;
  background: #fff;
  color: #4a435a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.selected-empty {
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-sub);
  padding: 8px 0;
}

.upload-progress-wrap {
  margin: 0 0 10px;
}

.upload-progress-bar {
  height: 8px;
  border-radius: 999px;
  border: 1px solid #eadff7;
  background: #f6efff;
  overflow: hidden;
}

.upload-progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, #ea82bf, var(--brand));
  transition: width 0.15s ease;
}

.upload-progress-text {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--text-sub);
}

.upload-tip {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--text-sub);
}

.upload-tip.error {
  color: var(--danger);
}

.songs-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.songs-header h2 {
  margin: 0;
  font-size: 24px;
}

.songs-header p {
  margin: 6px 0 0;
  color: var(--text-sub);
  font-size: 13px;
}

.song-list {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: auto;
  min-height: 260px;
  background: #fff;
}

.song-empty {
  margin: 0;
  padding: 30px 16px;
  text-align: center;
  color: var(--text-sub);
}

.song-row {
  display: grid;
  grid-template-columns: 78px 1fr 128px 220px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #f0eaf6;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.song-row:last-child {
  border-bottom: 0;
}

.song-row:hover {
  background: #fdf8ff;
}

.song-row.active {
  background: linear-gradient(155deg, #fff, #faf3ff, #ffeef8);
}

.song-leading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.song-index {
  font-size: 12px;
  color: var(--text-sub);
}

.song-cover {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid #ebdef7;
  background: linear-gradient(150deg, #fff1f8, #f2e9ff);
  flex-shrink: 0;
}

.song-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.song-artist {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--text-sub);
}

.song-album {
  font-size: 12px;
  color: var(--text-sub);
}

.song-action {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.song-play-pill {
  display: inline-block;
  border-radius: 20px;
  border: 1px solid #e5d8f4;
  padding: 5px 10px;
  font-size: 12px;
  color: var(--brand-strong);
}

.song-delete-btn {
  border: 1px solid #e1d2f3;
  background: #fff;
  color: #6c6088;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  cursor: pointer;
}

.song-delete-btn:hover {
  border-color: #c9b0e8;
}

.song-delete-btn.danger {
  border-color: #f1ccdb;
  color: #b24e73;
  background: #fff7fb;
}

.song-upload-btn {
  border: 1px solid #ddcaf5;
  background: #fff;
  color: var(--brand-strong);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  cursor: pointer;
}

.song-upload-btn:hover {
  border-color: #c6a8ea;
  background: #fcf7ff;
}

.player-stage {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.now-playing {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
}

.now-cover {
  width: 92px;
  height: 92px;
  border-radius: 15px;
  object-fit: cover;
  border: 1px solid #eadff8;
  background: linear-gradient(150deg, #ffeef8, #efe5ff);
}

.now-cover-trigger {
  cursor: pointer;
  transition: transform 0.24s ease, box-shadow 0.24s ease, opacity 0.2s ease;
}

.now-cover-trigger:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 10px 22px rgba(84, 53, 129, 0.2);
}

.now-cover-origin-hidden {
  opacity: 0;
}

.meta-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--text-sub);
}

.now-meta h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
}

.now-meta p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-sub);
}

.control-row {
  margin-top: 16px;
  display: flex;
  gap: 10px;
}

.btn {
  border-radius: 999px;
  border: 1px solid #d9c9ef;
  padding: 9px 15px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(132, 88, 185, 0.14);
}

.btn-primary {
  background: linear-gradient(140deg, #eb7fbe 0%, var(--brand) 100%);
  border-color: transparent;
  color: #fff;
}

.btn-soft {
  background: #fff;
  color: var(--brand-strong);
  border-color: #ddcaf5;
}

.btn-ghost {
  background: #fff;
  color: var(--text-main);
}

.progress-wrap {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 8px;
  color: var(--text-sub);
  font-size: 12px;
}

input[type="range"] {
  width: 100%;
  accent-color: #d260a3;
  cursor: pointer;
}

.secondary-controls {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.volume-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-sub);
}

.volume-wrap input {
  width: 110px;
}

.lyrics-card {
  margin-top: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 340px;
  height: 340px;
  max-height: 340px;
  flex: 0 0 340px;
  overflow: hidden;
}

.lyrics-header {
  border-bottom: 1px solid #efe8f6;
  padding: 11px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lyrics-title {
  font-size: 13px;
  color: var(--text-sub);
  font-weight: 700;
}

.lyrics-status {
  font-size: 12px;
  color: #9363d9;
  background: #f6efff;
  border: 1px solid #eadff8;
  border-radius: 999px;
  padding: 2px 8px;
}

.lyrics-container {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 14px 16px;
}

.lyrics-empty {
  margin: 0;
  color: var(--text-sub);
  white-space: pre-wrap;
  word-break: break-word;
}

.lyrics-line {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.7;
  color: #66617a;
  white-space: pre-wrap;
  word-break: break-word;
  transition: color 0.2s ease, transform 0.2s ease;
}

.lyrics-line.active {
  color: #7a47ca;
  font-weight: 700;
  transform: translateX(2px);
}

body.player-overlay-open {
  overflow: hidden;
}

.player-overlay {
  position: fixed;
  inset: 0;
  z-index: 35;
  overflow: hidden;
  pointer-events: none;
}

.player-overlay[hidden] {
  display: none !important;
}

.player-overlay-bg,
.player-overlay-frost,
.player-overlay-content,
.player-overlay-close {
  opacity: 0;
  transition: opacity 0.52s ease;
}

.player-overlay-bg {
  position: absolute;
  inset: -6%;
  background: center / cover no-repeat;
  filter: blur(58px) saturate(1.22) brightness(0.42);
  transform: scale(1.14);
}

.player-overlay-frost {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 18%, rgba(255, 187, 231, 0.15), transparent 46%),
    radial-gradient(circle at 12% 78%, rgba(205, 160, 252, 0.12), transparent 50%),
    linear-gradient(145deg, rgba(24, 12, 35, 0.62), rgba(50, 18, 36, 0.52));
  backdrop-filter: blur(18px);
}

.player-overlay-content {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(260px, 34vw) minmax(0, 1fr);
  gap: clamp(26px, 4vw, 72px);
  align-items: center;
  padding: clamp(34px, 5vw, 64px) clamp(26px, 4.4vw, 72px);
  transform: translateY(12px);
  transition: opacity 0.52s ease, transform 0.52s ease;
}

.player-overlay-left {
  min-width: 0;
}

.player-overlay-cover-wrap {
  width: min(32vw, 430px);
  min-width: 220px;
  max-width: 430px;
  aspect-ratio: 1;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 36px 70px rgba(12, 8, 26, 0.5);
  overflow: hidden;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.36s ease 0.06s, transform 0.44s ease 0.06s;
}

.player-overlay-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-overlay-title {
  margin: clamp(16px, 2.2vw, 24px) 0 0;
  font-size: clamp(30px, 3.8vw, 56px);
  line-height: 1.12;
  color: rgba(255, 255, 255, 0.97);
  text-shadow: 0 10px 24px rgba(12, 8, 24, 0.4);
}

.player-overlay-artist {
  margin: 10px 0 0;
  font-size: clamp(18px, 1.65vw, 28px);
  color: rgba(255, 255, 255, 0.78);
  text-shadow: 0 8px 18px rgba(12, 8, 24, 0.3);
}

.player-overlay-right {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.player-overlay-lyrics-label {
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  letter-spacing: 0.04em;
}

.player-overlay-lyrics-status {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  padding: 3px 10px;
}

.player-overlay-lyrics {
  margin-top: 10px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 34vh 4px 36vh;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.36) transparent;
}

.player-overlay-lyrics::-webkit-scrollbar {
  width: 7px;
}

.player-overlay-lyrics::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
}

.player-overlay-lyric-empty {
  margin: 0;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.75);
}

.player-overlay-lyric-line {
  margin: 0 0 clamp(14px, 1.9vh, 22px);
  color: rgba(255, 255, 255, 0.32);
  font-size: clamp(22px, 2.35vw, 50px);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: 0.01em;
  transition: color 0.25s ease, transform 0.25s ease, filter 0.25s ease;
  word-break: break-word;
}

.player-overlay-lyric-line.passed {
  color: rgba(255, 255, 255, 0.56);
}

.player-overlay-lyric-line.active {
  color: rgba(255, 255, 255, 0.92);
  transform: translateX(5px);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.32));
}

.player-overlay-lyric-char {
  color: inherit;
  transition: color 0.08s linear, text-shadow 0.1s linear;
}

.player-overlay-lyric-line.active .player-overlay-lyric-char {
  color: rgba(255, 255, 255, 0.38);
}

.player-overlay-lyric-line.active .player-overlay-lyric-char.lit {
  color: #ffffff;
  text-shadow: 0 3px 8px rgba(255, 255, 255, 0.2);
}

.player-overlay-close {
  position: absolute;
  top: clamp(18px, 2vw, 30px);
  right: clamp(18px, 2vw, 30px);
  z-index: 3;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.player-overlay-close span {
  transform: translateY(-2px);
}

.player-overlay-close:hover {
  transform: scale(1.06);
  background: rgba(255, 255, 255, 0.2);
}

.player-overlay.is-open {
  pointer-events: auto;
}

.player-overlay.is-open .player-overlay-bg,
.player-overlay.is-open .player-overlay-frost,
.player-overlay.is-open .player-overlay-content,
.player-overlay.is-open .player-overlay-close {
  opacity: 1;
}

.player-overlay.is-open .player-overlay-content {
  transform: translateY(0);
}

.player-overlay.is-open .player-overlay-cover-wrap {
  opacity: 1;
  transform: scale(1);
}

.player-overlay.is-flying .player-overlay-cover-wrap {
  opacity: 0 !important;
  transform: scale(0.98);
}

.player-cover-flyer {
  position: fixed;
  z-index: 72;
  margin: 0;
  pointer-events: none;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 20px 50px rgba(11, 7, 24, 0.45);
  transition:
    left 0.7s cubic-bezier(0.2, 0.73, 0.2, 1),
    top 0.7s cubic-bezier(0.2, 0.73, 0.2, 1),
    width 0.7s cubic-bezier(0.2, 0.73, 0.2, 1),
    height 0.7s cubic-bezier(0.2, 0.73, 0.2, 1),
    border-radius 0.7s cubic-bezier(0.2, 0.73, 0.2, 1),
    opacity 0.22s ease;
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
}

.modal-root[hidden] {
  display: none !important;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(38, 26, 52, 0.34);
  backdrop-filter: blur(2px);
}

.modal-card {
  position: relative;
  width: min(460px, calc(100vw - 26px));
  border-radius: 20px;
  border: 1px solid #eadff7;
  background: linear-gradient(160deg, #ffffff 0%, #fff9fd 72%, #fff6fb 100%);
  box-shadow: 0 26px 56px rgba(63, 41, 97, 0.24);
  padding: 18px 18px 16px;
  animation: modalIn 0.22s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-title {
  margin: 0;
  font-size: 20px;
}

.modal-message {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text-sub);
  white-space: pre-line;
}

.modal-fields {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.modal-field {
  display: grid;
  gap: 6px;
}

.modal-field span {
  font-size: 12px;
  color: var(--text-sub);
}

.modal-field input,
.modal-field textarea {
  width: 100%;
  border: 1px solid #e4d7f4;
  border-radius: 11px;
  padding: 9px 10px;
  font-size: 13px;
  color: var(--text-main);
  background: #fff;
  outline: none;
}

.modal-field textarea {
  min-height: 78px;
  resize: vertical;
}

.modal-field input:focus,
.modal-field textarea:focus {
  border-color: #ceafea;
  box-shadow: 0 0 0 3px rgba(143, 99, 216, 0.12);
}

.modal-file-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #e4d7f4;
  border-radius: 14px;
  padding: 10px 12px;
  background: linear-gradient(160deg, #ffffff 0%, #fff8fd 100%);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.modal-file-wrap:focus-within {
  border-color: #ceafea;
  box-shadow: 0 0 0 3px rgba(143, 99, 216, 0.12);
}

.modal-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.modal-file-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  border: 1px solid #d9c7f0;
  border-radius: 999px;
  padding: 7px 12px;
  background: #fff;
  color: #6e4fb4;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.modal-file-btn:hover {
  border-color: #bfa2e6;
  transform: translateY(-1px);
}

.modal-file-name {
  flex: 1;
  min-width: 0;
  color: #7a7390;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-error {
  margin: 10px 0 0;
  color: #c6466f;
  font-size: 12px;
}

.modal-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.modal-btn {
  border: 1px solid #decef2;
  background: #fff;
  color: #5f5578;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.modal-btn.primary {
  background: linear-gradient(145deg, #eb7fbe, var(--brand));
  border-color: transparent;
  color: #fff;
}

.modal-btn.danger {
  background: linear-gradient(145deg, #ef7ca6, #d45b8b);
  border-color: transparent;
  color: #fff;
}

body.player-fullscreen .app-shell {
  grid-template-columns: minmax(0, 1fr);
}

body.player-fullscreen .playlist-panel,
body.player-fullscreen .songs-panel,
body.player-fullscreen .col-resizer,
body.player-fullscreen .left-handle-btn {
  display: none;
}

body.player-fullscreen .player-stage {
  min-height: calc(100vh - 36px);
}

@media (max-width: 1080px) {
  .player-overlay-content {
    grid-template-columns: 1fr;
    align-items: flex-start;
    overflow-y: auto;
    padding: 58px 20px 20px;
  }

  .player-overlay-left {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
  }

  .player-overlay-cover-wrap {
    width: 132px;
    min-width: 132px;
    border-radius: 18px;
  }

  .player-overlay-title {
    margin: 0;
    font-size: 28px;
  }

  .player-overlay-artist {
    margin-top: 6px;
    font-size: 15px;
  }

  .player-overlay-right {
    width: 100%;
  }

  .player-overlay-lyrics {
    padding: 24vh 2px 30vh;
  }
}

@media (max-width: 640px) {
  .player-overlay-left {
    grid-template-columns: 102px minmax(0, 1fr);
  }

  .player-overlay-cover-wrap {
    width: 102px;
    min-width: 102px;
    border-radius: 14px;
  }

  .player-overlay-title {
    font-size: 22px;
  }

  .player-overlay-artist {
    font-size: 13px;
  }

  .player-overlay-lyric-line {
    font-size: clamp(20px, 8vw, 30px);
  }

  .player-overlay-lyric-empty {
    font-size: 20px;
  }
}

@media (max-width: 1160px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 12px;
  }

  .playlist-panel,
  .songs-panel,
  .player-stage {
    grid-column: 1 / -1;
  }

  .col-resizer,
  .left-handle-btn {
    display: none;
  }

  body.left-collapsed .playlist-panel {
    width: auto;
    padding: 16px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    pointer-events: auto;
  }
}

@media (max-width: 880px) {
  .app-shell {
    padding: 12px;
    gap: 12px;
  }

  .song-row {
    grid-template-columns: 72px 1fr;
  }

  .song-album {
    display: none;
  }

  .song-action {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-left: 44px;
  }

  .control-row .btn {
    flex: 1;
  }

  .upload-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
