:root {
  color-scheme: dark;
  --bg: #000000;
  --panel: rgba(4, 7, 12, 0.78);
  --text: #e8ecf5;
  --muted: #95a5b8;
  --border: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  background: #000000;
  color: var(--text);
  font-family: "JetBrains Mono", "Fira Code", "Source Code Pro", Menlo, Consolas, monospace;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 0;
  position: relative;
  overflow-x: hidden;
}

#canvas3d {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(0, 0, 0, 0.0), rgba(0, 0, 0, 0.28) 76%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.44));
  pointer-events: none;
  z-index: 1;
}

body > * {
  position: relative;
  z-index: 2;
}

body:has(.doc-container) {
  display: block;
  min-height: auto;
  align-items: unset;
  justify-content: unset;
}

.page-shell {
  width: min(75vw, 420px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body:has(.doc-container) .page-shell {
  width: 100%;
  min-height: auto;
}

.card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 30px;
  margin: auto 0;
  box-shadow:
    0 30px 110px rgba(0, 0, 0, 0.52),
    0 0 80px rgba(32, 170, 210, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px) saturate(120%);
}

.brand {
  text-align: center;
  margin-bottom: 24px;
}

.brand h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.05em;
  margin-bottom: 10px;
}

.subtitle {
  color: var(--muted);
  font-size: 0.95rem;
}

.button-grid {
  display: grid;
  gap: 12px;
}

.footer {
  margin-top: 26px;
  text-align: center;
  font-size: 0.92rem;
  color: var(--muted);
}

.footer a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.footer a:hover {
  color: var(--text);
}

.divider {
  margin: 0 10px;
  color: rgba(255, 255, 255, 0.2);
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.action-button:hover {
  border-color: rgba(122, 231, 255, 0.34);
  background: rgba(122, 231, 255, 0.07);
}

.action-button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.22);
  outline-offset: 4px;
}

@media (max-width: 560px) {
  .page-shell {
    width: min(75vw, 360px);
  }

  .card {
    padding: 28px 20px;
  }

  .footer {
    font-size: 0.82rem;
  }
}
