:root {
  --blue: hsl(200, 80%, 50%);
  --blue-dark: hsl(200, 80%, 40%);
  --blue-light: hsl(200, 80%, 95%);
  --gray-50: hsl(210, 20%, 98%);
  --gray-100: hsl(210, 20%, 94%);
  --gray-200: hsl(210, 16%, 86%);
  --gray-500: hsl(210, 10%, 53%);
  --gray-700: hsl(210, 14%, 30%);
  --gray-900: hsl(210, 20%, 12%);
  --green: hsl(145, 60%, 42%);
  --red: hsl(0, 65%, 52%);
  --radius: 8px;
  --max-width: 600px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --blue-light: hsl(200, 50%, 15%);
    --gray-50: hsl(210, 20%, 8%);
    --gray-100: hsl(210, 20%, 12%);
    --gray-200: hsl(210, 16%, 20%);
    --gray-500: hsl(210, 10%, 55%);
    --gray-700: hsl(210, 14%, 78%);
    --gray-900: hsl(210, 20%, 93%);
  }
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--gray-900);
  background: var(--gray-50);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
}

.container {
  width: 100%;
  max-width: var(--max-width);
}

/* Header / Logo */
.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

.logo span {
  color: var(--gray-500);
  font-weight: 400;
}

/* Page title */
h1 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  color: var(--gray-900);
}

h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--gray-900);
}

p {
  color: var(--gray-700);
  margin-bottom: 1rem;
}

/* Permissions summary */
.permissions {
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.permissions ul {
  list-style: none;
  padding: 0;
}

.permissions li {
  padding: 0.3rem 0;
  color: var(--gray-700);
  font-size: 0.9rem;
}

.permissions li::before {
  content: "\2713";
  color: var(--green);
  font-weight: 700;
  margin-right: 0.5rem;
}

/* Form */
.form-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.25rem;
}

input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  color: var(--gray-900);
  background: var(--gray-50);
  transition: border-color 0.15s;
}

input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px hsla(200, 80%, 50%, 0.15);
}

input::placeholder {
  color: var(--gray-500);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.15s, opacity 0.15s;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover {
  background: var(--blue-dark);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-900);
  border: 1px solid var(--gray-200);
}

.btn-secondary:hover {
  background: var(--gray-200);
}

/* Status / feedback */
.error-text {
  color: var(--red);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Success page */
.success-icon {
  width: 4rem;
  height: 4rem;
  background: var(--green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
  color: #fff;
}

/* Error page */
.error-icon {
  width: 4rem;
  height: 4rem;
  background: var(--red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
  color: #fff;
}

/* Steps list */
.steps {
  margin-bottom: 1.5rem;
}

.steps ol {
  padding-left: 1.25rem;
}

.steps li {
  padding: 0.25rem 0;
  color: var(--gray-700);
  font-size: 0.95rem;
}

/* Links */
a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Divider */
hr {
  border: none;
  border-top: 1px solid var(--gray-200);
  margin: 1.5rem 0;
}

/* Footer */
.footer {
  margin-top: 2rem;
  font-size: 0.8rem;
  color: var(--gray-500);
}
