/* Static landing page for the Apple OAuth2 SPA bridge.
 *
 * The page is served from the same origin as the yudao-java backend's
 * `/member/auth/apple/*` endpoints (see `鉴权和用户数据加密/Apple 登录与 OAuth2 网页授权实施方案.md`
 * §3.3.4, §4.5.1) so we can call the authorize URL endpoint via a
 * relative path without CORS configuration.
 *
 * There is intentionally no JS framework or build pipeline — every byte
 * served is auditable in source, which matters for a page that lives on
 * the OAuth critical path.
 */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0071e3;
  --error: #c81e1e;
  --border: #d2d2d7;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1d1f;
    --fg: #f5f5f7;
    --muted: #98989d;
    --accent: #2997ff;
    --error: #ff6961;
    --border: #3a3a3c;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
    Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
}

main.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 100vh;
  padding: 2rem;
  text-align: center;
}

.landing__title {
  font-size: 1.5rem;
  margin: 0;
  font-weight: 600;
}

.landing__status {
  margin: 0;
  color: var(--muted);
}

.landing__hint {
  margin: 0;
  color: var(--muted);
  max-width: 32rem;
}

.landing__action {
  margin-top: 0.5rem;
  padding: 0.55rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  cursor: pointer;
}

.landing__action:hover,
.landing__action:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.landing__status[data-state="error"] {
  color: var(--error);
}

.landing__status[data-state="success"] {
  color: var(--accent);
}