/* ============ XMac.App · Aurora Glass Theme ============ */
:root {
  --bg: #070b1a;
  --fg: #e7ecff;
  --muted: #8b93b8;
  --card: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.12);
  --a1: #6366f1;
  --a2: #06b6d4;
  --grad: linear-gradient(90deg, var(--a1), var(--a2));
  --r: 18px;
  --mw: 680px;
}
* {
  margin: 0;
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  background: var(--bg);
  color: var(--fg);
  font:
    15px/1.65 -apple-system,
    "SF Pro SC",
    "PingFang SC",
    "Hiragino Sans GB",
    "Helvetica Neue",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(
      600px 400px at 15% -5%,
      rgba(99, 102, 241, 0.35),
      transparent 60%
    ),
    radial-gradient(
      700px 500px at 90% 10%,
      rgba(6, 182, 212, 0.25),
      transparent 60%
    ),
    radial-gradient(
      500px 400px at 50% 110%,
      rgba(168, 85, 247, 0.2),
      transparent 60%
    );
  background-attachment: fixed;
}
.wrap {
  width: 100%;
  max-width: var(--mw);
  margin: 0 auto;
  padding: 0 24px;
}
a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}
::selection {
  background: rgba(99, 102, 241, 0.5);
}

/* inline svg icons */
.ic {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.14em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(7, 11, 26, 0.6);
  border-bottom: 1px solid var(--line);
}
.nav-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  font-size: 20px;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.logo span {
  color: var(--fg);
  -webkit-text-fill-color: var(--fg);
}
.menu {
  display: flex;
  gap: 22px;
  font-size: 13px;
  color: var(--muted);
}
.menu a:hover,
.menu a.active {
  color: #fff;
}
.menu a.active {
  text-shadow: 0 0 16px rgba(6, 182, 212, 0.6);
}

/* ---------- hero ---------- */
.hero {
  padding: 72px 0 40px;
  text-align: center;
  flex-shrink: 0;
}
.slogan {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.slogan em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding: 0 2px;
}
.sub {
  color: var(--muted);
  margin: 12px 0 28px;
  line-height: 1.8;
}
.search {
  display: flex;
  max-width: 520px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.search input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: 0;
  color: var(--fg);
  padding: 10px 18px;
  font-size: 15px;
  font-family: inherit;
}
.search input::placeholder {
  color: var(--muted);
}
.search button {
  border: 0;
  border-radius: 999px;
  padding: 0 26px;
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 24px rgba(99, 102, 241, 0.5);
}
.search button:hover {
  filter: brightness(1.12);
}
.hot-tags {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  font-size: 12px;
}
.ht-label {
  color: var(--muted);
}
.hot-tags a {
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: #c3cbea;
  transition: 0.2s;
}
.hot-tags a:hover {
  border-color: var(--a2);
  color: #fff;
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.4);
}

/* ---------- main ---------- */
.main {
  padding: 10px 0 56px;
  flex: 1 0 auto;
}

/* ---------- ad ---------- */
.ad-slot {
  margin: 16px 0;
  text-align: center;
  overflow: hidden;
}

/* ---------- app rows ---------- */
.apps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 18px auto;
  width: 100%;
  max-width: 680px;
}
.app-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: 0.25s;
  width: 100%;
  max-width: 680px;
  box-sizing: border-box;
}
.app-row:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 10px 40px rgba(99, 102, 241, 0.25);
}
.app-ic {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--g1, #3b82f6), var(--g2, #8b5cf6));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 4px 16px rgba(0, 0, 0, 0.4);
}
.app-row:nth-child(6n + 1) .app-ic {
  --g1: #3b82f6;
  --g2: #8b5cf6;
}
.app-row:nth-child(6n + 2) .app-ic {
  --g1: #06b6d4;
  --g2: #3b82f6;
}
.app-row:nth-child(6n + 3) .app-ic {
  --g1: #a855f7;
  --g2: #ec4899;
}
.app-row:nth-child(6n + 4) .app-ic {
  --g1: #f59e0b;
  --g2: #ef4444;
}
.app-row:nth-child(6n + 5) .app-ic {
  --g1: #10b981;
  --g2: #06b6d4;
}
.app-row:nth-child(6n + 6) .app-ic {
  --g1: #64748b;
  --g2: #334155;
}
.app-main {
  flex: 1;
  min-width: 0;
}
.app-title {
  font-weight: 600;
  word-break: break-word;
}
.app-title:hover {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.app-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.app-meta time {
  display: flex;
  align-items: center;
  gap: 5px;
}
.chip {
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  font-size: 11px;
}
.dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted);
}
.app-side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--grad);
  color: #fff;
}
.src {
  display: flex;
  gap: 8px;
  font-size: 14px;
}
.src span {
  display: grid;
  place-items: center;
  color: var(--a2);
}
.src span:hover {
  color: #fff;
}

/* search highlight (mark.js) */
.mk-hl {
  background: rgba(6, 182, 212, 0.35);
  color: #fff;
  border-radius: 4px;
  padding: 0 3px;
}

