:root {
  --primary: #6c5ce7;
  --primary-light: #a29bfe;
  --primary-dark: #5649c0;
  --dark: #0f172a;
  --darker: #0b1120;
  --light: #f8fafc;
  --light-gray: #e2e8f0;
  --gray: #94a3b8;
  --border: #1e293b;
  --card-bg: rgba(15, 23, 42, 0.9);
  --input-bg: #1e293b;
  --error: #ef4444;
  --success: #10b981;
}

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

body {
  background: radial-gradient(circle at top right, var(--darker), var(--dark));
  color: var(--light);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  line-height: 1.5;
}

.login-container {
  width: 100%;
  max-width: 440px;
  position: relative;
}

.login-card {
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  animation: fadeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  z-index: 2;
}

.login-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(108, 92, 231, 0.1) 0%, transparent 70%);
  z-index: -1;
  animation: rotate 15s linear infinite;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

.card-header {
  padding: 2.5rem 2rem 1.5rem;
  text-align: center;
  position: relative;
}

.logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.logo img {
  max-width: 60%;
  max-height: 60%;
}

.card-header h2 {
  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: -0.5px;
  color: var(--light);
  margin-bottom: 0.5rem;
}

.card-header p {
  color: var(--gray);
  font-size: 0.95rem;
}

.card-body {
  padding: 2rem;
  padding-top: 0;
}

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

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

.form-group label {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--light-gray);
  transition: all 0.3s ease;
}

.form-control {
  padding: 1rem 1.25rem;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--light);
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.form-control::placeholder {
  color: var(--gray);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2), inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: -0.5rem;
}

.remember-me input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.remember-me label {
  color: var(--gray);
  user-select: none;
  cursor: pointer;
  font-size: 0.9rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  padding: 1.1rem;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
  margin-top: 0.5rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
}

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

.error {
  color: var(--error);
  background: rgba(239, 68, 68, 0.1);
  padding: 0.9rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  border-left: 4px solid var(--error);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.error::before {
  content: "!";
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--error);
  color: white;
  border-radius: 50%;
  font-weight: bold;
  font-size: 0.8rem;
}

.form-footer {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--gray);
  font-size: 0.9rem;
}

.form-footer a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

.form-footer a:hover {
  color: var(--primary);
}

@media (max-width: 480px) {
  .card-body {
    padding: 1.5rem;
  }
  
  .card-header {
    padding: 1.5rem 1.5rem 1rem;
  }
  
  .logo {
    width: 70px;
    height: 70px;
    margin-bottom: 1.2rem;
  }
}

.form-group:focus-within label {
  color: var(--primary-light);
}