:root {
  --bg: #0b1220;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.16);
  --text: #e5eefc;
  --muted: #94a3b8;
  --gold: #f5c58b;
  --blue: #60a5fa;
  --blue-strong: #3b82f6;
  --shadow: 0 28px 80px rgba(2, 8, 23, 0.42);
  --danger: #fca5a5;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.16), transparent 26%),
    radial-gradient(circle at bottom right, rgba(245, 197, 139, 0.14), transparent 24%),
    linear-gradient(180deg, #08111f 0%, #0b1220 100%);
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.hero {
  width: min(1120px, 100%);
}

.hero-head {
  text-align: center;
  margin-bottom: 28px;
}

.hero-head h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.08;
}

.hero-head p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.hidden {
  display: none !important;
}

.view-card {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.login-card {
  width: min(420px, 100%);
  margin: 0 auto;
  padding: 36px 34px 28px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.82));
}

.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.login-card h1 {
  margin: 20px 0 10px;
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1.08;
}

.login-subtitle {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 15px;
}

.login-footnote {
  margin: 18px 0 0;
  color: rgba(148, 163, 184, 0.78);
  font-size: 12px;
  line-height: 1.6;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.login-form input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  padding: 14px 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  outline: none;
}

.login-form input:focus {
  border-color: rgba(96, 165, 250, 0.72);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.12);
}

.login-form button,
.ghost-button {
  border: 0;
  border-radius: 16px;
  padding: 14px 18px;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

.login-form button {
  margin-top: 4px;
  background: linear-gradient(135deg, var(--blue), var(--blue-strong));
  color: #03101f;
  font-weight: 800;
}

.login-form button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.login-form button:disabled,
.ghost-button:disabled {
  opacity: 0.72;
  cursor: wait;
}

.form-message {
  min-height: 22px;
  margin: 0;
  color: var(--danger);
  font-size: 14px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.58);
}

.toolbar-text {
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.ghost-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

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

.portal-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 30px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.portal-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
}

.portal-card.bookshelf {
  background: linear-gradient(135deg, rgba(241, 186, 122, 0.14), rgba(255, 255, 255, 0.02));
}

.portal-card.news {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.14), rgba(255, 255, 255, 0.02));
}

.portal-card.stocks {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(255, 255, 255, 0.02));
}

.portal-card.openclaw {
  background: linear-gradient(135deg, rgba(196, 181, 253, 0.18), rgba(255, 255, 255, 0.02));
}

.card-tag {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.portal-card h2 {
  margin: 18px 0 12px;
  font-size: 32px;
}

.portal-card span {
  color: var(--muted);
  line-height: 1.8;
  font-size: 15px;
}

@media (max-width: 800px) {
  .portal-grid {
    grid-template-columns: 1fr;
  }

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

  .portal-card h2,
  .hero-head h1,
  .login-card h1 {
    font-size: 28px;
  }

  .login-card {
    padding: 26px 22px 22px;
  }
}
