/* === FONTES E ESTILOS GLOBAIS === */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

body {
    font-family: 'Roboto', sans-serif;
    /* background-color: #f0f2f5; */ /* Comentado - agora usa imagem */
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px 0 0 0; /* Adicionado padding no topo, removido dos outros lados */
    box-sizing: border-box;

    /* === ADICIONADO: Imagem de Fundo === */
    background-image: url('senha-seguras.jpg'); /* Certifique-se que a imagem está no lugar certo */
    background-size: cover;                  /* Cobre toda a área */
    background-position: center center;      /* Centraliza a imagem */
    background-repeat: no-repeat;            /* Não repetir a imagem */
    background-attachment: fixed;            /* Mantém a imagem fixa durante o scroll */
}

*, *:before, *:after {
  box-sizing: inherit;
}

/* ================================= */
/* === ESTILOS DO CABEÇALHO      === */
/* ================================= */
/* (Cabeçalho inalterado - mantido sólido para estrutura) */
.header-compact {
    background-color: #2980b9; /* Azul */
    color: white;
    padding: 10px 20px;
    width: 100%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    /* margin-bottom: 20px; */ /* Removido - body tem padding agora */
}
.header-compact-content { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: center; }
.header-logo { height: 40px; width: auto; margin-right: 15px; display: block; }
.header-compact-text { text-align: left; }
.header-compact-text h1 { margin: 0; font-size: 1.5em; font-weight: 700; line-height: 1.1; color: #ffffff; }
.header-compact-text p { margin: 0; font-size: 0.9em; font-weight: 400; color: #ffff00; }

/* ================================= */
/* === ESTILOS DO CONTAINER PRINCIPAL (EFEITO VIDRO) === */
/* ================================= */
.container {
    /* background-color: #ffffff; */ /* Removido fundo sólido */
    padding: 30px;
    border-radius: 15px; /* Aumentado um pouco para look mais suave */
    max-width: 550px;
    width: 90%; /* Levemente mais estreito para ver mais fundo nas laterais */
    text-align: center;
    margin: 20px auto; /* Adicionado margem em cima/baixo */

    /* === ADICIONADO/ALTERADO: Efeito Vidro (Glassmorphism) === */
    background-color: rgba(255, 255, 255, 0.15); /* Fundo branco BEM transparente */
    backdrop-filter: blur(10px);             /* Desfoque do que está atrás */
    -webkit-backdrop-filter: blur(10px);     /* Para compatibilidade com Safari antigo */
    border: 1px solid rgba(255, 255, 255, 0.25); /* Borda clara sutil */
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.25); /* Sombra mais pronunciada para destacar */

    /* === AJUSTADO: Cor padrão do texto dentro do container para melhor contraste === */
    color: #111; /* Texto mais escuro por padrão */
}

/* Título H1 DENTRO do container da ferramenta */
.container h1 {
    color: #ffffff;
    /* background-color: #2980b9; */ /* Fundo sólido removido */
    background-color: rgba(41, 128, 185, 0.7); /* Azul com transparência para integrar */
    padding: 12px 20px;
    border-radius: 8px; /* Borda ajustada */
    margin-top: 0;
    margin-bottom: 30px;
    font-size: 1.6em;
    display: block;
    /* box-shadow: 0 2px 4px rgba(0,0,0,0.1); */ /* Sombra talvez desnecessária agora */
    border-bottom: 1px solid rgba(255, 255, 255, 0.3); /* Linha inferior sutil */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3); /* Sombra no texto para legibilidade */
}

/* --- Ajustes finos nos elementos internos para contraste/vidro --- */

.result-container {
    background-color: rgba(233, 236, 239, 0.5); /* Fundo do resultado semi-transparente */
    border-radius: 5px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.2); /* Borda sutil */
    margin-bottom: 25px; /* Aumentar espaço */
}

#password-output {
    background-color: transparent;
    color: #000000; /* Texto PRETO para máximo contraste no input */
    font-weight: 500; /* Levemente mais grosso */
    padding: 12px 15px;
    border: none;
    font-size: 1.1em;
    outline: none;
    border-radius: 3px;
    transition: box-shadow 0.2s ease-in-out;
}
#password-output::placeholder { /* Estilo do placeholder */
    color: #555;
    opacity: 0.8;
}
#password-output:focus {
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.5);
}

.icon-button { /* Botão de cópia - pode ficar sólido */
    background-color: #3498db;
    border: none;
    color: white;
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.1s ease, box-shadow 0.2s ease;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Sombra leve */
}
.icon-button:hover { filter: brightness(110%); box-shadow: 0 4px 8px rgba(0,0,0,0.15); }
.icon-button:active { transform: scale(0.97); }
.icon-button svg { fill: currentColor; width: 20px; height: 20px; vertical-align: middle;}
#copy-btn { flex-shrink: 0; margin-left: 5px; padding: 10px 12px; }
#copy-btn.copied { background-color: #2ecc71; }
#copy-btn.copied span { margin-left: 5px; }

