/* Reset and Base Styles */
* {
   margin: 0;
   padding: 0;
   box-sizing: border-box;
}

body {
   font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
   overflow: hidden;
}

/* Main Container */
.login-container {
   min-height: 100vh;
   display: flex;
   align-items: center;
   justify-content: center;
   background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
   position: relative;
   padding: 20px;
   
}

/* Background Animation */
.background-animation {
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   overflow: hidden;
   z-index: 1;
}

/* Floating Particles */
.floating-particles {
   position: absolute;
   width: 100%;
   height: 100%;
}

.floating-particles::before,
.floating-particles::after {
   content: '';
   position: absolute;
   width: 4px;
   height: 4px;
   background: rgba(255, 255, 255, 0.6);
   border-radius: 50%;
   animation: float 6s ease-in-out infinite;
}

.floating-particles::before {
   top: 20%;
   left: 20%;
   animation-delay: 0s;
}

.floating-particles::after {
   top: 60%;
   right: 20%;
   animation-delay: 3s;
}

/* DNA Helix Animation */
.dna-helix {
   position: absolute;
   top: 10%;
   right: 10%;
   width: 100px;
   height: 200px;
   opacity: 0.1;
}

.dna-helix::before,
.dna-helix::after {
   content: '';
   position: absolute;
   width: 2px;
   height: 100%;
   background: linear-gradient(to bottom, transparent, #fff, transparent);
   animation: dna-rotate 4s linear infinite;
}

.dna-helix::before {
   left: 0;
   transform-origin: 50px 0;
}

.dna-helix::after {
   right: 0;
   transform-origin: -50px 0;
   animation-delay: 2s;
}

/* Circuit Lines */
.circuit-lines {
   position: absolute;
   bottom: 10%;
   left: 10%;
   width: 150px;
   height: 150px;
   opacity: 0.1;
}

.circuit-lines::before {
   content: '';
   position: absolute;
   width: 100%;
   height: 2px;
   background: linear-gradient(90deg, transparent, #fff, transparent);
   top: 50%;
   animation: circuit-pulse 3s ease-in-out infinite;
}

.circuit-lines::after {
   content: '';
   position: absolute;
   width: 2px;
   height: 100%;
   background: linear-gradient(0deg, transparent, #fff, transparent);
   left: 50%;
   animation: circuit-pulse 3s ease-in-out infinite 1.5s;
}

/* Data Nodes */
.data-nodes {
   position: absolute;
   top: 30%;
   left: 5%;
   width: 200px;
   height: 200px;
   opacity: 0.1;
}

.data-nodes::before,
.data-nodes::after {
   content: '';
   position: absolute;
   width: 8px;
   height: 8px;
   background: #fff;
   border-radius: 50%;
   animation: data-pulse 2s ease-in-out infinite;
}

.data-nodes::before {
   top: 20%;
   left: 30%;
}

.data-nodes::after {
   bottom: 20%;
   right: 30%;
   animation-delay: 1s;
}

/* Login Box */
.login-box {
   background: rgba(255, 255, 255, 1);
   backdrop-filter: blur(20px);
   border-radius: 20px;
   padding: 40px;
   width: 100%;
   max-width: 400px;
   box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
   position: relative;
   z-index: 10; /* Ubah dari 100 ke 10 */
   animation: slideUp 0.8s ease-out;
   /* overflow: hidden; */
}

/* Border Animasi Mengelilingi Login Box */
/* .login-box::after {
   content: '';
   position: absolute;
   top: -2px;
   left: -2px;
   right: -2px;
   bottom: -2px;
   background: linear-gradient(45deg, 
      #667eea, #764ba2, #667eea, #764ba2, 
      #667eea, #764ba2, #667eea, #764ba2);
   background-size: 400% 400%;
   border-radius: 22px;
   z-index: -1; /* Pastikan di belakang konten */
   animation: borderGlow 4s ease-in-out infinite;
} */

/* Border Animasi Alternatif dengan Gradient Berputar */
/* .login-box::after {
   content: '';
   position: absolute;
   top: -3px;
   left: -3px;
   right: -3px;
   bottom: -3px;
   background: conic-gradient(
      from 0deg,
      transparent,
      #667eea,
      #764ba2,
      #ff6b6b,
      #51cf66,
      #667eea,
      transparent
   );
   border-radius: 23px;
   z-index: -2;
   animation: borderRotate 3s linear infinite;
   opacity: 0.7;
} */

/* Animasi untuk Border Glow */
@keyframes borderGlow {
   0%, 100% {
      background-position: 0% 50%;
      opacity: 0.8;
   }
   25% {
      background-position: 100% 50%;
      opacity: 1;
   }
   50% {
      background-position: 100% 100%;
      opacity: 0.9;
   }
   75% {
      background-position: 0% 100%;
      opacity: 1;
   }
}

/* Animasi untuk Border Berputar */
@keyframes borderRotate {
   0% {
      transform: rotate(0deg);
   }
   100% {
      transform: rotate(360deg);
   }
}

/* Variasi Border Animasi - Pulse Effect */
.login-box.pulse-border::before {
   background: linear-gradient(45deg, 
      rgba(102, 126, 234, 0.8), 
      rgba(118, 75, 162, 0.8), 
      rgba(255, 107, 107, 0.8), 
      rgba(81, 207, 102, 0.8));
   animation: borderPulse 2s ease-in-out infinite;
}

@keyframes borderPulse {
   0%, 100% {
      opacity: 0.5;
      transform: scale(1);
   }
   50% {
      opacity: 1;
      transform: scale(1.02);
   }
}

/* Border Animasi dengan Efek Neon */
.login-box.neon-border::before {
   background: linear-gradient(45deg, 
      #667eea, #764ba2, #ff6b6b, #51cf66, 
      #ffd93d, #6bcf7f, #667eea);
   background-size: 300% 300%;
   animation: neonGlow 3s ease-in-out infinite;
   filter: blur(1px);
}

.login-box.neon-border::after {
   background: linear-gradient(45deg, 
      #667eea, #764ba2, #ff6b6b, #51cf66, 
      #ffd93d, #6bcf7f, #667eea);
   background-size: 300% 300%;
   animation: neonGlow 3s ease-in-out infinite reverse;
   filter: blur(2px);
}

@keyframes neonGlow {
   0%, 100% {
      background-position: 0% 50%;
      box-shadow: 
         0 0 20px rgba(102, 126, 234, 0.5),
         0 0 40px rgba(118, 75, 162, 0.3),
         0 0 60px rgba(102, 126, 234, 0.1);
   }
   33% {
      background-position: 100% 0%;
      box-shadow: 
         0 0 20px rgba(255, 107, 107, 0.5),
         0 0 40px rgba(255, 107, 107, 0.3),
         0 0 60px rgba(255, 107, 107, 0.1);
   }
   66% {
      background-position: 0% 100%;
      box-shadow: 
         0 0 20px rgba(81, 207, 102, 0.5),
         0 0 40px rgba(81, 207, 102, 0.3),
         0 0 60px rgba(81, 207, 102, 0.1);
   }
}

/* Border Animasi dengan Efek Dash */
.login-box.dash-border::before {
   background: repeating-linear-gradient(
      45deg,
      #667eea 0px,
      #667eea 10px,
      transparent 10px,
      transparent 20px,
      #764ba2 20px,
      #764ba2 30px,
      transparent 30px,
      transparent 40px
   );
   animation: dashMove 2s linear infinite;
}

@keyframes dashMove {
   0% {
      background-position: 0px 0px;
   }
   100% {
      background-position: 40px 40px;
   }
}

/* Responsive untuk Border Animasi */
@media (max-width: 768px) {
   .login-box::before,
   .login-box::after {
      top: -1px;
      left: -1px;
      right: -1px;
      bottom: -1px;
      border-radius: 16px;
   }
   
   .login-box::after {
      border-radius: 17px;
   }
}

@media (max-width: 480px) {
   .login-box::before,
   .login-box::after {
      border-radius: 16px;
   }
   
   .login-box::after {
      border-radius: 17px;
   }
}

/* Disable animasi untuk reduced motion */
@media (prefers-reduced-motion: reduce) {
   .login-box::before,
   .login-box::after {
      animation: none;
      background: linear-gradient(45deg, #667eea, #764ba2);
   }
}

/* Dark Mode untuk Border Animasi */
@media (prefers-color-scheme: dark) {
   .login-box::before {
      background: linear-gradient(45deg, 
         #4a90e2, #9b59b6, #e74c3c, #2ecc71, 
         #f39c12, #1abc9c, #4a90e2);
   }
   
   .login-box::after {
      background: conic-gradient(
         from 0deg,
         transparent,
         #4a90e2,
         #9b59b6,
         #e74c3c,
         #2ecc71,
         #4a90e2,
         transparent
      );
   }
}



/* Logo Section */
.logo-section {
   text-align: center;
   margin-bottom: 30px;
}

.logo-container {
   margin-bottom: 15px;
}

.logo {
   max-height: 60px;
   filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
   animation: logoGlow 3s ease-in-out infinite;
}

.app-title {
   font-size: 2rem;
   font-weight: 700;
   background: linear-gradient(135deg, #667eea, #764ba2);
   -webkit-background-clip: text;
   -webkit-text-fill-color: transparent;
   background-clip: text;
   margin-bottom: 5px;
}

.app-subtitle {
   color: #6c757d;
   font-size: 0.9rem;
   font-weight: 400;
}

/* Form Styles */
.form-group {
   margin-bottom: 20px;
}

.input-group {
   position: relative;
   display: flex;
   align-items: center;
   background: #f8f9fa;
   border: 2px solid #e9ecef;
   border-radius: 12px;
   transition: all 0.3s ease;
}

.input-group:focus-within {
   /* border-color: #667eea; */
   box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
   transform: translateY(-2px);
}

.input-group-text {
   background: none;
   border: none;
   padding: 15px;
   color: #6c757d;
   font-size: 1.1rem;
}

.form-control {
   flex: 1;
   border: none;
   background: none;
   padding: 15px 10px;
   font-size: 1rem;
   outline: none;
   color: #495057;
}

.form-control::placeholder {
   color: #adb5bd;
}

.password-toggle {
   background: none;
   border: none;
   padding: 15px;
   color: #6c757d;
   cursor: pointer;
   transition: color 0.3s ease;
}

.password-toggle:hover {
   color: #667eea;
}

/* Form Options */
.form-options {
   display: flex;
   justify-content: space-between;
   align-items: center;
   margin-bottom: 25px;
   font-size: 0.9rem;
}

.form-check {
   display: flex;
   align-items: center;
}

.form-check-input {
   margin-right: 8px;
   accent-color: #667eea;
}

.form-check-label {
   color: #6c757d;
   cursor: pointer;
}

.forgot-link {
   color: #667eea;
   text-decoration: none;
   transition: color 0.3s ease;
}

.forgot-link:hover {
   color: #764ba2;
}

/* Login Button */
/* Login Button */
.login-btn {
   width: 100%;
   background: linear-gradient(135deg, #667eea, #764ba2);
   border: none;
   border-radius: 12px;
   padding: 15px;
   color: white;
   font-size: 1rem;
   font-weight: 600;
   cursor: pointer;
   transition: all 0.3s ease;
   position: relative;
   overflow: hidden;
   margin-bottom: 25px;
}

.login-btn:hover {
   transform: translateY(-2px);
   box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
   color: white; /* Pastikan warna tetap putih saat hover */
}

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

.btn-text {
   display: flex;
   align-items: center;
   justify-content: center;
   transition: opacity 0.3s ease;
   color: white; /* Pastikan warna putih */
}

.btn-text i {
   margin-right: 8px; /* Jarak antara icon dan text */
   font-size: 1rem;
   color: white; /* Warna icon putih */
}

.btn-loader {
   position: absolute;
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
   opacity: 0;
   transition: opacity 0.3s ease;
}

.login-btn.loading .btn-text {
   opacity: 0;
}

.login-btn.loading .btn-loader {
   opacity: 1;
}

.spinner {
   width: 20px;
   height: 20px;
   border: 2px solid rgba(255, 255, 255, 0.3);
   border-top: 2px solid white;
   border-radius: 50%;
   animation: spin 1s linear infinite;
}

/* Pastikan warna tetap putih pada semua state */
.login-btn:focus,
.login-btn:focus-visible {
   color: white;
   outline: none;
   box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.login-btn:disabled {
   opacity: 0.6;
   cursor: not-allowed;
   transform: none;
   color: white;
}

.btn-text {
   display: flex;
   align-items: center;
   justify-content: center;
   transition: opacity 0.3s ease;
}

.btn-loader {
   position: absolute;
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
   opacity: 0;
   transition: opacity 0.3s ease;
}

.login-btn.loading .btn-text {
   opacity: 0;
}

.login-btn.loading .btn-loader {
   opacity: 1;
}

.spinner {
   width: 20px;
   height: 20px;
   border: 2px solid rgba(255, 255, 255, 0.3);
   border-top: 2px solid white;
   border-radius: 50%;
   animation: spin 1s linear infinite;
}

/* Additional Links */
.additional-links {
   text-align: center;
   margin-bottom: 20px;
   font-size: 0.9rem;
}

.link {
   color: #667eea;
   text-decoration: none;
   transition: color 0.3s ease;
}

.link:hover {
   color: #764ba2;
}

.separator {
   margin: 0 10px;
   color: #dee2e6;
}

/* Footer */
.login-footer {
   text-align: center;
   font-size: 0.8rem;
   color: #6c757d;
}

/* Alert Styles */
.alert {
   padding: 12px 15px;
   border-radius: 8px;
   margin-bottom: 20px;
   border: none;
   font-size: 0.9rem;
   display: flex;
   align-items: center;
   animation: slideDown 0.5s ease-out;
}

.alert-danger {
   background: linear-gradient(135deg, #ff6b6b, #ee5a52);
   color: white;
   box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.alert-success {
   background: linear-gradient(135deg, #51cf66, #40c057);
   color: white;
   box-shadow: 0 4px 15px rgba(81, 207, 102, 0.3);
}

.alert i {
   margin-right: 8px;
   font-size: 1rem;
}

/* Animations */
@keyframes slideUp {
   from {
      opacity: 0;
      transform: translateY(30px);
   }
   to {
      opacity: 1;
      transform: translateY(0);
   }
}

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

@keyframes float {
   0%, 100% {
      transform: translateY(0px) translateX(0px);
      opacity: 0.6;
   }
   25% {
      transform: translateY(-20px) translateX(10px);
      opacity: 1;
   }
   50% {
      transform: translateY(-40px) translateX(-5px);
      opacity: 0.8;
   }
   75% {
      transform: translateY(-20px) translateX(-10px);
      opacity: 1;
   }
}

@keyframes dna-rotate {
   0% {
      transform: rotateY(0deg);
   }
   100% {
      transform: rotateY(360deg);
   }
}

@keyframes circuit-pulse {
   0%, 100% {
      opacity: 0.1;
      transform: scale(1);
   }
   50% {
      opacity: 0.3;
      transform: scale(1.05);
   }
}

@keyframes data-pulse {
   0%, 100% {
      opacity: 0.1;
      transform: scale(1);
   }
   50% {
      opacity: 0.3;
      transform: scale(1.2);
   }
}

@keyframes logoGlow {
   0%, 100% {
      filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
   }
   50% {
      filter: drop-shadow(0 6px 12px rgba(102, 126, 234, 0.3));
   }
}

@keyframes spin {
   0% {
      transform: rotate(0deg);
   }
   100% {
      transform: rotate(360deg);
   }
}

/* Responsive Design */
@media (max-width: 768px) {
   .login-container {
      padding: 15px;
   }

   .login-box {
      padding: 30px 25px;
      max-width: 350px;
      margin: 10px;
   }

   .app-title {
      font-size: 1.75rem;
   }

   .form-control {
      padding: 12px 10px;
   }

   .input-group-text,
   .password-toggle {
      padding: 12px;
   }

   .login-btn {
      padding: 12px;
   }

   .form-options {
      flex-direction: column;
      align-items: flex-start;
      gap: 10px;
   }

   .additional-links {
      flex-direction: column;
      gap: 10px;
   }

   .separator {
      display: none;
   }

   /* Reduce animation complexity on mobile */
   .background-animation {
      opacity: 0.5;
   }

   .dna-helix,
   .circuit-lines {
      display: none;
   }
}

@media (max-width: 480px) {
   .login-box {
      padding: 25px 20px;
      border-radius: 15px;
   }

   .app-title {
      font-size: 1.5rem;
   }

   .app-subtitle {
      font-size: 0.8rem;
   }

   .logo {
      max-height: 50px;
   }

   .form-group {
      margin-bottom: 15px;
   }

   .login-btn {
      margin-bottom: 20px;
   }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
   .login-box {
      background: rgba(30, 30, 30, 0.95);
      color: #e9ecef;
   }

   .app-subtitle {
      color: #adb5bd;
   }

   .input-group {
      background: #2d3748;
      border-color: #4a5568;
   }

   .form-control {
      color: #e9ecef;
   }

   .form-control::placeholder {
      color: #718096;
   }

   .input-group-text,
   .password-toggle {
      color: #a0aec0;
   }

   .form-check-label {
      color: #a0aec0;
   }

   .login-footer {
      color: #a0aec0;
   }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
   .login-container {
      background: linear-gradient(135deg, #000080 0%, #4b0082 100%);
   }

   .login-box {
      background: rgba(255, 255, 255, 1);
      border: 3px solid #000080;
   }

   .input-group {
      border: 2px solid #000080;
   }

   .login-btn {
      background: #000080;
      border: 2px solid #000080;
   }

   .alert-danger {
      background: #dc3545;
      border: 2px solid #721c24;
   }

   .alert-success {
      background: #28a745;
      border: 2px solid #155724;
   }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
   * {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
   }

   .background-animation {
      display: none;
   }
}

/* Print Styles */
@media print {
   .background-animation {
      display: none;
   }

   .login-container {
      background: white;
   }

   .login-box {
      background: white;
      box-shadow: none;
      border: 1px solid #000;
   }
}