/* ==========================================================================
   SI-IBMD SURABAYA - PREMIUM GLASSMORPHISM THEME
   ========================================================================== */

/* Variables */
:root {
  --bg-primary: #070f1e;
  --bg-secondary: #0c1b33;
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --color-primary: #10b981; /* Emerald Green (Surabaya Identity Accent) */
  --color-primary-glow: rgba(16, 185, 129, 0.4);
  --color-accent: #0284c7; /* Ocean Blue */
  --glass-bg: rgba(15, 23, 42, 0.55);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-glow: rgba(255, 255, 255, 0.03);
  --font-family: 'Outfit', 'Roboto', sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Interactive Background Canvas */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: all;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

/* Login Wrapper & Grid Layout */
.login-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-container {
  width: 100%;
  max-width: 460px;
}

/* Glassmorphism Card */
.login-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 45px 35px 35px 35px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35),
              inset 0 1px 0 var(--glass-glow);
  position: relative;
  overflow: hidden;
}

/* Subtly animated glow effect inside card */
.login-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* Logo Styling */
.logo-container {
  display: flex;
  justify-content: center;
  margin-bottom: 25px;
  position: relative;
  z-index: 2;
}

.logo-img {
  width: 100px;
  height: auto;
  filter: drop-shadow(0 0 12px rgba(16, 185, 129, 0.2));
  transition: var(--transition-smooth);
  animation: float 4s ease-in-out infinite;
}

.logo-img:hover {
  transform: scale(1.08);
  filter: drop-shadow(0 0 20px rgba(16, 185, 129, 0.5));
}

/* Floating Animation for Logo */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Header Text */
.login-header {
  text-align: center;
  margin-bottom: 35px;
  position: relative;
  z-index: 2;
}

.login-header h3 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 1.5px;
  background: linear-gradient(135deg, #ffffff 30%, #a7f3d0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.login-header h4 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.login-header p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 90%;
  margin: 0 auto;
}

/* Custom Alert Box */
.alert-box {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  margin-bottom: 25px;
  position: relative;
  z-index: 2;
  backdrop-filter: blur(10px);
}

.alert-icon {
  color: #ef4444;
  font-size: 16px;
  margin-right: 12px;
}

.alert-text {
  color: #fca5a5;
  font-size: 13px;
  font-weight: 400;
  flex-grow: 1;
}

.alert-close {
  background: none;
  border: none;
  color: #fca5a5;
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: var(--transition-smooth);
}

.alert-close:hover {
  color: #ffffff;
}

/* Custom Interactive Form Groups */
.form-group-custom {
  position: relative;
  margin-bottom: 28px;
  z-index: 2;
}

.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
  transition: var(--transition-smooth);
  pointer-events: none;
}

.form-input {
  width: 100%;
  padding: 16px 16px 16px 46px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  outline: none;
  color: var(--text-main);
  font-size: 15px;
  font-family: var(--font-family);
  transition: var(--transition-smooth);
}

/* Float Label Styles */
.form-label {
  position: absolute;
  left: 46px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
  transition: var(--transition-smooth);
  transform-origin: left top;
}

/* Input Focus / Not Empty State */
.form-input:focus,
.form-input:valid {
  background: rgba(16, 185, 129, 0.03);
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.1);
}

/* Focus line expand effect */
.input-focus-line {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
  transition: var(--transition-smooth);
  transform: translateX(-50%);
}

.form-input:focus ~ .input-focus-line {
  width: calc(100% - 24px);
  border-radius: 2px;
}

/* Label transitions when input has content or focus */
.form-input:focus ~ .form-label,
.form-input:valid ~ .form-label,
.form-group-custom.field--not-empty .form-label {
  transform: translateY(-33px) scale(0.85);
  color: var(--color-primary);
  left: 16px;
  font-weight: 500;
}

.form-input:focus ~ .input-icon {
  color: var(--color-primary);
}

/* Password visibility toggle button */
.btn-password-toggle {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 16px;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-password-toggle:hover {
  color: var(--color-primary);
}

/* Options row: Remember Me & Forgot Password */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  font-size: 13px;
  position: relative;
  z-index: 2;
}

.remember-me {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  color: var(--text-muted);
}

.remember-me input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkbox-custom {
  position: relative;
  height: 18px;
  width: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  margin-right: 8px;
  transition: var(--transition-smooth);
}

.remember-me:hover input ~ .checkbox-custom {
  border-color: var(--color-primary);
  background: rgba(16, 185, 129, 0.05);
}

.remember-me input:checked ~ .checkbox-custom {
  background: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 0 10px var(--color-primary-glow);
}

.checkbox-custom::after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.remember-me input:checked ~ .checkbox-custom::after {
  display: block;
}

.checkbox-label {
  transition: var(--transition-smooth);
}

.remember-me:hover .checkbox-label {
  color: var(--text-main);
}

.forgot-pass-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.forgot-pass-link:hover {
  color: var(--color-primary);
  text-shadow: 0 0 8px var(--color-primary-glow);
}

/* Submit Button */
.btn-submit {
  width: 100%;
  height: 52px;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 100%);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
  background: linear-gradient(135deg, #0284c7 20%, #10b981 120%);
}

.btn-submit:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-spinner {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hidden {
  display: none !important;
}

/* Footer Styling */
.login-footer {
  text-align: center;
  margin-top: 35px;
  font-size: 11px;
  color: var(--text-muted);
  position: relative;
  z-index: 2;
}

/* Animations */
.animate-fade-in {
  animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.animate-shake {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* Responsive adjust */
@media (max-width: 480px) {
  .login-card {
    padding: 35px 25px 25px 25px;
    border-radius: 20px;
  }
  .login-header h3 {
    font-size: 24px;
  }
}
