:root {
  --vh: 1vh;

  --bg1: #eaf5ff;
  --bg2: #fff4f8;
  --bg3: #f8fbff;

  --card: rgba(255, 255, 255, 0.68);
  --card-strong: rgba(255, 255, 255, 0.86);
  --card-border: rgba(255, 255, 255, 0.92);
  --text: #253247;
  --sub: #6f7c92;
  --muted: #9aa7b7;

  --primary: #6cb6ff;
  --primary2: #ff9fc0;
  --accent: #8e7dff;
  --success: #49c29a;

  --shadow: 0 18px 50px rgba(72, 97, 132, 0.14);
  --shadow-soft: 0 10px 24px rgba(72, 97, 132, 0.10);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

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

html {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: calc(var(--vh) * 100);
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--text);
  font-family: "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(108, 182, 255, 0.28), transparent 32%),
    radial-gradient(circle at bottom right, rgba(255, 159, 192, 0.25), transparent 28%),
    linear-gradient(135deg, var(--bg1) 0%, #f8fbff 40%, #f8fbff 60%, var(--bg2) 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
  filter: blur(30px);
  opacity: 0.5;
  transform: translateZ(0);
}

body::before {
  width: 34vw;
  height: 34vw;
  top: -8vw;
  left: -10vw;
  background: radial-gradient(circle, rgba(108, 182, 255, 0.36), transparent 70%);
}

body::after {
  width: 38vw;
  height: 38vw;
  right: -12vw;
  bottom: -10vw;
  background: radial-gradient(circle, rgba(255, 159, 192, 0.32), transparent 72%);
}

img {
  max-width: 100%;
  display: block;
}

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

.app-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

#pageMask {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.25s ease;
}

#pageMask.show {
  opacity: 1;
}

#mainPage {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: calc(var(--vh) * 100);
  position: relative;
  z-index: 1;
}

.container {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: calc(var(--vh) * 100);
  padding:
    calc(14px + env(safe-area-inset-top))
    16px
    calc(24px + env(safe-area-inset-bottom));
  position: relative;
  z-index: 1;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 13px;
  font-weight: 700;
  color: #52637c;
}

.status-bar::before {
  content: "◌  主页";
  font-size: 12px;
  letter-spacing: 0.5px;
  color: #8091a8;
  font-weight: 600;
}

#top-time {
  font-variant-numeric: tabular-nums;
  color: #38506e;
  letter-spacing: 0.5px;
}

.clocks,
.music-plugin,
.countdown-plugin,
.app,
.modal-content,
.wallpaper-box {
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.clocks {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  margin-bottom: 14px;
  border-radius: var(--radius-xl);
}

.clock {
  flex: 1;
  text-align: center;
  padding: 14px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.clock .label {
  font-size: 11px;
  color: var(--sub);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.clock .time {
  font-size: clamp(18px, 5vw, 25px);
  font-weight: 800;
  letter-spacing: 1px;
  color: #315a93;
  text-shadow: 0 4px 18px rgba(108, 182, 255, 0.14);
  font-variant-numeric: tabular-nums;
}

.layout-wrap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
  align-items: stretch;
}

.music-plugin {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}

.carousel-plugin {
  position: relative;
}

.carousel-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.7s ease;
  overflow: hidden;
}

.carousel-slide.active {
  opacity: 1;
  z-index: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.carousel-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), transparent 42%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.10), transparent 40%);
  pointer-events: none;
}

.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  z-index: 10;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: 0.25s ease;
}

.carousel-dot.active {
  width: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, #fff, #ffd4e4);
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.app {
  text-align: center;
  padding: 14px 8px 12px;
  font-size: 12px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  cursor: pointer;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-width: 0;
  word-break: keep-all;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.app::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.42), transparent 38%),
    linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.02));
  pointer-events: none;
}

.app:active {
  opacity: 0.85;
  transform: scale(0.97);
}

.app:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px rgba(91, 116, 150, 0.14);
}

.app-icon {
  width: clamp(52px, 13vw, 66px);
  height: clamp(52px, 13vw, 66px);
  margin: 0 auto 10px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(20px, 5vw, 26px);
  flex-shrink: 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.88), rgba(255,255,255,0.62));
  border: 1px solid rgba(255,255,255,0.85);
  box-shadow: 0 10px 18px rgba(115, 136, 165, 0.12);
  position: relative;
  z-index: 1;
}

