:root {
  --bg-1: #0f172a;
  --bg-2: #1e293b;
  --card: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.12);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-2: #818cf8;
  --btn-text: #0f172a;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  --radius: 20px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-1);
  line-height: 1.5;
}

.app-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px 16px;
  position: relative;
  overflow: hidden;
}

.bg-layer {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(56, 189, 248, 0.18), transparent 60%),
    radial-gradient(ellipse 70% 50% at 80% 90%, rgba(129, 140, 248, 0.16), transparent 55%),
    linear-gradient(160deg, var(--bg-1), var(--bg-2));
  z-index: 0;
}

.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.card-header {
  padding: 28px 28px 8px;
  text-align: center;
}

.title {
  margin: 0 0 8px;
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.card-body {
  padding: 20px 28px 8px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.field-value {
  font-size: 0.9375rem;
  color: var(--accent);
  text-decoration: none;
  word-break: break-all;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: color 0.2s ease;
}

.field-value:hover {
  color: #7dd3fc;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--btn-text);
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 12px 32px rgba(56, 189, 248, 0.35);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.field-email .field-value {
  color: #c4b5fd;
}

.card-footer {
  padding: 16px 28px 28px;
  text-align: center;
}

.card-footer p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.is-loading .field-value,
.is-loading .btn {
  pointer-events: none;
  opacity: 0.55;
}

.skeleton {
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.85; }
}

.is-loading.is-error .subtitle::after,
.app-shell.is-error .subtitle::after {
  content: none;
}

.app-shell.is-error .subtitle {
  color: #fca5a5;
}

.app-shell.is-error .card-body {
  opacity: 0.6;
}

@media (max-width: 400px) {
  .card-header {
    padding: 24px 20px 4px;
  }

  .card-body,
  .card-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .title {
    font-size: 1.375rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton {
    animation: none;
  }

  .btn {
    transition: none;
  }
}
