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

:root {
  --primary-blue: #0066cc;
  --primary-blue-hover: #0052a3;
  --secondary-gray: #6c757d;
  --success-green: #28a745;
  --error-red: #dc3545;
  --light-bg: #f8f9fa;
  --white: #ffffff;
  --border-color: #e9ecef;
  --text-dark: #212529;
  --text-light: #6c757d;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #243560;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  color: var(--text-dark);
  position: relative;
}

.container {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  padding: 40px 30px;
  position: relative;
}

@media (max-width: 480px) {
  .card {
    padding: 30px 20px;
  }
}

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

.logo-container {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 10;
}

.logo {
  max-width: 80px;
  height: auto;
}

.header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.subtitle {
  font-size: 14px;
  color: var(--text-light);
}

#error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  border-left: 4px solid var(--error-red);
  font-size: 14px;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.view {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

.view.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 16px;
  transition: all 0.3s ease;
  font-family: inherit;
}

input:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
  background-color: #f0f6ff;
}

input::placeholder {
  color: #adb5bd;
}

.hint {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-light);
}

.btn {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

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

.btn-primary:hover {
  background-color: var(--primary-blue-hover);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
  transform: translateY(-2px);
}

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

.btn-primary:disabled {
  background-color: var(--secondary-gray);
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-secondary {
  background-color: var(--light-bg);
  color: var(--text-dark);
  border: 1px solid var(--border-color);
  margin-top: 8px;
}

.btn-secondary:hover {
  background-color: #e9ecef;
  border-color: var(--secondary-gray);
}

.success-content {
  text-align: center;
  padding: 20px 0;
}

.success-icon {
  font-size: 48px;
  color: var(--success-green);
  margin-bottom: 16px;
  animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.success-content h2 {
  color: var(--text-dark);
  margin-bottom: 12px;
  font-size: 24px;
}

.success-message {
  color: var(--text-light);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  z-index: 100;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.footer {
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 10px;
}

/* Responsive design */
@media (max-width: 480px) {
  .header h1 {
    font-size: 24px;
  }

  .btn {
    font-size: 14px;
    padding: 10px 14px;
  }
}
