* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #e96443, #904e95);
  color: #333;
  min-height: 100vh;
}

.main-content {
  padding-top: 10px;
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.container {
  display: flex;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto 20px auto;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  height: 85vh;
  max-height: 800px;
}

.left-side {
  flex: 0 0 60%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #F385CE 100%);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #fff;
  padding: 20px 15px;
  text-align: center;
  overflow: hidden;
  min-height: auto;
}

.left-side::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.15"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.15"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.15"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.left-side::after {
  content: "";
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

/* SIMPLE LEFT SIDE LAYOUT */
.left-side h1 {
  position: relative;
  z-index: 2;
  font-size: 2.8rem;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  background: linear-gradient(45deg, #fff, #f0f8ff, #fff);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s ease-in-out infinite;
  letter-spacing: 2px;
}

.left-side p {
  position: relative;
  z-index: 2;
  font-size: 1rem;
  line-height: 1.7;
  max-width: 320px;
  margin: 0 auto;
  font-weight: 300;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.5s forwards;
  text-align: justify;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Enhanced floating particles - overridden by inline styles */
.left-side .particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(255,255,255,0.8);
  border-radius: 50%;
  animation: particleFloat 12s linear infinite;
  z-index: 5;
}

.left-side .particle:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.left-side .particle:nth-child(2) { top: 60%; right: 15%; animation-delay: 2s; }
.left-side .particle:nth-child(3) { bottom: 30%; left: 20%; animation-delay: 4s; }
.left-side .particle:nth-child(4) { top: 40%; right: 25%; animation-delay: 6s; }
.left-side .particle:nth-child(5) { bottom: 20%; right: 10%; animation-delay: 8s; }
.left-side .particle:nth-child(6) { top: 60%; left: 5%; animation-delay: 10s; }

@keyframes particleFloat {
  0% { transform: translateY(0px) scale(0); opacity: 0; }
  10% { opacity: 1; transform: translateY(0px) scale(1); }
  90% { opacity: 1; transform: translateY(-80px) scale(1); }
  100% { transform: translateY(-80px) scale(0); opacity: 0; }
}

/* NEW COMPACT RIGHT SIDE DESIGN */
.right-side {
  flex: 0 0 40%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  position: relative;
  overflow: hidden;
  min-height: auto;
}

.right-side::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 150%;
  height: 100%;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.05) 0%, transparent 70%);
  animation: floatRight 8s ease-in-out infinite;
}

@keyframes floatRight {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-20px) scale(1.05); }
}

.login-box {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 18px;
  padding: 35px 30px;
  box-shadow: 
    0 15px 30px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
  z-index: 2;
  animation: slideInRight 0.8s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.login-box h2 {
  margin-bottom: 18px;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
  position: relative;
}

.login-box h2::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 35px;
  height: 2px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 2px;
}

.login-box label {
  font-weight: 600;
  margin-bottom: 4px;
  display: block;
  font-size: 0.8rem;
  color: #374151;
  margin-top: 12px;
  position: relative;
}

.login-box label:first-of-type {
  margin-top: 0;
}

.login-box input {
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 3px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
}

.login-box input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
  outline: none;
  background: rgba(255, 255, 255, 1);
  transform: translateY(-1px);
}

.login-box input::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

.captcha-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0;
  gap: 8px;
  max-width: 280px;
}

.captcha-code {
  flex: 1;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-radius: 8px;
  letter-spacing: 2px;
  user-select: none;
  text-align: center;
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
}

.captcha-code::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shimmerCaptcha 2s infinite;
}

@keyframes shimmerCaptcha {
  0% { left: -100%; }
  100% { left: 100%; }
}

.refresh-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
  min-width: 70px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.refresh-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
  background: linear-gradient(135deg, #d97706, #b45309);
}

.refresh-btn::before {
  content: "🔄";
  font-size: 16px;
}

.login-box button[type="submit"] {
  width: 100%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 11px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 15px;
  box-shadow: 0 5px 18px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
}

.login-box button[type="submit"]::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.login-box button[type="submit"]:hover::before {
  left: 100%;
}

.login-box button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #5a67d8, #6b46c1);
}

.login-box button[type="submit"]:active {
  transform: translateY(-1px);
}

.login-links {
  text-align: center;
  margin-top: 15px;
  font-size: 0.8rem;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.login-links a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 6px 12px;
  border-radius: 16px;
  background: rgba(102, 126, 234, 0.1);
}

.login-links a:hover {
  background: rgba(102, 126, 234, 0.2);
  color: #5a67d8;
  transform: translateY(-1px);
}

.error-msg {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  color: #dc2626;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 15px;
  font-size: 0.85rem;
  text-align: center;
  border: 1px solid rgba(220, 38, 38, 0.2);
  box-shadow: 0 3px 10px rgba(220, 38, 38, 0.1);
}

/* Toast Notification System */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-bottom: 10px;
  padding: 16px 20px;
  min-width: 300px;
  max-width: 400px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
  border-left: 4px solid;
}

.toast.show {
  transform: translateX(0);
}

.toast-error {
  border-left-color: #dc2626;
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
}

.toast-success {
  border-left-color: #059669;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
}

.toast-info {
  border-left-color: #2563eb;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.toast-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.toast-message {
  color: #374151;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
}

.toast-error .toast-message {
  color: #dc2626;
}

.toast-success .toast-message {
  color: #059669;
}

.toast-info .toast-message {
  color: #2563eb;
}

.toast-close {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 1.5rem;
  font-weight: 300;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-left: 12px;
}

.toast-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #6b7280;
}

/* Toast animation variants */
.toast:nth-child(1) { animation-delay: 0s; }
.toast:nth-child(2) { animation-delay: 0.1s; }
.toast:nth-child(3) { animation-delay: 0.2s; }

/* Mobile responsive */
@media (max-width: 768px) {
  #toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
  }
  
  .toast {
    min-width: auto;
    max-width: none;
    margin-bottom: 8px;
    padding: 14px 16px;
  }
  
  .toast-message {
    font-size: 0.85rem;
  }
}

@media (max-width: 1200px) {
  .container {
    max-width: 1200px;
  }
}

@media (max-width: 768px) {
  .container {
    flex-direction: column;
    max-width: 95%;
    margin: 20px auto;
    height: auto;
    max-height: none;
  }
  
  .left-side, .right-side {
    flex: none;
    width: 100%;
  }
  
  .left-side {
    padding: 20px 15px;
  }
  
  .left-side::after {
    display: none; /* Hide floating gradient animation on mobile */
  }
  
  .left-side h1 {
    font-size: 2.2rem;
  }
  
  .left-side p {
    font-size: 0.9rem;
    max-width: 280px;
  }
  
  .right-side { 
    padding: 25px 20px;
  }
  
  .login-box {
    padding: 25px 20px;
    max-width: 380px;
  }
  
  .main-content {
    padding-top: 5px;
  }
}
