body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(
      160vmax 160vmax at 70% -25%,
      rgba(100, 181, 246, 0.11),
      rgba(18, 18, 18, 0) 45%
    ),
    #121212;
  color: #e0e0e0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.auth-top-header {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
}

.auth-top-header .logo-chess-beta {
  font-style: normal;
}

.auth-wrap {
  width: 100%;
  max-width: 400px;
  padding: 24px;
  padding-top: 56px;
}

.auth-card {
  background: rgba(30, 30, 30, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
}

.auth-sub {
  text-align: center;
  color: #9e9e9e;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.auth-tabs button {
  flex: 1;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: #e0e0e0;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.95rem;
}

.auth-tabs button.active {
  background: rgba(100, 181, 246, 0.25);
  border-color: #64b5f6;
  color: #fff;
}

.auth-panel {
  display: none;
}

.auth-panel.active {
  display: block;
}

.auth-field {
  margin-bottom: 14px;
}

.auth-field label {
  display: block;
  font-size: 0.85rem;
  color: #b0b0b0;
  margin-bottom: 6px;
}

.auth-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #1e1e1e;
  color: #fff;
  font-size: 1rem;
}

.auth-field input:focus {
  outline: none;
  border-color: #64b5f6;
}

.auth-actions {
  margin-top: 20px;
}

.auth-actions button[type='submit'] {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(180deg, #64b5f6, #42a5f5);
  color: #0d1117;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}

.auth-actions button[type='submit']:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-back {
  display: block;
  text-align: center;
  margin-top: 18px;
  color: #9e9e9e;
  text-decoration: none;
  font-size: 0.9rem;
}

.auth-back:hover {
  color: #e0e0e0;
}

#auth-message {
  min-height: 1.25em;
  font-size: 0.9rem;
  color: #ef9a9a;
  margin-bottom: 10px;
  text-align: center;
}

#auth-message.ok {
  color: #a5d6a7;
}

.pw-strength {
  margin: 14px 0 4px;
}

.pw-strength-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #9e9e9e;
  margin-bottom: 6px;
}

.pw-strength-text {
  color: #d0bdff;
}

.pw-strength-bar-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.pw-strength-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #c62828, #fdd835, #43a047, #2196f3);
  transition: width 0.22s ease, opacity 0.15s ease;
}
