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

body {
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background: hsl(222, 47%, 6%);
  color: hsl(210, 40%, 96%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hidden {
  display: none !important;
}

.page {
  display: none;
}
.page.active {
  display: block;
}

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  background:
    radial-gradient(
      ellipse at top,
      hsla(217, 91%, 60%, 0.08) 0%,
      transparent 60%
    ),
    hsl(222, 47%, 6%);
}

.auth-container {
  width: 100%;
  max-width: 420px;
}

/* Header */
.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: hsla(217, 91%, 60%, 0.1);
  border: 1px solid hsla(217, 91%, 60%, 0.2);
  color: hsl(217, 91%, 60%);
  margin-bottom: 16px;
}

.auth-header h1 {
  font-size: 24px;
  font-weight: 600;
  color: hsl(210, 40%, 96%);
  margin-bottom: 6px;
}

.auth-header p {
  font-size: 14px;
  color: hsl(215, 20%, 55%);
}

/* Card */
.auth-card {
  background: hsl(222, 47%, 9%);
  border: 1px solid hsl(217, 33%, 18%);
  border-radius: 16px;
  padding: 32px;
  box-shadow:
    0 0 80px -20px hsla(217, 91%, 60%, 0.15),
    0 0 40px -10px hsla(217, 91%, 60%, 0.08);
}

/* Form */
form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: hsl(210, 40%, 96%);
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.label-row a {
  font-size: 12px;
  color: hsl(217, 91%, 60%);
  text-decoration: none;
  transition: color 0.2s;
}
.label-row a:hover {
  color: hsla(217, 91%, 60%, 0.8);
}

/* Inputs */
input[type='text'],
input[type='email'],
input[type='password'],
input[type='tel'] {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  font-size: 14px;
  font-family: inherit;
  color: hsl(210, 40%, 96%);
  background: hsla(217, 33%, 14%, 0.5);
  border: 1px solid hsl(217, 33%, 18%);
  border-radius: 8px;
  outline: none;
  transition: all 0.2s;
}

input::placeholder {
  color: hsl(215, 20%, 55%);
}

input:focus {
  border-color: transparent;
  box-shadow: 0 0 0 2px hsl(217, 91%, 60%);
}

.input-icon-wrapper {
  position: relative;
}

.input-icon-wrapper input {
  padding-left: 40px;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: hsl(215, 20%, 55%);
  pointer-events: none;
}

/* Password */
.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 44px;
}

.eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: hsl(215, 20%, 55%);
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.eye-btn:hover {
  color: hsl(210, 40%, 96%);
}

/* Button */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 44px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  color: hsl(222, 47%, 6%);
  background: hsl(217, 91%, 60%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}

.btn-primary:hover {
  background: hsl(217, 91%, 55%);
}

/* Footer */
.auth-footer {
  text-align: center;
  font-size: 14px;
  color: hsl(215, 20%, 55%);
  margin-top: 24px;
}

.auth-footer a {
  color: hsl(217, 91%, 60%);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.auth-footer a:hover {
  color: hsla(217, 91%, 60%, 0.8);
}

/* Back link */
.back-link {
  text-align: center;
  margin-top: 24px;
}

.back-link a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: hsl(215, 20%, 55%);
  text-decoration: none;
  transition: color 0.2s;
}

.back-link a:hover {
  color: hsl(210, 40%, 96%);
}

/* Success states */
.success-icon-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.success-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: hsla(217, 91%, 60%, 0.1);
  border: 1px solid hsla(217, 91%, 60%, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(217, 91%, 60%);
}

.resend-text {
  text-align: center;
  font-size: 14px;
  color: hsl(215, 20%, 55%);
}

.resend-text a {
  color: hsl(217, 91%, 60%);
  text-decoration: none;
  font-weight: 500;
}

.resend-text a:hover {
  color: hsla(217, 91%, 60%, 0.8);
}

/* Toggle */
.auth-toggle {
  display: flex;
  background: hsl(217, 33%, 14%);
  border: 1px solid hsl(217, 33%, 18%);
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 20px;
}

.toggle-btn {
  flex: 1;
  height: 36px;
  font-size: 13px;
  font-weight: 500;
  border: none;
  background: transparent;
  color: hsl(215, 20%, 55%);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.toggle-btn.active {
  background: hsl(217, 91%, 60%);
  color: hsl(222, 47%, 6%);
}

.signup-email,
.signup-phone {
  transition: opacity 0.2s ease;
}
