/* CSS Variables */
:root {
    --primary-color: #002147;
    --accent-color: #00bfff;
    --text-color: #ffffff;
    --input-bg: rgba(255, 255, 255, 0.1);
    --shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s ease;
    --gradient-start: rgba(0, 33, 71, 0.9);
    --gradient-end: rgba(0, 191, 255, 0.3);
}

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body with explicit gradient and fallback */
body {
    min-height: 100vh;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    position: relative;
    background: var(--primary-color); /* Fallback color */
    background: -webkit-linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-transform: translateZ(0); /* Force hardware acceleration */
    transform: translateZ(0); /* Prevent repaint issues */
}

/* Particles container */
.background-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2; /* Ensure it's behind everything */
    overflow: hidden;
    background: transparent; /* Explicitly transparent */
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: float infinite linear;
    pointer-events: none;
    will-change: transform; /* Optimize animation */
}

/* Login container */
.login {
    padding: 1rem;
    width: 100%;
    max-width: 400px;
    margin: 1rem auto;
    position: relative;
    z-index: 1;
}

.dalla-login {
    background: rgba(0, 33, 71, 0.85);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: clamp(1rem, 5vw, 2rem);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 0.5s ease-in;
}

/* Logo */
.picture-logo {
    width: clamp(50px, 15vw, 70px);
    height: clamp(50px, 15vw, 70px);
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.5rem;
    display: block;
    transition: transform 0.3s ease;
}

/* Title */
.h1 {
    color: var(--text-color);
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Input containers */
.box, .box2 {
    position: relative;
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
}

.input-box {
    position: relative;
}

/* Input fields */
.i-user, .i-pass {
    width: 100%;
    padding: clamp(10px, 2vw, 12px) 40px clamp(10px, 2vw, 12px) 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    transition: var(--transition);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Password toggle */
.password-toggle {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.8;
    transition: var(--transition);
}

.password-toggle:hover {
    opacity: 1;
}

/* Icons */
.bxs-user, .bxs-lock-alt {
    color: var(--text-color);
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    opacity: 0.8;
}

/* Checkbox */
.rem {
    margin: clamp(1rem, 3vw, 1.5rem) 0;
}

.chuchu {
    color: var(--text-color);
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* Button */
.btn {
    width: 100%;
    padding: clamp(10px, 2vw, 12px);
    border: none;
    border-radius: 8px;
    background: linear-gradient(45deg, var(--accent-color), #007bff);
    color: var(--text-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

/* Particle animation */
@keyframes float {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-100vh) scale(1);
        opacity: 0;
    }
}
/* Responsive adjustments */
@media (max-width: 768px) {
    .login {
        padding: 1.5rem;
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .login {
        padding: 1rem;
        max-width: 95%;
    }
}

@media (max-width: 320px) {
    .h1 {
        line-height: 1.2;
    }
    
    .password-toggle {
        right: 30px;
    }
}
/* Toast Notification */
#toast-container {
    position: fixed;
    bottom: 20px;
    top: 20px;
    z-index: 10000;
    max-width: 500px; /* Increased from 300px */
}

.toast {
    background-color: #333;
    color: #fff;
    padding: 20px; /* Increased from 15px for better spacing */
    margin-bottom: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    position: relative;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
    font-size: 16px; /* Increased from 14px for readability */
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background-color: #28a745;
}

.toast.error {
    background-color: #dc3545;
}

.toast.warning {
    background-color: #ffc107;
}

/* Progress Bar */
.toast .progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background-color: #fff;
    width: 100%;
    animation: shrink 5s linear forwards;
}

@keyframes shrink {
    from {
        width: 100%;
    }
    to {
        width: 0;
    }
}

/* Animations remain the same */