/* ---------- empty ---------- */
.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin: 18px 0;
}
.empty strong {
  color: #fff;
}

/* ---------- list head ---------- */
.list-head h2 {
  font-weight: 600;
  font-size: 17px;
  margin: 8px 0 2px;
}
.list-head em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

/* ---------- pager ---------- */
.pager {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin: 26px 0;
  flex-wrap: wrap;
}
.pg {
  min-width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  background: var(--card);
  padding: 0 10px;
}
.pg:hover {
  color: #fff;
  border-color: var(--a1);
}
.pg.active {
  background: var(--grad);
  color: #fff;
  border: 0;
}
.pg.gap {
  border: 0;
  background: none;
  color: #4c5478;
}
.pg.disabled {
  color: #3b4260;
  pointer-events: none;
  border-color: transparent;
  background: none;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: 0;
  transition: 0.2s;
}
.btn.primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 6px 28px rgba(99, 102, 241, 0.45);
}
.btn.primary:hover {
  filter: brightness(1.12);
}
.btn.ghost {
  border: 1px solid var(--line);
  color: var(--fg);
  background: var(--card);
  backdrop-filter: blur(10px);
}
.btn.ghost:hover {
  border-color: var(--a2);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.3);
}

/* ---------- detail ---------- */
.detail {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 30px;
  margin: 18px 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.d-title {
  font-size: 23px;
  font-weight: 800;
  text-align: center;
  line-height: 1.4;
  word-break: break-word;
}
.d-info {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px 36px;
  margin: 24px 0;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.d-item {
  text-align: center;
}
.d-item .k {
  display: block;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.d-item .k svg {
  margin-right: 4px;
  color: var(--a2);
}
.d-item .v {
  font-size: 15px;
  font-weight: 600;
}
.d-btns {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.d-help {
  text-align: right;
  margin-top: 12px;
  font-size: 12.5px;
}
.d-help a {
  color: var(--a2);
}
.d-help a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ---------- markdown content ---------- */
.content {
  color: #c3cbea;
  font-size: 15px;
  line-height: 1.75;
}
.content h1,
.content h2,
.content h3,
.content h4 {
  color: #fff;
  font-weight: 700;
  margin: 28px 0 12px;
  line-height: 1.3;
}
.content h1 {
  font-size: 24px;
}
.content h2 {
  font-size: 20px;
}
.content h3 {
  font-size: 17px;
}
.content h4 {
  font-size: 15px;
}
.content p {
  margin: 12px 0;
}
.content a {
  color: var(--a2);
}
.content a:hover {
  color: #fff;
  text-decoration: underline;
}
.content ul,
.content ol {
  padding-left: 24px;
  margin: 12px 0;
}
.content li {
  margin: 6px 0;
}
.content li::marker {
  color: var(--a1);
}
.content blockquote {
  border-left: 3px solid var(--a1);
  background: rgba(99, 102, 241, 0.08);
  padding: 12px 18px;
  margin: 16px 0;
  border-radius: 0 12px 12px 0;
  color: #aeb6d8;
}
.content code {
  font:
    13px/1.5 "SF Mono",
    Menlo,
    Consolas,
    monospace;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  color: #dbe2ff;
}
.content pre {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  overflow-x: auto;
  margin: 16px 0;
}
.content pre code {
  background: none;
  border: 0;
  padding: 0;
}
.content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin: 16px 0;
  border-radius: 12px;
  overflow: hidden;
}
.content tr {
  border-bottom: 1px solid var(--line);
}
.content tr:last-child {
  border: 0;
}
.content td,
.content th {
  padding: 11px 14px;
  text-align: left;
}
.content th {
  color: #fff;
  background: rgba(99, 102, 241, 0.15);
}
.content hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 26px 0;
}
.content img {
  margin: 10px 0;
}
.page-content {
  padding: 26px 0 10px;
}
.p-title {
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  margin: 8px 0 18px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- error pages ---------- */
.errpage {
  padding: 100px 20px 130px;
  text-align: center;
}
.errpage h1 {
  font-size: 64px;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(99, 102, 241, 0.45));
}
.errpage p {
  color: var(--muted);
  margin-top: 14px;
  font-size: 16px;
}
.errpage a {
  color: var(--a2);
}
.errpage a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ---------- footer ---------- */
.foot {
  flex-shrink: 0;
  border-top: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(7, 11, 26, 0.5);
}
.foot-in {
  padding: 34px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
}
.foot-in a:hover {
  color: #fff;
}

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .menu {
    display: none;
  }
  .slogan {
    font-size: 23px;
  }
  .hero {
    padding: 52px 0 32px;
  }
  .detail {
    padding: 22px;
  }
  .d-title {
    font-size: 19px;
  }
  .app-row {
    padding: 12px 12px;
  }
  .app-ic {
    display: none;
  }
  .errpage h1 {
    font-size: 44px;
  }
}
