/* ===== LOGIN CONTAINER ===== */
.main-login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem 1.5rem;
  min-height: calc(100vh - 200px); /* Subtract space for navbar and footer */
  margin: 2rem 0; /* Add space from navbar and footer */
}
.login-container {
  background: var(--card);
  padding: 5rem;
  border-radius: 1rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 600px; /* desktop width thoda zyada */
  border: 1px solid var(--border);
}

.login-container h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  color: var(--text);
}

/* ===== SOCIAL LOGIN SECTION ===== */
.social-login-section {
  margin-bottom: 1.5rem;
}

.social-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.social-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem !important;
  border: 1px solid var(--border) !important;
  border-radius: 0.5rem !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100% !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

.social-btn:hover {
  background: var(--card) !important;
  border-color: var(--primary) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

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

.social-btn:focus {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1) !important;
}

.social-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.google-btn:hover {
  border-color: #4285F4 !important;
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.2) !important;
}

.apple-btn:hover {
  border-color: #000000 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.divider {
  position: relative;
  text-align: center;
  margin: 1.5rem 0;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

.divider span {
  background: var(--card);
  color: var(--muted);
  padding: 0 1rem;
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}
/* Error Messages Display */
.messages-container {
  margin-bottom: 1.5rem;
}

.alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  border: 1px solid;
  animation: slideIn 0.3s ease-out;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.3);
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  border-color: rgba(34, 197, 94, 0.3);
}

.alert-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.alert-message {
  flex: 1;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* error message in login page  */
.error-text {
    color: var(--danger);
    font-size: 14px;
    margin-top: 5px;
}


/* ===== FORM FIELDS ===== */
.form-group {
  position: relative;
  margin-bottom: 1.2rem;
}

.form-group input {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 1rem;
  outline: none;
  transition: 0.3s;
  background: var(--surface);
  color: var(--text);
}

.form-group input::placeholder {
  color: var(--muted);
}

.form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--ring);
}

/* ===== EYE ICON ===== */
.eye-icon {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--muted);
}

.eye-icon:hover {
  color: var(--text);
}

/* ===== LOGIN BUTTON ===== */
.login-btn {
  width: 100%;
  padding: 0.9rem;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: 0.3s;
}

.login-btn:hover {
  background: linear-gradient(135deg, var(--primary-2), var(--primary));
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
}

/* ===== FORGOT LINKS ===== */
.forgot-links {
  display: flex;
  justify-content: space-between;
  margin-top: 0.8rem;
  font-size: 0.9rem;
}

.forgot-links a {
  color: var(--primary);
  text-decoration: none;
}

.forgot-links a:hover {
  text-decoration: underline;
  color: var(--primary-2);
}

/* ===== REGISTER LINK ===== */
.register-link {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.register-link a {
  color: var(--primary);
  font-weight: bold;
  text-decoration: none;
}

.register-link a:hover {
  text-decoration: underline;
  color: var(--primary-2);
}

/* ===== INSTRUCTOR LOGIN LINK ===== */
.instructor-login-link {
  text-align: center;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.instructor-login-link a {
  color: #764ba2;
  font-weight: bold;
  text-decoration: none;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.instructor-login-link a:hover {
  text-decoration: underline;
  background: linear-gradient(135deg, #764ba2, #667eea);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Responsive Styles ===== */

/* Tablet */
@media screen and (max-width: 1024px) {
  .main-login-container {
    padding: 2.5rem 1.5rem;
    margin: 1.5rem 0;
  }
  .login-container {
    max-width: 450px;
    padding: 3rem 2.5rem;
  }
}

/* Mobile */
@media screen and (max-width: 768px) {
  .main-login-container {
    min-height: calc(100vh - 150px);
    padding: 2rem 1rem;
    margin: 1.5rem 0;
  }
  .login-container {
    max-width: 90%;
    padding: 2rem 1.5rem;
  }
}


/* ===== LOGIN INFO CARD ===== */
.login-info {
    margin-bottom: 2rem;
}

.login-info .info-card {
    background: linear-gradient(135deg, #e8f5e8 0%, #f1f8e9 100%);
    border: 2px solid #4caf50;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideIn 0.3s ease-out;
}

.login-info .info-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.login-info .info-content h3 {
    margin: 0 0 0.5rem 0;
    color: #2e7d32;
    font-size: 1.1rem;
    font-weight: 600;
}

.login-info .info-content p {
    margin: 0;
    color: #424242;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Dark theme support */
[data-theme='dark'] .login-info .info-card {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
    border-color: #81c784;
}

[data-theme='dark'] .login-info .info-content h3 {
    color: #a5d6a7;
}

[data-theme='dark'] .login-info .info-content p {
    color: #e0e0e0;
}
