/* --- Styles Généraux pour la Page de Connexion --- */
.login-body {
    margin: 0;
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif; /* Police moderne et lisible */
    background: linear-gradient(160deg, #0A0A0A 0%, #1A1A1A 100%); /* Dégradé sombre et profond */
    color: #eeeaea; /* Blanc cassé pour le texte général */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* S'assure que le corps prend au moins toute la hauteur de la vue */
    overflow: hidden; /* Empêche le défilement si le contenu dépasse */
}

/* --- Conteneur de Connexion --- */
.login-container {
    background: linear-gradient(135deg, #1C1C1E 0%, #111111 100%); /* Dégradé sombre pour le formulaire */
    padding: 35px 30px; /* Plus de padding */
    border-radius: 18px; /* Très arrondis pour un look moderne */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7); /* Ombre plus profonde */
    width: 90%;
    max-width: 400px; /* Largeur maximale augmentée légèrement */
    text-align: center;
    border: 1px solid #282828; /* Bordure subtile */
    animation: fadeInScale 0.6s ease-out forwards; /* Animation d'apparition */
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.login-container h2 {
    margin-bottom: 30px; /* Plus d'espace sous le titre */
    color: #FFFFFF; /* Blanc pur pour le titre */
    font-size: 2.2em; /* Titre plus grand */
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
    padding-bottom: 10px;
}

.login-container h2::after { /* Ligne décorative sous le titre */
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 60px;
    height: 3px;
    background-color: #2E8B57; /* Vert Kinema+ */
    border-radius: 2px;
}

/* --- Formulaire de Connexion --- */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Plus d'espace entre les champs */
}

.login-form label {
    text-align: left;
    font-size: 0.95rem; /* Légèrement plus grand */
    color: #A0A0A0; /* Gris doux pour les labels */
    font-weight: 500;
    margin-bottom: 5px; /* Espace sous le label */
    display: block; /* S'assure que le label est un bloc */
}

.login-form input {
    padding: 14px 15px; /* Plus de padding */
    border: 1px solid #333333; /* Bordure sombre */
    border-radius: 10px; /* Plus arrondi */
    font-size: 1.05rem; /* Plus grand */
    background-color: #0F0F0F; /* Fond très sombre pour les inputs */
    color: #EAEAEA; /* Blanc cassé pour le texte de l'input */
    box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.2); /* Ombre intérieure subtile */
    transition: all 0.3s ease;
    width: calc(100% - 30px); /* Adjust for padding + border */
    box-sizing: border-box; /* Include padding in total width */
}

.login-form input::placeholder { /* Style for placeholder text */
    color: #777;
}

.login-form input:focus {
    outline: none; /* Supprime l'outline par défaut */
    border-color: #2E8B57; /* Bordure verte Kinema+ au focus */
    box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(46, 139, 87, 0.3); /* Lueur verte */
}

/* --- Bouton de Connexion --- */
.login-form button {
    background-color: #2E8B57; /* Vert Kinema+ */
    color: #fff;
    padding: 16px; /* Plus grand et proéminent */
    border: none;
    border-radius: 30px; /* Très arrondi */
    cursor: pointer;
    font-weight: 700; /* Plus gras */
    font-size: 1.2em; /* Plus grand */
    margin-top: 10px; /* Espace au-dessus du bouton */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4); /* Ombre plus forte */
    transition: all 0.3s ease;
    width: 100%; /* Ensure button takes full width */
}

.login-form button:hover {
    background-color: #246B44; /* Vert plus foncé au survol */
    transform: translateY(-3px); /* Effet de soulèvement */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}
.login-form button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5) inset;
    background-color: #1A5432; /* Vert encore plus foncé au clic */
}

/* --- Lien d'Inscription (Signup Link) --- */
.register-link {
    font-size: 0.95rem; /* Légèrement plus grand */
    margin-top: 25px; /* Plus d'espace au-dessus du lien */
    color: #B0B0B0; /* Gris doux pour le texte */
}

