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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.container {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 100%;
  padding: 40px;
}

.logo {
  text-align: center;
  margin-bottom: 30px;
}

.logo h1 {
  color: #667eea;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.logo p {
  color: #64748b;
  font-size: 14px;
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  color: #334155;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.3s ease;
  background: white;
}

input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

input.error {
  border-color: #ef4444;
}

.error-message {
  color: #ef4444;
  font-size: 13px;
  margin-top: 6px;
  display: none;
}

.error-message.show {
  display: block;
}

.hint {
  color: #64748b;
  font-size: 12px;
  margin-top: 6px;
}

.section-title {
  color: #1e293b;
  font-size: 16px;
  font-weight: 700;
  margin: 30px 0 15px 0;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

.section-title:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

button {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: none;
}

.alert.show {
  display: block;
}

.alert.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.alert.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.login-link,
.register-link {
  text-align: center;
  margin-top: 20px;
  color: #64748b;
  font-size: 14px;
}

.login-link a,
.register-link a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
}

.login-link a:hover,
.register-link a:hover {
  text-decoration: underline;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

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

.password-requirements {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px;
  margin-top: 8px;
  font-size: 12px;
}

.password-requirements ul {
  margin: 8px 0 0 20px;
  color: #64748b;
}

.password-requirements li {
  margin: 4px 0;
}

.password-requirements li.valid {
  color: #059669;
}

.success-card {
  display: none;
  text-align: center;
}

.success-card.show {
  display: block;
}

.success-card h2 {
  color: #059669;
  font-size: 24px;
  margin-bottom: 16px;
}

.success-card p {
  color: #64748b;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.success-card .checkmark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #d1fae5;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.code-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  margin: 20px 0;
  text-align: left;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  overflow-x: auto;
}

.copy-btn {
  background: #667eea;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  margin-top: 10px;
}

.copy-btn:hover {
  background: #5568d3;
}
