/* Modern Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #f0f4f8;
  position: relative;
  overflow: hidden;
  color: #334155;
  padding: 20px;
}

/* Background Effects */
.background-blobs {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: float 10s infinite ease-in-out;
}

.blob-1 {
  width: 400px;
  height: 400px;
  background: #4facfe;
  top: -100px;
  left: -100px;
}

.blob-2 {
  width: 300px;
  height: 300px;
  background: #00f2fe;
  bottom: -50px;
  right: -50px;
  animation-delay: 2s;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }
}

/* Card Styling (Glassmorphism) */
.card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header */
.card-header {
  text-align: center;
  margin-bottom: 30px;
}

.logo-container {
  width: 80px;
  height: 80px;
  margin: 0 auto 15px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

h2 {
  color: #1e293b;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.subtitle {
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
}

/* Form Elements */
.input-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  font-size: 18px;
  pointer-events: none;
  transition: color 0.3s;
}

input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  /* Space for icon */
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 15px;
  color: #334155;
  background: #ffffff;
  transition: all 0.3s ease;
}

/* Password needs extra space for eye icon */
input[type="password"] {
  padding-right: 42px;
}

input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

input:focus+.input-icon,
.input-wrapper:focus-within .input-icon {
  color: #3b82f6;
}

/* Toggle Password Eye */
.toggle-password {
  position: absolute;
  right: 14px;
  color: #94a3b8;
  cursor: pointer;
  font-size: 18px;
  transition: color 0.3s;
  padding: 4px;
  /* Touch target */
}

.toggle-password:hover {
  color: #334155;
}

.divider {
  height: 1px;
  background: #e2e8f0;
  margin: 20px 0;
}

/* Button */
.btn-primary {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
  margin-top: 10px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Message Box */
#message {
  font-size: 14px;
  text-align: center;
  margin-bottom: 20px;
  min-height: 20px;
  border-radius: 8px;
  padding: 0;
  transition: all 0.3s;
}

#message.error {
  color: #ef4444;
  background: #fee2e2;
  padding: 10px;
  border: 1px solid #fecaca;
}

#message.success {
  color: #10b981;
  background: #d1fae5;
  padding: 10px;
  border: 1px solid #a7f3d0;
}

/* Footer */
.card-footer {
  text-align: center;
  margin-top: 25px;
}

.back-link {
  color: #64748b;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.3s;
}

.back-link:hover {
  color: #3b82f6;
}

/* Responsive */
@media (max-width: 480px) {
  .card {
    padding: 30px 20px;
    border-radius: 20px;
  }

  h2 {
    font-size: 20px;
  }
}