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

:root {
  --bg: #f0f4f8;
  --card-bg: #ffffff;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #dbeafe;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --input-border: #e2e8f0;
  --input-focus: #2563eb;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.12);
  --radius: 16px;
  --radius-input: 10px;
  --radius-btn: 10px;
  --transition: 0.25s ease;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  margin: 0;
  color: var(--text-primary);
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: 600px;
  padding: 0 0.5rem;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2rem 1.8rem 1.8rem;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
  max-height: 98vh;
  overflow-y: auto;
}

.card:hover {
  box-shadow: var(--shadow-hover);
}

.card::-webkit-scrollbar {
  width: 4px;
}

.card::-webkit-scrollbar-track {
  background: transparent;
}

.card::-webkit-scrollbar-thumb {
  background: var(--input-border);
  border-radius: 10px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 1.2rem;
}

.logo-icon {
  font-size: 1.6rem;
  color: var(--primary);
  font-weight: 700;
}

.logo-text {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
  letter-spacing: -0.5px;
}

.subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 1.5rem;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.input-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}

.input {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-input);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: #fafbfc;
  transition: all var(--transition);
  outline: none;
}

.input::placeholder {
  color: var(--text-muted);
}

.input:hover {
  border-color: #cbd5e1;
  background: #ffffff;
}

.input:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  background: #ffffff;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.1rem;
}

.terms-wrapper {
  justify-content: flex-start;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-label {
  user-select: none;
}

.link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color var(--transition);
}

.link:hover {
  color: var(--primary);
}

.terms-link {
  color: var(--primary);
  font-weight: 500;
  font-size: 0.8rem;
}

.terms-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.create-link {
  color: var(--primary);
  font-weight: 600;
}

.create-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  border-radius: var(--radius-btn);
  padding: 0.7rem 1.5rem;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  background: transparent;
  color: var(--text-primary);
}

.btn-primary {
  background: var(--primary);
  color: white;
  width: 100%;
  padding: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.btn-primary:active {
  transform: translateY(0px);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0 0.8rem;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: var(--input-border);
}

.divider-text {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
  white-space: nowrap;
}

.social-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.2rem;
}

.btn-social {
  flex: 1;
  background: #f8fafc;
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-input);
  padding: 0.6rem 0.5rem;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: all var(--transition);
  gap: 0.4rem;
}

.btn-social:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  color: var(--text-primary);
}

.btn-social:active {
  transform: translateY(0px);
}

.btn-social svg {
  flex-shrink: 0;
  opacity: 0.7;
  width: 16px;
  height: 16px;
}

.btn-social:hover svg {
  opacity: 1;
}

.footer-text {
  text-align: center;
  margin-top: 1.2rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .card {
    padding: 1.8rem 1.5rem 1.5rem;
  }
  .title {
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  body {
    padding: 0.75rem;
  }
  .card {
    padding: 1.5rem 1rem 1.2rem;
    border-radius: 14px;
  }
  .title {
    font-size: 1.2rem;
  }
  .subtitle {
    font-size: 0.8rem;
    margin-bottom: 1.2rem;
  }
  .input {
    padding: 0.55rem 0.8rem;
    font-size: 0.85rem;
  }
  .btn-primary {
    padding: 0.65rem;
    font-size: 0.85rem;
  }
  .btn-social {
    font-size: 0.75rem;
    padding: 0.5rem 0.3rem;
  }
  .btn-social svg {
    width: 14px;
    height: 14px;
  }
  .form {
    gap: 0.7rem;
  }
  .divider {
    margin: 0.8rem 0 0.6rem;
  }
  .logo-text {
    font-size: 1.1rem;
  }
  .logo-icon {
    font-size: 1.3rem;
  }
  .logo {
    margin-bottom: 1rem;
  }
  .footer-text {
    margin-top: 1rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 360px) {
  .card {
    padding: 1.2rem 0.8rem 1rem;
  }
  .title {
    font-size: 1.1rem;
  }
  .input {
    padding: 0.5rem 0.7rem;
    font-size: 0.8rem;
  }
  .btn-social {
    font-size: 0.7rem;
    padding: 0.4rem 0.2rem;
  }
  .btn-social svg {
    width: 12px;
    height: 12px;
  }
  .input-label {
    font-size: 0.7rem;
  }
  .checkbox-wrapper {
    font-size: 0.7rem;
  }
  .terms-link {
    font-size: 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .btn-primary:hover {
    transform: none;
  }
  .btn-social:hover {
    transform: none;
  }
  .card:hover {
    box-shadow: var(--shadow);
  }
}