.generate-btn-style { /* Botão Gerar - pode ficar sólido */
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease, box-shadow 0.2s ease;
    width: 100%;
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15); /* Sombra leve */
}
.generate-btn-style:hover { background-color: #c0392b; box-shadow: 0 5px 10px rgba(0,0,0,0.2); }
.generate-btn-style:active { transform: scale(0.99); }
.generate-btn-style svg { width: 24px; height: 24px; margin-right: 8px; fill: currentColor; }
.generate-btn-style span { line-height: 1; }

/* Área de Opções com efeito vidro leve */
.options {
    margin-bottom: 25px;
    text-align: left;
    border: 1px solid rgba(221, 221, 221, 0.4); /* Borda mais transparente */
    padding: 15px;
    border-radius: 8px; /* Borda mais suave */
    background-color: rgba(250, 250, 250, 0.3); /* Fundo semi-transparente */
}
.option { margin-bottom: 15px; display: flex; align-items: center; flex-wrap: wrap; }
.option:last-child { margin-bottom: 0; }
.option label {
    margin-right: 10px;
    flex-basis: 200px;
    flex-grow: 1;
    margin-bottom: 5px;
    color: #222; /* Cor escura para labels */
    font-weight: 500; /* Levemente mais grosso */
}
.option input[type="number"] { width: 60px; padding: 8px; border: 1px solid rgba(204, 204, 204, 0.7); border-radius: 4px; text-align: center; margin-right: 5px; background-color: rgba(255,255,255,0.7); color: #111; }
.option input[type="checkbox"] { margin-right: 8px; cursor: pointer; transform: scale(1.2); accent-color: #3498db; /* Cor do check */ }
.option span#length-value { font-weight: bold; color: #0056b3; /* Azul mais escuro */ min-width: 25px; display: inline-block; text-align: right; text-shadow: 0 0 1px white; /* Sombra clara */ }

/* Medidor de Força */
.strength-container { margin-bottom: 25px; text-align: left; }
.strength-container label { display: block; margin-bottom: 8px; font-weight: bold; color: #111; }
.strength-meter { width: 100%; height: 15px; background-color: rgba(224, 224, 224, 0.5); border-radius: 10px; overflow: hidden; margin-bottom: 5px; border: 1px solid rgba(255,255,255,0.2); }
#strength-bar { height: 100%; width: 0%; background-color: #e74c3c; border-radius: 10px; transition: width 0.5s ease-in-out, background-color 0.5s ease-in-out; }
#strength-bar.very-weak { background-color: #e74c3c; }
#strength-bar.weak { background-color: #f39c12; }
#strength-bar.medium { background-color: #f1c40f; }
#strength-bar.strong { background-color: #2ecc71; }
#strength-bar.very-strong { background-color: #1abc9c; }
#strength-text {
    font-size: 0.9em;
    color: #000; /* Texto preto */
    font-weight: bold;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.7); /* Sombra clara para destacar */
}

/* Caixa de Dicas com efeito vidro leve */
.tips-container {
    margin-top: 30px;
    text-align: left;
    background-color: rgba(238, 247, 255, 0.4); /* Fundo azul claro semi-transparente */
    border: 1px solid rgba(189, 224, 255, 0.5); /* Borda azul clara semi-transparente */
    padding: 20px;
    border-radius: 8px;
}
.tips-container h2 {
    color: #004085; /* Azul escuro */
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3em;
    text-align: center;
    text-shadow: 0 0 2px rgba(255,255,255,0.5);
}
.tips-container ul { list-style: disc; padding-left: 25px; margin: 0; }
.tips-container li { margin-bottom: 10px; line-height: 1.5; color: #222; /* Texto escuro */ }
.tips-container li strong { color: #0056b3; font-weight: 700; }


/* ================================= */
/* === ESTILOS DO RODAPÉ         === */
/* ================================= */
/* (Rodapé inalterado - mantido sólido para estrutura) */
.tool-footer { background-color: #343a40; color: #adb5bd; padding: 20px; text-align: center; font-size: 0.9em; margin-top: auto; width: 100%; }
.tool-footer-links { margin-bottom: 10px; }
.tool-footer-links a { color: #dee2e6; text-decoration: none; margin: 0 5px; transition: color 0.2s ease; }
.tool-footer-links a:hover { color: #ffffff; text-decoration: underline; }

/* ================================= */
/* === AJUSTES DE RESPONSIVIDADE === */
/* ================================= */
@media (max-width: 768px) { /* Ponto de quebra maior para ajustes de vidro */
     .container {
        width: 95%;
        padding: 20px;
        margin: 15px auto;
        /* background-color: rgba(255, 255, 255, 0.25); */ /* Aumentar opacidade se necessário */
        /* backdrop-filter: blur(8px); */ /* Reduzir blur se performance for problema */
     }
     .container h1 {
        font-size: 1.4em;
     }
}

@media (max-width: 600px) {
    body { padding-top: 15px; } /* Menos padding no topo */
    .header-compact-content { /* Ajustes do Header */ }
     .header-logo { height: 30px; margin-right: 10px; }
    .header-compact-text h1 { font-size: 1.2em; }
     .header-compact-text p { font-size: 0.8em; }

    .container h1 { font-size: 1.3em; padding: 10px 15px; }

    .option label { flex-basis: 100%; margin-bottom: 5px; }
    .option input[type="number"], .option span#length-value { margin-left: 0; width: 50px; }
    .generate-btn-style { padding: 12px 15px; font-size: 1em; }
    .generate-btn-style svg { width: 20px; height: 20px; margin-right: 5px;}
    .tips-container h2 { font-size: 1.2em; }
    .tool-footer { padding: 15px; font-size: 0.8em; }
}