/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #1a0033, #0a1a66);
  padding: 20px;
  color: #fff;
}

.container {
  width: 100%;
  max-width: 1100px;
}

.login-wrapper {
  display: flex;
  background: #111827;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  min-height: 650px;
}

/* LEFT CARD */
.login-card {
  flex: 1;
  padding: 50px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-header {
  margin-bottom: 40px;
  text-align: center;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
}

.logo i {
  font-size: 2rem;
}

.login-header h1 {
  font-size: 2.2rem;
  margin-bottom: 10px;
  color: #e2e8f0;
}

.login-header p {
  color: #94a3b8;
  font-size: 1rem;
}

.form-group {
  margin-bottom: 24px;
}

.input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.input-container i {
  position: absolute;
  left: 16px;
  color: #00c6ff;
  font-size: 1.1rem;
  z-index: 2;
  transition: all 0.3s ease;
}

.input-container input {
  width: 100%;
  padding: 16px 16px 16px 75px;
  border: 2px solid #334155;
  background: #0f172a;
  border-radius: 12px;
  color: #fff;
  font-size: 1rem;
  transition: all 0.3s ease;
  outline: none;
}

.input-container label {
  position: absolute;
  left: 75px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 1rem;
  pointer-events: none;
  transition: all 0.3s ease;
  background: #0f172a;
  padding: 0 8px;
  border-radius: 5px;
}

.input-container.focused label,
.input-container input:valid + label {
  top: -8px;
  font-size: 0.8rem;
  color: #6a11cb;
}

.input-container.focused i,
.input-container input:valid ~ i {
  color: #6a11cb;
}

.input-container input:focus {
  border-color: #00c6ff;
  box-shadow: 0 0 0 3px rgba(0, 198, 255, 0.2);
}

.toggle-password {
  position: absolute;
  left: 87%;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 1.1rem;
  transition: color 0.3s ease;
  padding: 0;
  z-index: 3;
}

.toggle-password:hover {
  color: #00c6ff;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
}

.remember-me input {
  width: 18px;
  height: 18px;
  accent-color: #6a11cb;
}

.remember-me label {
  color: #cbd5e1;
  font-size: 0.9rem;
  cursor: pointer;
}

.forgot-password {
  color: #00c6ff;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.forgot-password:hover {
  text-decoration: underline;
}

.login-btn {
  width: 100%;
  padding: 16px;
  border: none;
  background: linear-gradient(135deg, #00c6ff, #6a11cb);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(106, 17, 203, 0.3);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 198, 255, 0.4);
}

.login-btn:active {
  transform: translateY(0);
}

.divider {
  display: flex;
  align-items: center;
  margin: 30px 0;
  color: #64748b;
  font-size: 0.9rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #334155;
}

.divider span {
  padding: 0 15px;
}

.social-login {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
}

.social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border: 2px solid #334155;
  background: transparent;
  color: #cbd5e1;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  font-weight: 500;
}

.social-btn:hover {
  border-color: #00c6ff;
  color: #00c6ff;
  transform: translateY(-2px);
}

.register-links {
  text-align: center;
}

.register-links p {
  margin: 10px 0;
  color: #cbd5e1;
  font-size: 0.9rem;
}

.register-links a {
  color: #6a11cb;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.register-links a:hover {
  text-decoration: underline;
}

/* RIGHT GRAPHICS */
.login-graphics {
  flex: 1;
  background: linear-gradient(135deg, rgba(0, 198, 255, 0.15), rgba(106, 17, 203, 0.25));
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.graphic-content {
  position: relative;
  width: 100%;
  height: 100%;
}

.floating-card {
  position: absolute;
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 20px;
  width: 200px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  transition: transform 0.5s ease;
}

.floating-card:hover {
  transform: translateY(-10px);
}

.floating-card i {
  font-size: 2rem;
  color: #00c6ff;
  margin-bottom: 10px;
}

.floating-card h3 {
  font-size: 1.1rem;
  color: #e2e8f0;
  margin-bottom: 8px;
}

.floating-card p {
  font-size: 0.8rem;
  color: #94a3b8;
}

.card-1 { top: 20%; left: 12%; animation: float 6s ease-in-out infinite; }
.card-2 { top: 50%; right: 12%; animation: float 6s ease-in-out infinite 2s; }
.card-3 { bottom: 20%; left: 25%; animation: float 6s ease-in-out infinite 4s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* FLASH MESSAGES */
#flash-messages {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

.flash-message {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1e1e1e;
  color: #f1f5f9;
  padding: 15px 20px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
  margin-bottom: 15px;
  max-width: 400px;
  border-left: 4px solid #00c6ff;
  animation: slideInRight 0.3s ease;
}

.flash-message.success { border-left-color: #22c55e; }
.flash-message.error { border-left-color: #ef4444; }
.flash-message.warning { border-left-color: #f59e0b; }

.flash-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.flash-message i { font-size: 1.2rem; }

.close-flash {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 1rem;
  margin-left: 15px;
  transition: color 0.2s;
}

.close-flash:hover { color: #fff; }

.fade-out { animation: slideOutRight 0.3s ease forwards; }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .login-graphics { display: none; }
  .login-card { padding: 40px 30px; }
}
@media (max-width: 480px) {
  .login-wrapper { border-radius: 16px; }
  .login-card { padding: 30px 20px; }
  .form-options { flex-direction: column; gap: 15px; align-items: flex-start; }
  .social-login { flex-direction: column; }
  .floating-card { width: 160px; padding: 15px; }
}
