:root {
  --green-primary: #071f18;
  --green-secondary: #0b2b20;
  --green-dark: #051510;
  --green-light: #0e3a2a;
  --green-accent: #14523c;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-600: #4b5563;
  --gray-900: #111827;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, var(--green-primary) 0%, var(--green-secondary) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
}

/* Animated background elements */
/* Decorative background - use fixed positioning so it doesn't expand document height */
body::before {
  content: '';
  position: fixed;
  top: -50vh;
  left: -50vw;
  width: 200vw;
  height: 200vh;
  background: radial-gradient(circle, rgba(230, 230, 250, 0.1) 0%, transparent 70%);
  animation: float 20s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  top: 20vh;
  right: -20vw;
  width: 40vw;
  height: 40vh;
  background: radial-gradient(circle, rgba(221, 160, 221, 0.05) 0%, transparent 70%);
  animation: float 25s ease-in-out infinite reverse;
  z-index: 0;
  pointer-events: none;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

.container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 48px 40px;
  box-shadow: var(--shadow-xl);
  max-width: 480px;
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(14, 58, 42, 0.2);
}

.header {
  margin-bottom: 40px;
}

.logo-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, var(--green-primary), var(--green-light));
  border-radius: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.logo-container::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--green-secondary), var(--green-primary));
  border-radius: 22px;
  z-index: -1;
  opacity: 0.3;
}

.logo-container i {
  font-size: 56px;
  color: var(--white);
}

.title {
  font-size: 32px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 18px;
  font-weight: 500;
  color: var(--green-light);
  margin-bottom: 8px;
}

.university {
  font-size: 14px;
  color: var(--gray-600);
  font-weight: 400;
}

.login-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
  align-items: center; /* center buttons to avoid horizontal overlap */
}

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 24px;
  background: linear-gradient(135deg, var(--green-primary), var(--green-light));
  color: var(--white);
  text-decoration: none;
  border-radius: 16px;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 380px; /* keep buttons a readable fixed width so they align */
}

.login-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(20, 82, 60, 0.3), transparent);
  transition: left 0.5s ease;
}

.login-btn:hover::before {
  left: 100%;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--green-secondary);
}

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

.login-btn i {
  font-size: 18px;
}

/* Individual button colors */
.admin-btn {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.admin-btn:hover {
  box-shadow: 0 10px 15px -3px rgba(220, 38, 38, 0.3), 0 4px 6px -2px rgba(220, 38, 38, 0.1);
}

.instructor-btn {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.instructor-btn:hover {
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3), 0 4px 6px -2px rgba(37, 99, 235, 0.1);
}

.student-btn {
  background: linear-gradient(135deg, #1e7b1e, #2d8f2d);
}

.student-btn:hover {
  box-shadow: 0 10px 15px -3px rgba(30, 123, 30, 0.3), 0 4px 6px -2px rgba(30, 123, 30, 0.1);
}

.home-btn {
  background: linear-gradient(135deg, #047857, #059669);
}

.home-btn:hover {
  box-shadow: 0 10px 15px -3px rgba(4, 120, 87, 0.3), 0 4px 6px -2px rgba(4, 120, 87, 0.1);
}

.footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-100);
}

.footer-text {
  font-size: 12px;
  color: var(--gray-600);
  line-height: 1.5;
}

.version {
  display: inline-block;
  background: var(--gray-100);
  color: var(--gray-600);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  margin-bottom: 16px;
}

.logo-footer {
  margin-top: 16px;
}

.footer-logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap; /* allow logos to wrap on narrow screens to prevent overlap */
  margin-bottom: 8px;
}

.footer-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  transition: all 0.3s ease;
  border-radius: 10px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(7, 31, 24, 0.2);
}

.footer-logo:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(7, 31, 24, 0.2);
  background: rgba(255, 255, 255, 0.2);
}

.logo-text {
  font-size: 11px;
  color: var(--gray-600);
  font-weight: 500;
  margin: 0;
}

/* Responsive design */
@media (max-width: 480px) {
  .container {
    padding: 32px 24px;
    margin: 16px;
  }

  .title {
    font-size: 28px;
  }

  .subtitle {
    font-size: 16px;
  }

  .login-btn {
    padding: 16px 20px;
  }

  /* Scale down logos on small screens so layout remains comfortable */
  .logo-container {
    width: 96px;
    height: 96px;
  }

  .logo-container i {
    font-size: 48px;
  }

  .footer-logo {
    width: 48px;
    height: 48px;
  }
}

/* Loading animation for buttons */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.login-btn:focus {
  outline: none;
}