/* 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: linear-gradient(rgb(0 0 0 / 35%), /* top side gradient color */ rgb(0 0 0 / 11%) /* bottom side gradient color */), url(../images/login-bg.jpg) no-repeat center center fixed;
    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: rgb(255 255 255 / 33%);
    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;
    padding: 70px 40px;
}

.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: #1731eda6; /* 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: #1731eda6;
}

.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;
}


/* ===== RESPONSIVE MEDIA QUERIES ===== */

/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) {
    .glass-effect {
        padding: 60px 35px;
    }
    
    .main-logo img {
        max-width: 200px;
    }
}

/* Medium devices (tablets, 768px to 991px) */
@media only screen and (max-width: 991px) {
    .glass-effect {
        padding: 50px 30px;
        margin: 20px;
    }
    
    .main-logo {
        top: 15px;
        left: 15px;
    }
    
    .main-logo img {
        max-width: 180px;
    }
    
    body {
        overflow: auto; /* Re-enable scroll for tablets */
    }
}

/* Small devices (landscape phones, 576px to 767px) */
@media only screen and (max-width: 767px) {
    .glass-effect {
        padding: 40px 25px;
        margin: 15px;
        border-radius: 12px;
    }
    
    .main-logo {
        position: relative;
        top: auto;
        left: auto;
        text-align: center;
        margin-bottom: 20px;
    }
    
    .main-logo img {
        max-width: 160px;
    }
    
    .main-content {
        padding: 20px 15px;
    }
    
    .login-btn {
        padding: 12px;
        font-size: 0.9rem;
    }
}

/* Extra small devices (phones, 575px and down) */
@media only screen and (max-width: 575px) {
    .glass-effect {
        padding: 30px 20px;
        margin: 10px;
        border-radius: 10px;
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }
    
    .main-logo img {
        max-width: 140px;
    }
    
    .form-label-float {
        left: 0.8rem;
        top: 0.6rem;
        font-size: 0.9rem;
    }
    
    .float-label-input:focus ~ .form-label-float,
    .float-label-input:not(:placeholder-shown) ~ .form-label-float {
        transform: translateY(-1.5rem) scale(0.8);
    }
    
    .login-btn {
        padding: 10px;
        font-size: 0.85rem;
    }
    
    .login-btn:hover {
        transform: translateY(-1px); /* Reduced hover effect on mobile */
    }
}

/* Orientation-specific adjustments */
@media only screen and (max-width: 767px) and (orientation: landscape) {
    .glass-effect {
        padding: 35px 20px;
    }

    img.h-20 {
        width: 65%;
    }

    .flex.justify-center.mb-8 {
        margin-bottom: 15px;
    }
    
    .main-logo {
        position: relative;
        top: auto;
        left: auto;
        text-align: center;
        /* margin-bottom: 20px; */
        margin-top: 10px;
        justify-items: center;
    }
    
    .main-logo img {
        max-width: 175px;
    }
}

/* High-resolution displays */
@media only screen and (min-resolution: 2dppx) {
    .glass-effect {
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
}