@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #0a0e27;
  position: relative;
  overflow: hidden;
}

body::before {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15), transparent);
  border-radius: 50%;
  top: -200px;
  right: -200px;
  animation: float 8s ease-in-out infinite;
}

body::after {
  content: "";
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.12), transparent);
  border-radius: 50%;
  bottom: -150px;
  left: -150px;
  animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(30px, 30px);
  }
}

.container {
  position: relative;
  width: 900px;
  height: 580px;
  background: rgba(17, 24, 39, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin: 20px;
  border-radius: 24px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  z-index: 1;
}

.container h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #f9fafb;
  letter-spacing: -0.5px;
}

.container p {
  font-size: 14px;
  margin: 12px 0 24px;
  color: #9ca3af;
  font-weight: 400;
}

form {
  width: 100%;
}

.form-box {
  position: absolute;
  right: 0;
  width: 50%;
  height: 100%;
  background: rgba(17, 24, 39, 1);
  display: flex;
  align-items: center;
  color: #f9fafb;
  text-align: center;
  padding: 50px 45px;
  z-index: 1;
  transition: 0.6s ease-in-out 1.2s, visibility 0s 1s;
}

.container.active .form-box {
  right: 50%;
}

.form-box.register {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.container.active .form-box.register {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.form-box.login {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.container.active .form-box.login {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.input-box {
  position: relative;
  margin: 24px 0;
}

.input-box input {
  width: 100%;
  padding: 14px 50px 14px 20px;
  background: rgba(31, 41, 55, 0.6);
  border-radius: 12px;
  border: 1px solid rgba(75, 85, 99, 0.5);
  outline: none;
  font-size: 15px;
  color: #f9fafb;
  font-weight: 400;
  transition: all 0.3s ease;
}

.input-box input:focus {
  background: rgba(31, 41, 55, 0.8);
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input-box input::placeholder {
  color: #6b7280;
  font-weight: 400;
}

.input-box i {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #6b7280;
  transition: color 0.3s ease;
}

.input-box input:focus + i {
  color: #6366f1;
}

.forgot-link {
  margin: -8px 0 20px;
  text-align: right;
}

.forgot-link a {
  font-size: 13px;
  color: #9ca3af;
  transition: color 0.3s ease;
  font-weight: 500;
}

.forgot-link a:hover {
  color: #6366f1;
}

.btn {
  width: 100%;
  height: 50px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
  border: none;
  outline: none;
  cursor: pointer;
  font-size: 15px;
  color: #fff;
  font-weight: 600;
  transition: all 0.3s ease;
  letter-spacing: 0.3px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

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

.social-icons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(75, 85, 99, 0.5);
  background: rgba(31, 41, 55, 0.4);
  border-radius: 10px;
  font-size: 18px;
  color: #9ca3af;
  transition: all 0.3s ease;
}

.social-icons a:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: #6366f1;
  color: #6366f1;
  transform: translateY(-2px);
}

.toggle-box {
  position: absolute;
  width: 100%;
  height: 100%;
}

.toggle-box::before {
  content: "";
  position: absolute;
  left: -250%;
  width: 300%;
  height: 100%;
  background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
  border-radius: 150px;
  z-index: 2;
  transition: 1.8s ease-in-out;
}

.container.active .toggle-box::before {
  left: 50%;
}

.toggle-panel {
  position: absolute;
  width: 50%;
  height: 100%;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 2;
  padding: 40px;
  transition: 0.6s ease-in-out;
}

.toggle-panel h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff 0%, #e0e7ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.toggle-panel p {
  color: #cbd5e1;
  font-size: 15px;
  margin-bottom: 28px;
}

.toggle-panel.toggle-left {
  left: 0;
  transition-delay: 1.2s;
}

.container.active .toggle-panel.toggle-left {
  left: -50%;
  transition-delay: 0.6s;
}

.toggle-panel.toggle-right {
  right: -50%;
  transition-delay: 0.6s;
}

.container.active .toggle-panel.toggle-right {
  right: 0;
  transition-delay: 1.2s;
}

.toggle-panel .btn {
  width: 180px;
  height: 48px;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.toggle-panel .btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

/* Toast Notification Styles */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  min-width: 320px;
  padding: 16px 20px;
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.3s ease-out;
  transition: all 0.3s ease;
}

.toast.removing {
  animation: slideOut 0.3s ease-out forwards;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

.toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.toast.success .toast-icon {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.toast.error .toast-icon {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.toast.info .toast-icon {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.toast.warning .toast-icon {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.toast-content {
  flex: 1;
  color: #f9fafb;
}

.toast-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.toast-message {
  font-size: 13px;
  color: #9ca3af;
  line-height: 1.4;
}

.toast-close {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: #9ca3af;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f9fafb;
}

@media (max-width: 920px) {
  .container {
    width: 95%;
    height: auto;
    min-height: 550px;
  }

  .toast-container {
    right: 10px;
    left: 10px;
  }

  .toast {
    min-width: auto;
  }
}

@media (max-width: 600px) {
  .container {
    flex-direction: column;
  }

  .form-box,
  .toggle-panel {
    width: 100%;
  }

  .toast-container {
    top: 10px;
  }
}
