* {
  box-sizing: border-box;
}

:root {
  --bg-1: #0f172a;
  --bg-2: #1e293b;
  --card: rgba(15, 23, 42, 0.84);
  --card-light: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.12);
  --text: #e5eefc;
  --muted: #b4c4df;
  --accent: #60a5fa;
  --accent-2: #38bdf8;
  --success: #22c55e;
  --danger: #fb7185;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, #1d4ed8 0%, transparent 30%),
    radial-gradient(circle at bottom right, #0ea5e9 0%, transparent 22%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
}

body {
  min-height: 100vh;
}

.page-shell {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.link-reset {
  color: inherit;
  text-decoration: none;
}

.hero,
.auth-layout {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 120px);
}

.hero-card,
.auth-card {
  width: min(100%, 760px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  padding: 32px;
}

.auth-card {
  width: min(100%, 520px);
}

.badge {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--card-light);
  border: 1px solid var(--border);
  color: var(--accent-2);
  font-size: 0.92rem;
  margin-bottom: 16px;
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1;
}

.lead {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 64ch;
}

.lead.small {
  margin-bottom: 24px;
  font-size: 1rem;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.feature {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
}

.feature h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.feature p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button,
.ghost-button {
  border: 0;
  border-radius: 14px;
  padding: 14px 20px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
}

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

.ghost-button {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
  opacity: 0.96;
}

.wide {
  width: 100%;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.field-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.field-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
  outline: none;
}

.field-input:focus {
  border-color: rgba(96, 165, 250, 0.9);
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.12);
}

.timer-box {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #d7f3ff;
  text-align: center;
}

.form-message {
  min-height: 24px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.form-message.success {
  color: #86efac;
}

.form-message.error {
  color: #fda4af;
}

.hidden {
  display: none;
}

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

  .hero-card,
  .auth-card {
    padding: 24px;
  }

  .page-shell {
    width: min(100% - 24px, 1100px);
  }
}