.register-link a {
    color: #3BCC7A; /* Vert Kinema+ plus clair pour le lien */
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.register-link a:hover {
    color: #E6FFEC; /* Vert très clair au survol */
    text-decoration: underline;
}

/* --- Message d'Erreur --- */
.error-message {
    font-size: 0.9rem;
    margin-top: 15px; /* Plus d'espace */
    color: #FF6B6B; /* Un rouge plus doux mais visible */
    background-color: rgba(255, 107, 107, 0.1); /* Fond légèrement teinté */
    padding: 8px 12px;
    border-radius: 5px;
    border: 1px solid #FF6B6B;
    text-align: center; /* Ensure error message text is centered */
}

/* --- Lien "Forgot Password" --- */
.forgot-password-link {
    margin-top: -10px; /* Pull it closer to the input field */
    margin-bottom: 20px; /* Space before the button */
    text-align: right; /* Align to the right */
    font-size: 0.9em;
}

.forgot-password-link a {
    color: #3BCC7A; /* Kinema+ Green for links */
    text-decoration: none;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.forgot-password-link a:hover {
    color: #E6FFEC; /* Lighter Kinema+ Green on hover */
    text-decoration: underline;
}

/* --- Styles pour la nouvelle section "Account Switcher" --- */
.account-switcher {
    margin-top: 30px; /* Space from above elements */
    padding-top: 25px; /* Space from border top */
    border-top: 1px solid #282828; /* Dark border separator */
    text-align: center;
}

.account-switcher button {
    padding: 12px 20px; /* More padding */
    background-color: #222222; /* Dark background for switcher button */
    color: #f3eded; /* Off-white text */
    border: 1px solid #3A3A3A; /* Subtle dark border */
    border-radius: 10px; /* Rounded corners */
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    margin-bottom: 15px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    display: inline-block; /* Allows width to adjust to content */
    min-width: 180px; /* Ensure a decent width */
}

.account-switcher button:hover {
    background-color: #2E8B57; /* Kinema+ Green on hover */
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.account-switcher button:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) inset;
    background-color: #246B44;
}

#accountList {
    background-color: #1A1A1A; /* Dark background for the list */
    border: 1px solid #282828;
    border-radius: 12px;
    padding: 15px;
    max-height: 250px; /* Allow more height */
    overflow-y: auto; /* Add scroll if too many accounts */
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.2); /* Subtle inset shadow */
}

#accountList ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#accountList li {
    display: flex;
    align-items: center;
    padding: 12px 10px; /* More padding */
    border-bottom: 1px solid #282828; /* Darker separator */
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

#accountList li:last-child {
    border-bottom: none;
}

#accountList li:hover {
    background-color: #222222; /* Darker background on hover */
    transform: translateX(5px); /* Subtle slide effect */
}

#accountList li img {
    width: 45px; /* Larger profile images */
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px; /* More space */
    border: 2px solid #2E8B57; /* Kinema+ Green border */
    box-shadow: 0 0 0 2px #1A1A1A; /* Inner dark border effect */
}

#accountList li .account-info {
    text-align: left; /* Align text left within the item */
}

#accountList li span {
    font-weight: 600; /* Semi-bold for name */
    color: #E0E0E0; /* Off-white for name */
    display: block; /* Ensure name takes full line */
}

#accountList li p {
    margin: 0;
    font-size: 0.85em; /* Slightly smaller for email */
    color: #A0A0A0; /* Softer gray for email */
}

#clearAllAccountsBtn {
    background-color: #7F3C3F; /* Darker red for clear all */
    color: #FF7070; /* Lighter red text */
    border: 1px solid #c0392b; /* Matching border */
    margin-top: 20px; /* More space */
    padding: 10px 18px; /* Adjusted padding */
    border-radius: 8px; /* Slightly less rounded */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    min-width: 150px; /* Ensure a decent width */
}

#clearAllAccountsBtn:hover {
    background-color: #A64E52; /* Lighter red on hover */
    color: white; /* White text on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
#clearAllAccountsBtn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) inset;
    background-color: #6C3537;
}

/* --- Responsive Adjustments --- */
@media (max-width: 480px) {
    .login-container {
        padding: 25px 20px;
        border-radius: 15px;
        max-width: 95%;
    }
    .login-container h2 {
        font-size: 2em;
        margin-bottom: 25px;
    }
    .login-container h2::after {
        width: 40px;
    }
    .login-form {
        gap: 15px;
    }
    .login-form label {
        font-size: 0.9rem;
        margin-bottom: 3px;
    }
    .login-form input {
        padding: 12px 12px;
        font-size: 1rem;
        border-radius: 8px;
        width: calc(100% - 24px); /* Adjust for padding + border */
    }
    .login-form button {
        padding: 14px;
        font-size: 1.1em;
        border-radius: 25px;
    }
    .register-link {
        font-size: 0.9rem;
        margin-top: 20px;
    }
    .error-message {
        font-size: 0.85rem;
        margin-top: 10px;
        padding: 6px 10px;
    }
    .forgot-password-link {
        font-size: 0.85em;
        margin-bottom: 15px;
    }
    .account-switcher {
        margin-top: 25px;
        padding-top: 20px;
    }
    .account-switcher button {
        padding: 10px 15px;
        font-size: 0.95em;
        border-radius: 8px;
        min-width: 160px;
    }
    #accountList {
        padding: 10px;
        max-height: 200px;
    }
    #accountList li {
        padding: 10px 8px;
    }
    #accountList li img {
        width: 40px;
        height: 40px;
        margin-right: 12px;
    }
    #accountList li span {
        font-size: 0.95em;
    }
    #accountList li p {
        font-size: 0.8em;
    }
    #clearAllAccountsBtn {
        margin-top: 15px;
        padding: 8px 15px;
        font-size: 0.9em;
        min-width: 130px;
    }
}