.app:nth-child(1) .app-icon {
  background: linear-gradient(135deg, rgba(108,182,255,0.25), rgba(255,255,255,0.82));
}
.app:nth-child(2) .app-icon {
  background: linear-gradient(135deg, rgba(143,125,255,0.24), rgba(255,255,255,0.82));
}
.app:nth-child(3) .app-icon {
  background: linear-gradient(135deg, rgba(255,159,192,0.24), rgba(255,255,255,0.82));
}
.app:nth-child(4) .app-icon {
  background: linear-gradient(135deg, rgba(73,194,154,0.22), rgba(255,255,255,0.82));
}

.countdown-plugin {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  padding: 14px;
  border-radius: var(--radius-xl);
  justify-content: space-between;
}

.cd-header {
  font-size: 12px;
  color: var(--sub);
  font-weight: 800;
  padding: 4px 4px 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  letter-spacing: 0.2px;
}

.cd-header span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cd-header span:first-child::before {
  content: "✦";
  color: var(--primary2);
  font-size: 12px;
}

.edit-icon {
  cursor: pointer;
  font-size: 14px;
  color: #98a7ba;
  padding: 6px;
  border-radius: 10px;
  transition: 0.2s ease;
  background: rgba(255, 255, 255, 0.3);
}

.edit-icon:active {
  transform: scale(0.92);
}

.cd-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255,255,255,0.75);
  box-shadow: 0 6px 16px rgba(92, 117, 145, 0.07);
  padding: 11px 12px;
  border-radius: 16px;
  margin-bottom: 9px;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.cd-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary), var(--primary2));
  opacity: 0.8;
}

.cd-item:last-child {
  margin-bottom: 0;
}

.cd-info {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #4c5d72;
  font-weight: 600;
  min-width: 0;
}

.cd-icon {
  font-size: 13px;
}

