﻿@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap");

:root {
  --night-bg: #050505;
  --night-surface: #0e0e10;
  --night-card: #131316;
  --night-line: #232329;
  --night-text: #f7f1ff;
  --night-muted: #9a90bf;
  --night-accent: #9b63ff;
  --night-accent-2: #b580ff;
  --night-accent-3: #ff6bd8;
}

* {
  box-sizing: border-box;
}

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

body.theme-night-apps {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--night-text);
  background: #000;
}

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

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

.night-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(90deg, #7b4de3 0%, #8a4eff 55%, #9b63ff 100%);
  box-shadow: 0 2px 18px rgba(132, 82, 255, 0.35);
}

.night-topbar-inner {
  width: min(100%, 390px);
  height: 42px;
  margin: 0 auto;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
}

.night-topbar-mark {
  position: absolute;
  right: 14px;
  opacity: 0.92;
}

.night-shell {
  width: 100%;
  background: #000;
}

.night-panel {
  width: min(100%, 390px);
  margin: 0 auto;
  padding: 8px 6px 24px;
  background: #050505;
}

.night-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  align-items: center;
  height: 34px;
  margin-bottom: 8px;
  border-bottom: 1px solid #1e1e25;
}

.night-tabs a {
  text-align: center;
  font-size: 11px;
  color: #a28ce8;
  line-height: 33px;
  position: relative;
}

.night-tabs a.active {
  color: #ff8df0;
  font-weight: 700;
}

.night-tabs a.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 28px;
  height: 2px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #ff8fe4, #8d63ff);
}

.night-hero {
  margin-bottom: 8px;
}

.night-hero a,
.night-hero-empty {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  background: #121216;
}

.night-hero img,
.night-hero-empty {
  height: 74px;
  object-fit: cover;
}

.night-hero-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9d90c8;
  font-size: 12px;
}

.night-notice {
  padding: 0 4px 8px;
  color: #c9b8ff;
  font-size: 11px;
  line-height: 1.45;
}

.night-section-head {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 2px 8px;
  color: #bdaaff;
  font-size: 11px;
  font-weight: 700;
}

.night-section-head small {
  color: #7d70a6;
  font-weight: 400;
}

.night-bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff8ce4, #8d63ff);
  box-shadow: 0 0 10px rgba(155, 99, 255, 0.6);
}

.night-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px 6px;
}

.night-grid-card {
  background: transparent;
}

.night-grid-card a {
  display: block;
  text-align: center;
}

.night-grid-icon {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(156, 111, 255, 0.12);
}

.night-grid-name {
  margin-top: 4px;
  color: #fff;
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.night-grid-meta {
  margin-top: 2px;
  color: #8f82b7;
  font-size: 9px;
}

.night-promo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.night-promo-card {
  overflow: hidden;
  border-radius: 8px;
  background: #111116;
  border: 1px solid #1f1f28;
}

.night-promo-card img {
  aspect-ratio: 154 / 174;
  object-fit: cover;
}

.night-list {
  display: grid;
  gap: 10px;
}

.night-list-card {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 10px;
  align-items: stretch;
}

.night-list-cover {
  height: 178px;
  border-radius: 8px;
  object-fit: cover;
  background: #121216;
}

.night-list-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 8px 4px 8px 0;
}

.night-list-title {
  color: #d7c5ff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.night-list-tags {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.night-list-tags span {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(155, 99, 255, 0.18);
  color: #ceb8ff;
  font-size: 9px;
}

.night-list-body p {
  margin: 8px 0 0;
  color: #b5a8da;
  font-size: 10px;
  line-height: 1.55;
}

.night-list-points {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  color: #978abf;
  font-size: 10px;
  line-height: 1.6;
}

.night-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 28px;
  margin-top: auto;
  border-radius: 6px;
  background: linear-gradient(90deg, #8f5bf8 0%, #b06fff 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(143, 91, 248, 0.28);
}

.empty {
  padding: 18px 12px;
  border-radius: 8px;
  background: #121216;
  color: #9c90c0;
  text-align: center;
  font-size: 12px;
}

@media (max-width: 390px) {
  .night-panel {
    padding-left: 4px;
    padding-right: 4px;
  }

  .night-list-card {
    grid-template-columns: 122px 1fr;
    gap: 8px;
  }

  .night-list-cover {
    height: 166px;
  }
}
