@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

:root {
    --primary-color: #007bff;
    --primary-dark: #0056b3;
    --secondary-color: #6c757d;
    --background-color: #eef2f6;
    --surface-color: #ffffff;
    --text-color: #333;
    --border-color: #dee2e6;
    --accent-color: #28a745;
    --shadow: 0 4px 15px rgba(0,0,0,0.08);
    --hover-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, var(--background-color) 0%, #dce4eb 100%);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
}

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

/* --- Transições --- */
.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

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

.fade-out {
    animation: fadeOut 0.5s ease-in forwards; /* Duração de 0.5s */
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-20px); } /* Movimento para cima ao sair */
}


/* --- Estilos do Login --- */
.login-box {
    background: var(--surface-color);
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-align: center;
    max-width: 420px;
    margin: 50px auto;
    border: 1px solid rgba(0, 123, 255, 0.1);
}

.login-box h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-box p {
    margin-bottom: 30px;
    color: var(--secondary-color);
    font-size: 1.1em;
}

.input-group {
    margin-bottom: 25px;
    text-align: left;
}

/* --- Estilo para o campo de senha com ícone --- */
.input-field-password {
    position: relative;
}

.input-field-password #password {
    padding-right: 45px; /* Abre espaço para o ícone dentro do campo */
}

.input-field-password #togglePassword {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(15%); /* Ajuste fino de alinhamento vertical */
    cursor: pointer;
    color: var(--secondary-color);
    transition: color 0.2s;
}

.input-field-password #togglePassword:hover {
    color: var(--primary-color);
}
/* ------------------------------------------- */

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
    font-size: 1em;
}

.input-group label i {
    margin-right: 8px;
    color: var(--primary-color);
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
    background-color: var(--background-color);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
    background-color: var(--surface-color);
}

.login-box button {
    width: 100%;
    padding: 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-box button i {
    font-size: 1.1em;
}

.login-box button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 123, 255, 0.3);
}

.error-message {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 12px;
    border-radius: 8px;
    margin-top: 20px;
    font-weight: 500;
}

/* --- Estilos da Página de Downloads (sem alterações) --- */
header { text-align: center; margin-bottom: 40px; position: relative; padding-top: 20px; }
header h1 { font-size: 2.8em; color: var(--primary-color); margin-bottom: 10px; font-weight: 700; }
header p { font-size: 1.1em; color: var(--secondary-color); }
.logout-button { position: absolute; top: 20px; right: 0; background-color: #dc3545; color: white; padding: 10px 18px; border-radius: 25px; text-decoration: none; font-weight: 500; transition: background-color 0.3s, transform 0.2s; display: flex; align-items: center; gap: 8px; }
.logout-button:hover { background-color: #c82333; transform: scale(1.05); }
.logout-button i { font-size: 1.1em; }
.download-list { display: flex; flex-direction: column; gap: 20px; }
.download-item { background: var(--surface-color); border-radius: 12px; padding: 20px 25px; display: flex; align-items: center; box-shadow: var(--shadow); transition: transform 0.3s ease-out, box-shadow 0.3s ease-out; border: 1px solid var(--border-color); }
.download-item:hover { transform: translateY(-7px); box-shadow: var(--hover-shadow); }
.file-icon { font-size: 3em; color: var(--accent-color); margin-right: 25px; min-width: 60px; text-align: center; }
.file-info { flex-grow: 1; }
.file-info h3 { margin: 0 0 5px 0; font-size: 1.3em; color: var(--text-color); }
.file-info p { margin: 0; color: var(--secondary-color); font-size: 1em; }
.download-button { background-color: var(--primary-color); color: white; padding: 12px 22px; border-radius: 25px; text-decoration: none; font-weight: 500; display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; transition: background-color 0.3s, transform 0.2s; box-shadow: 0 4px 10px rgba(0, 123, 255, 0.2); }
.download-button:hover { background-color: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 6px 15px rgba(0, 123, 255, 0.3); }

/* --- Responsividade (sem alterações) --- */
@media (max-width: 768px) { body { padding: 15px; align-items: flex-start; } .login-box { padding: 30px; margin: 30px auto; } .login-box h2 { font-size: 1.8em; } header h1 { font-size: 2.2em; } .logout-button { position: static; display: block; margin-top: 20px; width: fit-content; margin-left: auto; margin-right: auto; } .download-item { flex-direction: column; align-items: flex-start; text-align: left; padding: 15px; } .file-icon { margin-right: 0; margin-bottom: 15px; } .file-info { width: 100%; margin-bottom: 15px; } .download-button { margin-top: 0; width: 100%; justify-content: center; } }
@media (max-width: 480px) { .login-box { padding: 25px; } .login-box h2 { font-size: 1.5em; } .login-box p { font-size: 0.95em; } .input-group input, .login-box button { font-size: 15px; } header h1 { font-size: 1.8em; } .file-info h3 { font-size: 1.1em; } .file-info p { font-size: 0.9em; } }