.cd-days {
  font-size: clamp(16px, 4vw, 20px);
  font-weight: 900;
  color: #ff6c9e;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.cd-days span {
  font-size: 10px;
  color: #93a2b6;
  font-weight: 600;
  margin-left: 2px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: calc(var(--vh) * 100);
  background: rgba(255, 255, 255, 0.44);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.modal-content {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 24px;
  padding: 22px;
  width: min(88vw, 340px);
  box-shadow: 0 18px 45px rgba(100, 120, 150, 0.22);
  animation: modalPop 0.28s ease-out;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.modal-title {
  font-size: 16px;
  font-weight: 800;
  color: #ff6b9e;
  text-align: center;
  margin-bottom: 18px;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 7px;
}

.form-group input {
  width: 100%;
  background: #f8fbff;
  border: 1px solid #e6edf6;
  color: #334155;
  padding: 11px 12px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: 0.2s ease;
}

.form-group input:focus {
  border-color: #7ab8ff;
  box-shadow: 0 0 0 4px rgba(108, 182, 255, 0.12);
}

.modal-btns {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.modal-btn {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.modal-btn:active {
  transform: scale(0.97);
}

.btn-cancel {
  background: #eef3f8;
  color: #54657a;
}

.btn-save {
  background: linear-gradient(135deg, #ff84b0, #ff6b9e);
  color: #ffffff;
  box-shadow: 0 10px 18px rgba(255, 107, 158, 0.24);
}

.wallpaper-modal {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: calc(var(--vh) * 100);
  background: rgba(11, 18, 31, 0.48);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  z-index: 10000;
  padding: 20px;
}

.wallpaper-box {
  background: rgba(255, 255, 255, 0.94);
  width: min(88vw, 340px);
  border-radius: 24px;
  padding: 18px;
  position: relative;
  z-index: 10001;
  box-shadow: 0 18px 50px rgba(10, 18, 35, 0.20);
}

.wallpaper-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.wallpaper-header h3 {
  font-size: 16px;
  color: #24364c;
}

.wallpaper-close {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  color: #6c7a8e;
  line-height: 1;
  border-radius: 10px;
  background: #f4f7fb;
  transition: 0.2s ease;
}

.wallpaper-close:active {
  transform: scale(0.94);
}

.wallpaper-preview {
  width: 100%;
  height: 140px;
  border: 1px solid #e9eff6;
  border-radius: 18px;
  background: #f9f9f9;
  background-size: cover;
  background-position: center;
  margin: 10px 0 12px;
  overflow: hidden;
  position: relative;
}

.wallpaper-preview::after {
  content: "预览";
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: #46566b;
  font-size: 12px;
  font-weight: 700;
}

.mask-switch-row {
  margin: 12px 0 10px;
  padding: 11px 12px;
  border-radius: 14px;
  background: #f7faff;
  border: 1px solid #e7eef6;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mask-switch-text {
  font-size: 14px;
  color: #46566b;
  font-weight: 700;
}

.mask-switch {
  position: relative;
  width: 48px;
  height: 26px;
  display: inline-block;
}

.mask-switch input {
  display: none;
}

.mask-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: 0.25s;
}

.mask-slider::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 2px;
  top: 2px;
  background: #ffffff;
  border-radius: 50%;
  transition: 0.25s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.mask-switch input:checked + .mask-slider {
  background: linear-gradient(135deg, #87C4FF, #FFBCD1);
}

.mask-switch input:checked + .mask-slider::before {
  transform: translateX(22px);
}

.wallpaper-btn {
  width: 100%;
  height: 42px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  margin: 7px 0;
  font-size: 14px;
  font-weight: 700;
  transition: 0.2s ease;
}

.wallpaper-btn:active {
  transform: scale(0.98);
}

.btn-upload {
  background: linear-gradient(135deg, #87C4FF, #6cb6ff);
  color: #fff;
  box-shadow: 0 10px 18px rgba(108, 182, 255, 0.22);
}

.btn-reset {
  background: linear-gradient(135deg, #FFBCD1, #ff9fc0);
  color: #333;
  box-shadow: 0 10px 18px rgba(255, 159, 192, 0.18);
}

#wallpaperFile {
  display: none;
}

#musicPage {
  display: none;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: calc(var(--vh) * 100);
  background:
    radial-gradient(circle at top left, rgba(108, 182, 255, 0.15), transparent 32%),
    radial-gradient(circle at bottom right, rgba(255, 159, 192, 0.14), transparent 30%),
    linear-gradient(180deg, #fbfdff 0%, #f5f8fc 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.player-container {
  width: 100%;
  max-width: 460px;
  height: 100vh;
  height: 100dvh;
  height: calc(var(--vh) * 100);
  max-height: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(248,251,255,0.98) 100%);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 50px rgba(135, 196, 255, 0.10);
}

.player-container::before,
.player-container::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(30px);
  opacity: 0.45;
}

.player-container::before {
  width: 180px;
  height: 180px;
  background: rgba(108, 182, 255, 0.22);
  top: -40px;
  left: -40px;
}

.player-container::after {
  width: 220px;
  height: 220px;
  background: rgba(255, 159, 192, 0.18);
  right: -60px;
  bottom: 80px;
}

@media (min-width: 500px) {
  .player-container {
    height: min(90vh, 820px);
    border-radius: 28px;
    margin: 20px 0;
  }
}

.player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding:
    calc(20px + env(safe-area-inset-top))
    22px
    10px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.player-header-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--sub);
  text-transform: uppercase;
  text-align: center;
}

.player-icon-btn {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(220, 231, 242, 0.8);
  border-radius: 14px;
  cursor: pointer;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 8px;
  box-shadow: 0 6px 16px rgba(110, 130, 160, 0.10);
}

.player-icon-btn:hover {
  transform: scale(1.05);
}

.player-icon-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.player-cover-wrapper {
  padding: 18px 24px 18px;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.player-cover {
  width: min(72%, 280px);
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  background: linear-gradient(135deg, #E5F2FF 0%, #FFEEF5 100%);
  box-shadow: 0 18px 42px rgba(135, 196, 255, 0.18);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.92);
}

.player-cover.playing {
  transform: scale(1.03);
  box-shadow: 0 22px 52px rgba(135, 196, 255, 0.28);
}

.player-info-wrapper {
  padding: 0 24px;
  margin-bottom: 22px;
  text-align: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.player-song-title {
  font-size: clamp(20px, 6vw, 25px);
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.4px;
  color: var(--text);
}

.player-song-artist {
  font-size: 15px;
  color: var(--primary);
  font-weight: 600;
}

.player-progress-wrapper {
  padding: 0 24px;
  margin-bottom: 24px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.player-progress-area {
  height: 22px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.player-progress-bar {
  width: 100%;
  height: 6px;
  background: #e8eef6;
  border-radius: 999px;
  position: relative;
  overflow: hidden;
}

.player-progress-current {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary2));
  border-radius: 999px;
  width: 0%;
}

.player-progress-current::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: #fff;
  border: 2px solid var(--primary);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s;
  box-shadow: 0 3px 10px rgba(108, 182, 255, 0.18);
}

.player-progress-area:hover .player-progress-current::after {
  opacity: 1;
}

.player-time-info {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: var(--sub);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.player-controls-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding:
    0
    24px
    calc(26px + env(safe-area-inset-bottom));
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.player-ctrl-btn {
  background: rgba(255,255,255,0.68);
  border: 1px solid rgba(220,231,242,0.85);
  border-radius: 16px;
  cursor: pointer;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  padding: 10px;
  box-shadow: 0 6px 16px rgba(110, 130, 160, 0.10);
}

.player-ctrl-btn:hover {
  transform: scale(1.06);
}

.player-ctrl-btn svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
  stroke: none;
}

.player-play-btn {
  width: clamp(62px, 16vw, 70px);
  height: clamp(62px, 16vw, 70px);
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(108, 182, 255, 0.28);
}

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

.player-play-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 14px 30px rgba(108, 182, 255, 0.35);
}

.player-play-btn svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
  stroke: none;
}

.player-playlist-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: min(68%, 540px);
  background: rgba(255, 255, 255, 0.96);
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  box-shadow: 0 -10px 40px rgba(135, 196, 255, 0.10);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  z-index: 10;
  border-top: 1px solid rgba(220, 231, 242, 0.92);
  overflow: hidden;
}

