.phone-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #ececec;
  background-image: url("../默认背景.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.phone-shell::before,
.phone-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.phone-shell::before {
  background:
    radial-gradient(circle at 78% 8%, rgba(204, 223, 255, 0.34), transparent 28%),
    linear-gradient(180deg, rgba(8, 15, 33, 0.16), rgba(19, 13, 42, 0.24));
}

.phone-shell::after {
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.10) 0 1px, transparent 1.5px),
    radial-gradient(circle at 62% 28%, rgba(255, 255, 255, 0.08) 0 1px, transparent 1.5px),
    radial-gradient(circle at 84% 44%, rgba(255, 255, 255, 0.07) 0 1px, transparent 1.5px);
  background-size: 180px 180px, 220px 220px, 260px 260px;
  mix-blend-mode: screen;
}

.dark-mode.mingyue-desktop-night .phone-shell::before {
  opacity: var(--mingyue-night-filter-main-opacity, 0.79);
}

.dark-mode.mingyue-desktop-night .phone-shell::after {
  opacity: var(--mingyue-night-filter-star-opacity, 0.52);
}

.dark-mode.mingyue-desktop-night .phone-shell {
  background-color: #10182d;
}

.status-bar {
  position: relative;
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px 6px;
  min-height: 42px;
  color: #111111;
  text-shadow: none;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: background var(--transition-base);
}

.status-bar__time {
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.status-bar__right {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.status-battery {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111111;
}

.status-battery__text {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(17, 17, 17, 0.85);
}

.status-battery__body {
  position: relative;
  width: 24px;
  height: 12px;
  padding: 2px;
  border: 1.5px solid rgba(24, 24, 24, 0.85);
  border-radius: 4px;
  background: transparent;
}

.status-battery__level {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    #7ed87e 0%,
    #b7ff7a 100%
  );
  transition:
    width var(--transition-base),
    background var(--transition-base);
}

.status-battery--low .status-battery__level {
  background: linear-gradient(
    90deg,
    #ff6b6b 0%,
    #ff8787 100%
  );
  animation: batteryPulse 1.5s ease-in-out infinite;
}

@keyframes batteryPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.status-battery--charging .status-battery__level {
  background: linear-gradient(
    90deg,
    #4ecdc4 0%,
    #7ed8d4 100%
  );
}

.status-battery__cap {
  width: 2px;
  height: 6px;
  margin-left: -3px;
  border-radius: 0 2px 2px 0;
  background: rgba(24, 24, 24, 0.85);
}

.dark-mode.mingyue-desktop-night .status-bar {
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 1px 8px rgba(3, 8, 22, 0.68);
}

.dark-mode.mingyue-desktop-night .status-battery,
.dark-mode.mingyue-desktop-night .status-battery__text {
  color: rgba(255, 255, 255, 0.9);
}

.dark-mode.mingyue-desktop-night .status-battery__body {
  border-color: rgba(255, 255, 255, 0.82);
}

.dark-mode.mingyue-desktop-night .status-battery__cap {
  background: rgba(255, 255, 255, 0.82);
}

.home-screen {
  position: relative;
  z-index: var(--z-base);
  flex: 1 1 auto;
  min-height: 0;
}

@media (max-width: 420px) {
  .status-bar {
    padding: 10px 16px 5px;
    min-height: 38px;
    background: transparent;
  }

  .status-bar__time {
    font-size: 14px;
  }

  .status-battery {
    gap: 5px;
  }

  .status-battery__text {
    font-size: 11px;
  }

  .status-battery__body {
    width: 22px;
    height: 11px;
  }

  .home-screen {
    min-height: 0;
  }
}

@media (min-width: 900px) {
  .status-bar {
    padding: 14px 24px 8px;
    min-height: 46px;
  }

  .status-bar__time {
    font-size: 16px;
  }

  .home-screen {
    min-height: 0;
  }
}

@supports (padding: env(safe-area-inset-top)) {
  .status-bar {
    padding-top: calc(12px + env(safe-area-inset-top));
    padding-left: calc(20px + env(safe-area-inset-left));
    padding-right: calc(20px + env(safe-area-inset-right));
  }
}

@media (prefers-color-scheme: dark) {
  .status-bar {
    background: transparent;
  }

  .status-bar__time {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  }

  .status-battery {
    color: #ffffff;
  }

  .status-battery__text {
    color: rgba(255, 255, 255, 0.9);
  }

  .status-battery__body {
    border-color: rgba(255, 255, 255, 0.8);
  }

  .status-battery__cap {
    background: rgba(255, 255, 255, 0.8);
  }
}

@media (prefers-reduced-motion: reduce) {
  .status-battery--low .status-battery__level {
    animation: none;
  }

  .status-battery__level {
    transition: none;
  }
}
