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

:root {
  --primary-color: #0099ff;
  --secondary-color: #7c3aed;
  --light-bg: #f8fafc;
  --lighter-bg: #ffffff;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --glow-color: rgba(0, 153, 255, 0.3);
  --purple-glow: rgba(124, 58, 237, 0.3);
  --border-color: rgba(0, 153, 255, 0.15);
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #e0f2fe 0%, #f8fafc 50%, #ede9fe 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Animated Background */
body::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
  animation: rotateBackground 20s linear infinite;
  opacity: 0.15;
  pointer-events: none;
}

@keyframes rotateBackground {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Cyber Grid */
body::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: linear-gradient(
      90deg,
      rgba(0, 153, 255, 0.08) 1px,
      transparent 1px
    ),
    linear-gradient(180deg, rgba(0, 153, 255, 0.08) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
  opacity: 0.4;
}

.login-container {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 1200px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 30px;
  overflow: hidden;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1), 0 0 80px rgba(0, 153, 255, 0.15),
    inset 0 0 1px rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

/* Left Side - Branding */
.login-left {
  padding: 60px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: linear-gradient(
    135deg,
    rgba(224, 242, 254, 0.8) 0%,
    rgba(237, 233, 254, 0.8) 100%
  );
  border-right: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.login-left::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--purple-glow) 0%, transparent 70%);
  animation: rotateBackground 25s linear infinite reverse;
  opacity: 0.2;
}

.logo-container {
  position: relative;
  z-index: 1;
  margin-bottom: 40px;
}

.logo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulseGlow 3s ease-in-out infinite;
  filter: blur(30px);
}

@keyframes pulseGlow {
  0%,
  100% {
    opacity: 0.4;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

.logo-container img {
  position: relative;
  z-index: 2;
  max-height: 180px;
  filter: drop-shadow(0 5px 15px rgba(0, 153, 255, 0.2));
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
}

.tagline {
  position: relative;
  z-index: 1;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: 40px;
  letter-spacing: 0.5px;
}

.tagline strong {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.pegawai-login-btn {
  position: relative;
  z-index: 1;
  padding: 15px 40px;
  background: transparent;
  border: 2px solid var(--primary-color);
  border-radius: 50px;
  color: var(--primary-color);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 1px;
  transition: all 0.4s ease;
  overflow: hidden;
  display: inline-block;
}

.pegawai-login-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: all 0.6s ease;
  border-radius: 50%;
  opacity: 0.3;
}

.pegawai-login-btn:hover {
  color: var(--lighter-bg);
  box-shadow: 0 5px 25px var(--glow-color);
  transform: translateY(-3px);
}

.pegawai-login-btn:hover::before {
  width: 300px;
  height: 300px;
  opacity: 1;
}

/* Right Side - Form */
.login-right {
  padding: 60px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(255, 255, 255, 0.5);
}

.login-header {
  text-align: center;
  margin-bottom: 40px;
}

.login-header h2 {
  color: var(--text-dark);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 2px;
}

.login-header p {
  color: var(--text-muted);
  font-size: 14px;
}

/* Alert Messages */
.alert {
  padding: 15px 20px;
  margin-bottom: 25px;
  border-radius: 15px;
  font-size: 14px;
  animation: slideInDown 0.5s ease;
  border: 1px solid;
  backdrop-filter: blur(10px);
}

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

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

.alert strong {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
}

/* Form Styling */
.login-form {
  width: 100%;
}

.form-group {
  margin-bottom: 25px;
  position: relative;
}

.form-group i {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-color);
  font-size: 18px;
  z-index: 2;
  width: 18px;
  height: 18px;
  display: inline-block;
}

/* SVG Icons - Inline (replaces FontAwesome) */
.form-group .icon-user {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" fill="%230099ff"><path d="M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm-45.7 48C79.8 304 0 383.8 0 482.3 0 498.7 13.3 512 29.7 512h388.6c16.4 0 29.7-13.3 29.7-29.7 0-98.5-79.8-178.3-178.3-178.3h-91.4z"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.form-group .icon-lock {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" fill="%230099ff"><path d="M144 144v48h160v-48c0-44.2-35.8-80-80-80s-80 35.8-80 80zm-64 48v-48C80 64.5 144.5 0 224 0s144 64.5 144 144v48h16c35.3 0 64 28.7 64 64v192c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V256c0-35.3 28.7-64 64-64h16z"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.pegawai-login-btn .icon-user-circle {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="%230099ff"><path d="M399 384.2c-22.1-38.4-63.6-64.2-111-64.2h-64c-47.4 0-88.9 25.8-111 64.2 35.2 39.2 86.2 63.8 143 63.8s107.8-24.7 143-63.8zM0 256a256 256 0 1 1 512 0 256 256 0 1 1-512 0zm256 16a72 72 0 1 0 0-144 72 72 0 1 0 0 144z"/></svg>');
  background-size: 16px;
  background-repeat: no-repeat;
  background-position: center;
  width: 16px;
  height: 16px;
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
}

.form-control {
  width: 100%;
  padding: 18px 20px 18px 55px;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(0, 153, 255, 0.15);
  border-radius: 15px;
  color: var(--text-dark);
  font-size: 15px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.form-control::placeholder {
  color: #94a3b8;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 5px 20px rgba(0, 153, 255, 0.15),
    inset 0 0 0 1px rgba(0, 153, 255, 0.1);
}

/* reCAPTCHA Container */
.captcha-container {
  margin-bottom: 25px;
  display: flex;
  justify-content: center;
}

.g-recaptcha {
  transform: scale(0.95);
  transform-origin: center;
}

#captcha-error {
  color: #ff0064;
  font-size: 13px;
  margin-top: 10px;
  text-align: center;
  display: none;
}

/* Submit Button */
.btn-login {
  width: 100%;
  padding: 18px;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  border: none;
  border-radius: 15px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 153, 255, 0.25);
}

.btn-login::before {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 100%
  );
  transition: top 0.6s ease;
}

.btn-login:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(0, 153, 255, 0.35),
    0 0 30px rgba(124, 58, 237, 0.2);
}

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

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

/* Footer Logos */
.footer-logos {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 30px;
  align-items: center;
  z-index: 10;
  padding: 20px 40px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  border: 1px solid rgba(0, 153, 255, 0.15);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.footer-logos img {
  height: 60px;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.1));
  transition: all 0.3s ease;
}

.footer-logos img:hover {
  filter: drop-shadow(0 5px 15px rgba(0, 153, 255, 0.3));
  transform: translateY(-5px);
}

/* Responsive */
@media (max-width: 968px) {
  .login-container {
    grid-template-columns: 1fr;
    max-width: 500px;
  }

  .login-left {
    display: none;
  }

  .login-right {
    padding: 40px 30px;
  }

  .footer-logos {
    bottom: 15px;
    gap: 15px;
    padding: 15px 25px;
  }

  .footer-logos img {
    height: 45px;
  }
}

/* Cyber Particles */
.particle {
  position: fixed;
  width: 4px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 8px var(--glow-color);
  animation: floatParticle 15s linear infinite;
  opacity: 0.4;
}

@keyframes floatParticle {
  0% {
    transform: translateY(100vh) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.4;
  }
  90% {
    opacity: 0.4;
  }
  100% {
    transform: translateY(-100px) translateX(100px);
    opacity: 0;
  }
}