.player-playlist-overlay.show {
  transform: translateY(0);
}

.player-playlist-header {
  padding: 20px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eef3f8;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.92));
}

.player-playlist-header h3 {
  font-size: 16px;
  font-weight: 800;
  margin: 0;
  color: var(--text);
}

.player-song-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 22px 14px;
  -webkit-overflow-scrolling: touch;
}

.player-song-list::-webkit-scrollbar {
  display: none;
}

.player-list-item {
  display: flex;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #eef3f8;
  cursor: pointer;
  text-align: left;
  transition: padding-left 0.2s, background 0.2s;
  border-radius: 12px;
}

.player-list-item:hover {
  padding-left: 4px;
}

.player-list-item:last-child {
  border-bottom: none;
}

.player-list-item .num {
  font-size: 13px;
  color: var(--sub);
  width: 26px;
  flex-shrink: 0;
  font-weight: 600;
}

.player-list-item .title {
  font-size: 15px;
  color: var(--text);
  flex: 1;
  margin-left: 10px;
  font-weight: 600;
}

.player-list-item.active .num,
.player-list-item.active .title {
  color: var(--primary);
  font-weight: 800;
}

.player-playing-indicator {
  display: none;
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(108, 182, 255, 0.10);
}

.player-list-item.active .player-playing-indicator {
  display: block;
  animation: playerPulse 1.5s infinite;
}

@keyframes playerPulse {
  0% { transform: scale(0.8); opacity: 0.5; }
  50% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.8); opacity: 0.5; }
}

@media (max-width: 380px) {
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .layout-wrap {
    gap: 10px;
  }

  .apps-grid {
    gap: 10px;
  }

  .app-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .app {
    font-size: 10px;
    padding: 12px 4px 10px;
  }

  .cd-item {
    padding: 10px 10px;
  }

  .player-header {
    padding-left: 16px;
    padding-right: 16px;
  }

  .player-cover-wrapper,
  .player-info-wrapper,
  .player-progress-wrapper,
  .player-controls-wrapper {
    padding-left: 18px;
    padding-right: 18px;
  }
}

@media (max-width: 340px), (max-height: 620px) {
  .layout-wrap {
    grid-template-columns: 1fr;
  }

  .music-plugin,
  .countdown-plugin {
    aspect-ratio: auto;
    min-height: 220px;
  }

  .apps-grid {
    min-height: 220px;
  }
}

@media (max-height: 700px) {
  .status-bar {
    margin-bottom: 12px;
  }

  .clocks {
    margin-bottom: 12px;
  }

  .player-header {
    padding-top: calc(14px + env(safe-area-inset-top));
  }

  .player-cover-wrapper {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .player-cover {
    width: min(58%, 230px);
  }

  .player-info-wrapper {
    margin-bottom: 16px;
  }

  .player-progress-wrapper {
    margin-bottom: 16px;
  }

  .player-controls-wrapper {
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  body {
    overflow-y: auto;
  }

  .layout-wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #musicPage {
    overflow-y: auto;
  }

  .player-container {
    min-height: 100dvh;
    height: auto;
  }

  .player-cover {
    width: min(42%, 180px);
  }
}
