@charset "UTF-8";

@font-face {
  font-family: "Xmao Custom";
  src: url("/assets/fonts/MyFont.woff2") format("woff2");
  font-style: normal;
  font-weight: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #000;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(30, 30, 40, 0.95);
  --border: rgba(255, 255, 255, 0.12);
  --border-hover: rgba(255, 255, 255, 0.2);
  --text: #fff;
  --muted: rgba(255, 255, 255, 0.7);
  --faint: #999;
  --primary: #fff;
  --primary-strong: #fff;
  --danger: #fff;
  --success: #8fdfa0;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --radius-lg: 24px;
  --radius-md: 16px;
  --content: 1080px;
  font-family: "Xmao Custom", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 280px;
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: #000;
  line-height: 1.65;
  overflow-x: hidden;
}

body::before {
  content: none;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.75);
  outline-offset: 4px;
}

::selection {
  color: #000;
  background: #fff;
}

.starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 100;
  padding: 9px 14px;
  border-radius: 10px;
  color: #333;
  background: var(--primary-strong);
  transform: translate(-50%, -160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

.cms-preview-banner {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 50;
  max-width: calc(100% - 24px);
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  color: #fff;
  background: rgba(20, 20, 20, 0.94);
  box-shadow: var(--shadow);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 0.78rem;
}

.site-shell {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.page-main {
  width: min(100% - 32px, var(--content));
  margin: auto;
  padding: 96px 0 48px;
}

.page-main--home {
  display: grid;
  place-items: center;
  max-width: 760px;
  text-align: center;
}

.glass-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(125%);
  -webkit-backdrop-filter: blur(22px) saturate(125%);
}

.hero {
  width: 100%;
  padding: clamp(28px, 7vw, 64px);
}

.page-main--home .glass-panel {
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.avatar {
  width: clamp(96px, 18vw, 132px);
  height: clamp(96px, 18vw, 132px);
  aspect-ratio: 1;
  object-fit: cover;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 0 30px 10px rgba(255, 255, 255, 0.9);
  opacity: 0.9;
}

@supports (min-height: 100dvh) {
  body,
  .site-shell {
    min-height: 100dvh;
  }
}

.eyebrow {
  margin: 24px 0 4px;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(2.2rem, 8vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: 0.04em;
  animation: nickname-shadow 2s ease-in-out infinite alternate;
}

@keyframes nickname-shadow {
  from { text-shadow: 0 0 2px #f6f7fb; }
  to { text-shadow: 1px 1px 20px #f6f7fb; }
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.22;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.lead {
  max-width: 42rem;
  margin-right: auto;
  margin-bottom: 0;
  margin-left: auto;
  color: #fff;
  font-size: clamp(0.98rem, 2.6vw, 1.12rem);
}

.motto {
  margin: 22px auto 0;
  color: #fff;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 0;
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.button:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.button--primary {
  background: rgba(255, 255, 255, 0.15);
}

.button:disabled {
  cursor: wait;
  opacity: 0.58;
  transform: none;
}

.quote-box {
  min-height: 76px;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
}

.quote-box blockquote {
  margin: 0;
  font-family: "STKaiti", "KaiTi", cursive;
  font-size: clamp(1rem, 3vw, 1.2rem);
}

.quote-box cite {
  display: block;
  min-height: 1.5em;
  margin-top: 8px;
  color: var(--faint);
  font-size: 0.84rem;
  font-style: normal;
}

.back-button {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  left: max(18px, env(safe-area-inset-left));
  z-index: 20;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(16px);
}

.page-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.page-header p {
  max-width: 38rem;
  margin-bottom: 0;
  color: var(--muted);
}

.content-panel {
  padding: clamp(22px, 5vw, 42px);
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px;
}

.link-card {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 15px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.link-card:hover {
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-3px);
}

.link-logo {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.link-card__content {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
}

.link-card__content strong,
.link-card__content span,
.link-card__content small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-card__content span,
.link-card__content small {
  color: var(--muted);
  font-size: 0.82rem;
}

.link-card__latency {
  display: inline-flex;
  min-width: 72px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.link-card__latency::before {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  content: "";
}

.link-card__latency--pending {
  opacity: 0.72;
}

.link-card__latency--good {
  color: #8ee6ae;
}

.link-card__latency--medium {
  color: #e8d184;
}

.link-card__latency--slow,
.link-card__latency--offline {
  color: #e99b9b;
}

.empty-state {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

body[data-cms-page="links"] [data-links-status][hidden] {
  display: none !important;
}

.requirements {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
}

.info-card,
.form-card,
.document-section {
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
}

.requirement-list {
  padding-left: 1.3rem;
  color: var(--muted);
}

.requirement-list li + li {
  margin-top: 8px;
}

.site-data {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 14px;
  margin: 22px 0;
  font-size: 0.9rem;
}

.site-data dt {
  color: var(--faint);
}

.site-data dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  user-select: text;
}

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

.field {
  display: grid;
  gap: 7px;
}

.field--wide {
  grid-column: 1 / -1;
}

.field label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.field textarea {
  min-height: 104px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(255, 255, 255, 0.35);
  outline: none;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.field-hint {
  color: var(--faint);
  font-size: 0.76rem;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
}

.form-feedback {
  margin: 0;
  font-size: 0.9rem;
}

.form-feedback.is-error {
  color: var(--danger);
}

.form-feedback.is-success {
  color: var(--success);
}

.document {
  display: grid;
  gap: 18px;
}

.document-section h2 {
  color: #fff;
  font-size: 1.18rem;
}

.document-section p,
.document-section li {
  color: var(--muted);
}

.document-section p:last-child,
.document-section ul:last-child {
  margin-bottom: 0;
}

.support-layout {
  display: grid;
  gap: 24px;
}

.support-message {
  max-width: 48rem;
  margin: 0 auto;
  color: var(--muted);
  text-align: center;
}

.support-record-table {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.045);
}

.support-record-head,
.support-record {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(72px, 0.7fr);
  align-items: center;
}

.support-record-head {
  color: var(--faint);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
}

.support-record {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.support-record-head span,
.support-record span {
  min-width: 0;
  padding: 13px 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-record span:last-child {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.support-record-status {
  margin: 0;
  padding: 34px 18px;
  color: var(--faint);
  text-align: center;
}

.support-notice {
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.support-notice strong {
  color: var(--text);
}

.support-notice p {
  margin-bottom: 0;
}

.support-dialog-content .eyebrow {
  margin-top: 0;
}

.support-dialog-tip {
  color: var(--muted);
}

.support-method-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.support-method-tabs button {
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
}

.support-method-tabs button[aria-pressed="true"] {
  border-color: rgba(255, 255, 255, 0.42);
  color: var(--text);
  background: rgba(255, 255, 255, 0.14);
}

.support-dialog-qr {
  display: grid;
  width: min(100%, 280px);
  aspect-ratio: 1;
  place-items: center;
  margin: 20px auto;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
}

.support-dialog-qr img {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: contain;
}

.support-dialog-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: 28px;
  color: #666;
  background: #f4f4f4;
}

.support-dialog-tip {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.site-footer {
  width: min(100% - 32px, var(--content));
  margin: 0 auto;
  padding: 22px 0 30px;
  color: var(--faint);
  font-size: 0.76rem;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  margin-bottom: 5px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
}

.police-record {
  width: 14px;
  height: 14px;
  margin-right: 3px;
  vertical-align: -2px;
}

dialog {
  width: min(92vw, 420px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
}

.dialog-content {
  position: relative;
  padding: 30px;
  text-align: center;
}

.dialog-content img {
  width: min(100%, 310px);
  height: auto;
  border-radius: 16px;
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font-size: 1.35rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

@media (max-width: 760px) {
  .page-main {
    padding-top: 82px;
  }

  body[data-cms-page="links"] .back-button {
    position: absolute;
  }

  body[data-cms-page="links"] .links-grid--scrollable {
    max-height: min(64dvh, 560px);
    padding-right: 6px;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  body[data-cms-page="links"] .links-grid--scrollable::-webkit-scrollbar {
    width: 5px;
  }

  body[data-cms-page="links"] .links-grid--scrollable::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
  }

  .page-header {
    display: block;
  }

  .page-header .button {
    margin-top: 18px;
  }

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

  .field--wide {
    grid-column: auto;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .page-main--home {
    padding-top: max(28px, calc(env(safe-area-inset-top) + 16px));
    padding-bottom: 24px;
  }

  .hero {
    padding: 22px 14px;
  }

  .eyebrow {
    margin-top: 18px;
  }

  .motto {
    margin-top: 14px;
  }

  .button-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 22px;
  }

  .button-row .button {
    width: 100%;
    min-width: 0;
    padding-right: 10px;
    padding-left: 10px;
    white-space: nowrap;
  }

  .quote-box {
    margin-top: 24px;
    padding-top: 18px;
  }

  .site-footer {
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 420px) {
  .page-main,
  .site-footer {
    width: min(100% - 22px, var(--content));
  }

  .hero,
  .content-panel {
    border-radius: 19px;
  }

  .back-button {
    top: 12px;
    left: 12px;
  }

  .site-data {
    grid-template-columns: 1fr;
    gap: 1px;
  }

  .site-data dd + dt {
    margin-top: 8px;
  }

  .support-record-head span,
  .support-record span {
    padding-right: 8px;
    padding-left: 8px;
    font-size: 0.76rem;
  }
}

@media (max-width: 320px) {
  .button-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@supports not (backdrop-filter: blur(1px)) {
  .glass-panel,
  .back-button {
    background: rgba(30, 30, 40, 0.95);
  }
}
