* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, sans-serif;
}

body {
  min-height: 100%;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
  padding: 1.6rem;
}

.background {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background: radial-gradient(circle at top right, #1e40af, transparent 60%),
    radial-gradient(circle at bottom left, #1e3a8a, transparent 60%);
}

.circles::before,
.circles::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  opacity: 0.1;
}

.circles::before {
  background: radial-gradient(circle, #60a5fa, transparent 70%);
  top: -100px;
  right: -100px;
}

.circles::after {
  background: radial-gradient(circle, #3b82f6, transparent 70%);
  bottom: -100px;
  left: -100px;
}

.container {
  width: 100%;
  max-width: 440px;
  margin-top: 1.2rem;
}

.header {
  text-align: center;
  margin-bottom: 2rem;
}

.logo-container {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
}

.logo {
  position: relative;
  z-index: 1;
  color: white;
}

.logo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent 70%);
  border-radius: 50%;
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.5;
  }

  to {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.8;
  }
}

h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: white;
}

.header p {
  color: #94a3b8;
  font-size: 0.875rem;
}

.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.form {
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1e293b;
  margin-bottom: 0.8rem;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.icon {
  position: absolute;
  left: 1rem;
  color: #64748b;
  transition: color 0.2s ease;
}

input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  color: #0f172a;
  transition: all 0.2s ease;
  padding-right: 3rem;
  transition: all 0.2s ease;

}

input:focus {
  outline: none;
  border-color: #3b82f6;
  background: white;
}

.input-group:focus-within .icon {
  color: #3b82f6;
}

.input-group:has(input.valid) .icon {
  color: #4ade80;
}

.input-group:has(input.invalid) .icon {
  color: #f87171;
}

.input-group:focus-within:has(input.valid) .icon {
  color: #4ade80;
}

.input-group:focus-within:has(input.invalid) .icon {
  color: #f87171;
}

input.valid {
  border-color: #4ade80;
}

input.invalid {
  border-color: #f87171;
}

.error-message {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: #f87171;
  font-style: italic;
}

.input-focus {
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: -4px;
  right: -4px;
  border-radius: 0.75rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.input-group:focus-within .input-focus {
  opacity: 1;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.input-group:focus-within input.valid ~ .input-focus {
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.3);
}

.input-group:focus-within input.invalid ~ .input-focus {
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.3);
}

.toggle-password {
  position: absolute;
  right: 3rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #64748b;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.toggle-password:hover {
  color: #1e293b;
}

.submit-button {
  width: 100%;
  padding: 0.875rem;
  background: linear-gradient(to right, #1e40af, #1e3a8a);
  color: white;
  border: none;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.submit-button:disabled {
  background: #909090;
  color: #e8e8e8;
  cursor: not-allowed;
  box-shadow: none;
}

.spinner {
  margin-right: 5px;
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.terms {
  text-align: center;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 1.5rem;
  line-height: 1.5;
}

.terms a {
  color: #60a5fa;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.terms a:hover {
  color: #3b82f6;
  text-decoration: underline;
}

@media (max-width: 480px) {
  body {
    padding: 1rem;
  }

  .header {
    margin-bottom: 1.5rem;
  }

  .form {
    padding: 1.5rem;
  }

  h1 {
    font-size: 1.5rem;
  }
}