:root {
  color-scheme: dark;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

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

body {
  --brand-soft: color-mix(in srgb, var(--brand) 14%, transparent);
  --brand-border: color-mix(in srgb, var(--brand) 55%, rgba(255, 255, 255, 0.22));
  --brand-ink: #11160f;
  color: #f6f8f7;
  background: #10151b;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background-image: var(--bg-image);
  background-position: center bottom;
  background-size: cover;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    radial-gradient(circle at 50% 27%, rgba(206, 234, 255, 0.14), transparent 32%),
    linear-gradient(180deg, rgba(2, 5, 11, 0.58), rgba(8, 12, 18, 0.4) 46%, rgba(10, 12, 16, 0.66) 100%),
    rgba(4, 7, 12, 0.24);
}

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

.landing {
  display: grid;
  min-height: 100vh;
  grid-template-rows: 1fr auto;
  padding: clamp(32px, 7vh, 84px) 18px 42px;
}

.hero-shell {
  display: grid;
  align-content: center;
  justify-items: center;
  width: min(560px, 100%);
  margin: 0 auto;
  gap: 28px;
}

.hero-copy {
  text-align: center;
}

.hero-copy h1 {
  margin: 0;
  color: var(--brand);
  font-size: clamp(2.1rem, 6vw, 3.8rem);
  font-weight: 800;
  letter-spacing: 0;
}

.hero-copy p {
  margin: 8px 0 0;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: rgba(255, 255, 255, 0.86);
}

.entry-panel {
  display: grid;
  width: min(480px, 100%);
  border: 1px solid var(--brand-border);
  background: rgba(9, 13, 18, 0.46);
  backdrop-filter: blur(6px);
}

.entry-link {
  display: grid;
  min-height: 58px;
  place-items: center;
  padding: 10px 18px;
  font-size: clamp(1.05rem, 3vw, 1.45rem);
  font-weight: 600;
  letter-spacing: 0;
  transition: background 160ms ease, transform 160ms ease;
}

.entry-link:hover,
.entry-link:focus-visible {
  background: var(--brand-soft);
}

.landing-footer {
  display: grid;
  justify-items: center;
  gap: 4px;
  margin: 48px auto 0;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.landing-footer p {
  margin: 0;
}

.notice-marquee {
  width: min(720px, 92vw);
  margin-bottom: 58px;
  overflow: hidden;
  color: var(--brand);
}

.notice-marquee span {
  display: inline-block;
  min-width: max-content;
  padding-left: 0;
  font-size: clamp(1rem, 3vw, 1.55rem);
  font-weight: 800;
  white-space: nowrap;
  animation: notice-slide 10s linear infinite;
}

@keyframes notice-slide {
  from {
    transform: translateX(-110%);
  }

  to {
    transform: translateX(110%);
  }
}

.landing-footer .notice {
  margin-bottom: 58px;
  color: var(--brand);
  font-size: clamp(1rem, 3vw, 1.55rem);
  font-weight: 800;
}

.float-home {
  position: fixed;
  right: 0;
  bottom: 48px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: #ffffff;
  color: #0d1218;
  font-size: 22px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.26);
}

.guide-page,
.admin-page,
.backup-page {
  min-height: 100vh;
  padding: 28px 16px;
}

.guide-page {
  display: grid;
  place-items: center;
}

.guide-card,
.admin-shell {
  width: min(920px, 100%);
  border: 1px solid color-mix(in srgb, var(--brand) 26%, rgba(255, 255, 255, 0.12));
  background: rgba(12, 17, 23, 0.82);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(10px);
}

.guide-card {
  display: grid;
  justify-items: center;
  gap: 22px;
  overflow: hidden;
  max-width: 560px;
  padding: clamp(24px, 6vw, 44px);
  text-align: center;
}

.guide-card h1,
.admin-shell h1 {
  margin: 0;
  color: var(--brand);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: 0;
}

.back-link {
  justify-self: start;
  color: rgba(255, 255, 255, 0.78);
}

.qr-image {
  width: min(260px, 72vw);
  aspect-ratio: 1;
  object-fit: cover;
  border: 10px solid #fff;
  background: #fff;
  -webkit-touch-callout: default;
  user-select: auto;
}

.guide-image {
  display: block;
  width: min(680px, 100%);
  max-height: 72vh;
  object-fit: contain;
  background: #000;
}

.guide-placeholder {
  width: min(480px, 100%);
  border: 1px dashed var(--brand-border);
  padding: 40px 18px;
  color: rgba(255, 255, 255, 0.68);
}

.desktop-icon-preview {
  display: grid;
  justify-items: center;
  width: 100%;
}

.desktop-icon-preview img {
  width: min(220px, 62vw);
  aspect-ratio: 1;
  object-fit: cover;
  background: #fff;
}

.guide-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.wechat-actions {
  display: grid;
  width: 100%;
  justify-items: stretch;
}

.wechat-btn,
.entertain-btn {
  display: flex;
  width: 100%;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  font-weight: 800;
}

.wechat-btn {
  position: relative;
  width: 100%;
  min-height: 58px;
  gap: 12px;
  padding: 0 24px;
  overflow: hidden;
  background: #08c767;
  color: #fff;
  font-size: clamp(1.05rem, 4vw, 1.75rem);
  letter-spacing: 0.16em;
  white-space: nowrap;
}

.wechat-btn::before {
  position: absolute;
  left: 5%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.wechat-btn::after {
  position: absolute;
  right: 5%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.scan-icon {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  background:
    linear-gradient(#fff, #fff) left top / 12px 3px no-repeat,
    linear-gradient(#fff, #fff) left top / 3px 12px no-repeat,
    linear-gradient(#fff, #fff) right top / 12px 3px no-repeat,
    linear-gradient(#fff, #fff) right top / 3px 12px no-repeat,
    linear-gradient(#fff, #fff) left bottom / 12px 3px no-repeat,
    linear-gradient(#fff, #fff) left bottom / 3px 12px no-repeat,
    linear-gradient(#fff, #fff) right bottom / 12px 3px no-repeat,
    linear-gradient(#fff, #fff) right bottom / 3px 12px no-repeat;
}

.wechat-btn span:last-child {
  position: relative;
  z-index: 1;
}

.scan-icon::before {
  position: absolute;
  top: 16px;
  left: 8px;
  right: 8px;
  height: 3px;
  border-radius: 2px;
  background: #fff;
  content: "";
}

.scan-icon::after {
  position: absolute;
  top: 24px;
  left: 10px;
  right: 10px;
  height: 3px;
  border-radius: 2px;
  background: #fff;
  content: "";
}

@media (max-width: 380px) {
  .wechat-btn {
    gap: 10px;
    padding: 0 18px;
    letter-spacing: 0.08em;
  }

  .scan-icon {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }
}

.entertain-btn {
  background: #2398e8;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.primary-btn {
  background: var(--brand);
  color: var(--brand-ink);
}

.secondary-btn {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.wide {
  width: min(320px, 100%);
}

.backup-page {
  display: grid;
  place-items: start center;
  background: #fff;
  color: #050505;
}

.backup-page::before,
.backup-page::after {
  display: none;
}

.backup-content {
  width: min(1040px, 100%);
  padding: clamp(18px, 4vw, 34px) 12px 64px;
  text-align: center;
}

.backup-content h1 {
  margin: 0 0 clamp(34px, 6vw, 64px);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.25;
  font-weight: 900;
}

.backup-copy {
  display: grid;
  gap: clamp(26px, 5vw, 48px);
  margin-bottom: clamp(90px, 16vw, 180px);
}

.backup-copy p {
  margin: 0;
  font-size: clamp(1.6rem, 4.4vw, 2.8rem);
  line-height: 1.25;
  font-weight: 900;
}

.backup-sites {
  display: grid;
  gap: clamp(24px, 5vw, 44px);
  justify-items: center;
}

.backup-sites a {
  color: var(--brand);
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1.1;
  font-weight: 900;
}

.steps {
  display: grid;
  width: 100%;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.steps li {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.08);
}

.steps span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  background: #fff;
  color: #10151b;
  font-weight: 800;
}

.phone-preview {
  display: grid;
  justify-items: center;
  width: 190px;
  min-height: 230px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  padding: 18px;
  background: #141a21;
}

.phone-top {
  width: 54px;
  height: 5px;
  margin-bottom: 40px;
  background: rgba(255, 255, 255, 0.28);
}

.app-icon {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  background: #eef8de;
  color: #11160f;
  font-size: 26px;
  font-weight: 900;
}

.app-icon-image {
  width: 92px;
  height: 92px;
  object-fit: cover;
  background: #fff;
}

.phone-preview p {
  margin: 12px 0 0;
  font-size: 14px;
}

.admin-shell {
  margin: 0 auto;
  padding: clamp(18px, 4vw, 34px);
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.admin-head p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.68);
}

.admin-message {
  padding: 10px 12px;
  background: var(--brand-soft);
  color: var(--brand);
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-form label {
  display: grid;
  gap: 6px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

.quick-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 0;
  border: 1px solid var(--brand-border);
  padding: 14px;
  background: var(--brand-soft);
}

.quick-links legend {
  padding: 0 8px;
  color: var(--brand);
  font-weight: 800;
}

.feature-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--brand-border);
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.feature-entry h2 {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 1.1rem;
}

.feature-entry p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
}

.upload-preview {
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

.upload-preview img {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #fff;
}

.upload-preview .icon-thumb {
  width: 92px;
  height: 92px;
  object-fit: cover;
}

.upload-preview .guide-thumb {
  width: min(260px, 100%);
  height: auto;
  max-height: 220px;
  object-fit: contain;
  background: #000;
}

.upload-preview .background-thumb {
  width: min(360px, 100%);
  height: 120px;
  object-fit: cover;
  background: #000;
}

.admin-form input,
.admin-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  font: inherit;
  padding: 10px 12px;
}

.admin-form input[type="file"] {
  background: rgba(255, 255, 255, 0.08);
}

.admin-form input[type="color"] {
  width: 100%;
  height: 52px;
  padding: 4px;
  cursor: pointer;
}

.admin-form input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.admin-form input[type="color"]::-webkit-color-swatch {
  border: 0;
}

.admin-form textarea {
  resize: vertical;
}

.span-2 {
  grid-column: 1 / -1;
}

.clicks {
  margin-top: 28px;
  overflow-x: auto;
}

.clicks h2 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

th,
td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  color: rgba(255, 255, 255, 0.74);
  font-weight: 700;
}

td {
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  word-break: break-all;
}

@media (max-width: 680px) {
  .landing {
    padding-top: 84px;
  }

  .entry-link {
    min-height: 54px;
  }

  .landing-footer .notice {
    margin-bottom: 38px;
  }

  .admin-head,
  .guide-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-form {
    grid-template-columns: 1fr;
  }

  .feature-entry {
    align-items: stretch;
    flex-direction: column;
  }

  .quick-links {
    grid-template-columns: 1fr;
  }
}
