/* Light Theme Variables */
:root {
    --bg-color: #f8fafc;
    --text-color-primary: #1f2937;
    --text-color-secondary: #4b5563;
    --glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.4));
    --glass-border: rgba(255, 255, 255, 0.8);
    --shadow-color: rgba(99, 102, 241, 0.2);
    --form-input-bg: rgba(255, 255, 255, 0.5);
    --form-input-border: rgba(209, 213, 219, 0.7);
}

body {
    font-family: 'Nunito Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color-primary);
    overflow: hidden; /* Prevent body scrollbars */
    background: linear-gradient(
        135deg,
        rgba(139, 92, 246, 0.25),   /* light purple */
        rgba(168, 85, 247, 0.15)    /* softer violet */
    );;
    background-size: cover;
    background-position: center;
}

#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;

    background: url('../images/login-bg.jpg') no-repeat center center fixed; /* 🔹 BG image */
    background-size: cover; /* 🔹 Full screen fit */
}

/* This is for the floating logo in the top-left */
.main-logo {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    animation: upDownAnimation 3s ease-in-out infinite;
}

.main-logo img {
    max-width: 225px; /* You can adjust the size here */
    height: auto;
}

/* This is the animation for the floating logo */
@keyframes upDownAnimation {
    0%, 100% {
        transform: translateY(-5px);
    }
    50% {
        transform: translateY(5px);
    }
}

.main-content {
    position: relative;
    z-index: 1;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.39);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(7.9px);
    -webkit-backdrop-filter: blur(7.9px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 16px 40px 0 var(--shadow-color);
    transition: background 0.3s ease, border 0.3s ease;
}

.form-input {
    background-color: var(--form-input-bg);
    border: 1px solid var(--form-input-border);
    color: var(--text-color-primary);
    transition: all 0.3s ease;
}

/* Floating Label Styles */
.float-label-input:focus ~ .form-label-float,
.float-label-input:not(:placeholder-shown) ~ .form-label-float {
    transform: translateY(-1.7rem) scale(0.85);
    color: #4f46e5; /* indigo-600 */
    background-color: #f8fafc;
    padding: 0 0.25rem;
}

.form-label-float {
    position: absolute;
    pointer-events: none;
    left: 1rem;
    top: 0.8rem;
    transition: all 0.2s ease-out;
    color: var(--text-color-secondary);
    background-color: transparent;
    transform-origin: 0 0;
}

.form-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.4);
    border-color: #6366f1;
}

.login-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    background: #1731eda6;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(19, 41, 169, 0.3);
    z-index: 0; /* 👈 important: text will stay above */
}

/* Hover background layers */
.login-btn::before,
.login-btn::after {
    content: '';
    position: absolute;
    top: 0;
    height: 100%;
    width: 0;
    transition: width 0.4s ease;
    z-index: -1; /* 👈 keeps layers behind text */
}

.login-btn::before {
    left: 0;
    background: #5f75f3; /* Left side color */
}

.login-btn::after {
    right: 0;
    background: #3548c6; /* Right side color */
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(19, 41, 169, 0.4);
}

/* Custom SweetAlert2 Toast for Login */
.login-swal {
  background: #fff3f3 !important;          /* light red background */
  color: #991b1b !important;               /* dark red text */
  border: 1px solid #fecaca !important;    /* soft red border */
  border-radius: 12px !important;          /* rounded corners */
  font-size: 15px !important;
  font-weight: 500 !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18) !important;
  padding: 10px 16px !important;
}

/* Title text */
.login-swal .swal2-title {
  font-size: 16px !important;
  font-weight: 600 !important;
}

/* Progress bar */
.login-swal .swal2-timer-progress-bar {
  background: linear-gradient(to right, #ef4444, #f87171) !important;
  height: 4px !important;
  border-radius: 4px !important;
}


/* On hover, expand both halves */
.login-btn:hover::before,
.login-btn:hover::after {
    width: 50%;
}


/* Custom SweetAlert2 Toast for Login */
.login-swal {
  background: #fff3f3 !important;          /* light red background */
  color: #991b1b !important;               /* dark red text */
  border: 1px solid #fecaca !important;    /* soft red border */
  border-radius: 12px !important;          /* rounded corners */
  font-size: 15px !important;
  font-weight: 500 !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18) !important;
  padding: 10px 16px !important;
}

/* Title text */
.login-swal .swal2-title {
  font-size: 16px !important;
  font-weight: 600 !important;
}

/* Progress bar */
.login-swal .swal2-timer-progress-bar {
  background: linear-gradient(to right, #ef4444, #f87171) !important;
  height: 4px !important;
  border-radius: 4px !important;
}
