/* Estilos Gerais */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    /* Imagem de fundo */
    background-image: url('bloco-notas.jpg');
    background-color: #fffacd; /* Cor fallback caso a imagem não carregue */
    background-size: cover; /* Cobre toda a área */
    background-position: center center; /* Centraliza a imagem */
    background-attachment: fixed; /* Mantém a imagem fixa durante o scroll */
    color: #333;
    line-height: 1.6;
    padding-top: 80px; /* Espaço para o header fixo (ajuste conforme altura do header) */
    padding-bottom: 100px; /* Espaço para o footer (ajuste conforme altura do footer) */
    min-height: 100vh; /* Garante que o body ocupe pelo menos a altura da tela */
    display: flex; /* Ajuda a posicionar o footer em baixo */
    flex-direction: column; /* Empilha header, main content, footer */
}

/* --- Estilos do Cabeçalho --- */
.header-compact {
    background-color: #0056b3; /* Azul um pouco mais escuro */
    padding: 10px 0;
    text-align: center;
    position: fixed; /* Mantém no topo */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000; /* Garante que fique sobre outros elementos */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Sombra sutil */
}

.header-compact-content {
    max-width: 600px; /* Alinha com o app-container */
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center; /* Centraliza conteúdo */
    padding: 0 15px; /* Espaçamento lateral */
}

.header-logo {
    height: 45px; /* Ajuste a altura do logo */
    width: auto; /* Mantém proporção */
    margin-right: 15px; /* Espaço entre logo e texto */
}

.header-compact-text h1 {
    color: #ffffff; /* Cor branca */
    font-size: 1.6rem; /* Tamanho do título principal */
    margin: 0 0 3px 0; /* Remove margem padrão e adiciona pequena margem inferior */
    font-weight: bold;
}

.header-compact-text p {
    color: #ffeb3b; /* Cor amarela */
    font-size: 0.9rem; /* Tamanho do subtítulo */
    margin: 0; /* Remove margem padrão */
}
/* --- Fim Estilos do Cabeçalho --- */

/* Contêiner principal do aplicativo */
main {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    padding: 30px 0;
}

.app-container {
    max-width: 600px;
    width: 95%;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background-color: rgba(255, 255, 255, 0.65);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* --- Estilo Título da Ferramenta --- */
.tool-title-container {
    background-color: #007bff; /* Azul */
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tool-title-container h1 {
    margin: 0;
    font-size: 1.7rem;
    color: white;
}

.tool-title-container h1 i {
     margin-right: 10px;
     color: #ffeb3b; /* Ícone amarelo */
}
/* --- Fim Estilo Título da Ferramenta --- */

/* Ajuste no H2 ("Suas Notas") */
h2 {
    text-align: center;
    color: #4a4a4a;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

h2 i {
    margin-right: 8px;
    color: #007bff; /* Ícone azul */
}

/* Área de Input */
.note-input-area {
    margin-bottom: 30px;
    text-align: center;
}

#note-input {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    margin-bottom: 10px;
    resize: vertical;
    background-color: rgba(255, 254, 240, 0.85); /* Fundo levemente transparente */
    color: #333; /* <<< COR DO TEXTO DEFINIDA AQUI >>> */
}
#note-input::placeholder {
    color: #666; /* Cor do texto placeholder */
}

#add-note-btn {
    padding: 10px 20px;
    background-color: #5cb85c; /* Verde */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}
#add-note-btn:hover {
    background-color: #4cae4c;
}
#add-note-btn i {
    margin-right: 5px;
}

/* Lista de Notas */
#notes-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.note {
    background-color: rgba(255, 254, 240, 0.9);
    padding: 15px;
    border-radius: 5px;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100px;
    border-left: 5px solid #f0ad4e;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.note:hover {
    transform: translateY(-3px);
    box-shadow: 4px 6px 15px rgba(0, 0, 0, 0.2);
}

.note p {
    margin-bottom: 15px;
    word-wrap: break-word;
    flex-grow: 1;
    color: #333; /* Cor do texto da nota exibida */
}

.note-actions {
    text-align: right;
    margin-top: auto;
}

.note-actions button {
    background: none;
    border: none;
    color: #777;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
    margin-left: 8px;
    transition: color 0.3s ease;
}

.note-actions .edit-btn:hover {
    color: #0275d8; /* Azul */
}

.note-actions .delete-btn:hover {
    color: #d9534f; /* Vermelho */
}

/* Modal de Edição */
.modal {
    display: none;
    position: fixed;
    z-index: 1050; /* Acima do header */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 25px;
    border: 1px solid #888;
    width: 100%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    text-align: left;
}

#edit-textarea {
    width: 100%;
    min-height: 150px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 1rem;
    resize: vertical;
    color: #333; /* Garante a cor do texto no modal de edição também */
}

.modal-actions {
    text-align: right;
}

.modal-actions button {
    padding: 10px 18px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.95rem;
    margin-left: 10px;
    transition: background-color 0.3s ease;
}

.modal-actions button i {
    margin-right: 5px;
}

#save-edit-btn {
    background-color: #5cb85c;
    color: white;
}
#save-edit-btn:hover {
    background-color: #4cae4c;
}

#cancel-edit-btn {
    background-color: #f0ad4e;
    color: white;
}
#cancel-edit-btn:hover {
    background-color: #ec971f;
}

/* --- Estilos do Rodapé --- */
.tool-footer {
    background-color: #343a40; /* Cinza escuro */
    color: #f8f9fa; /* Texto quase branco */
    padding: 25px 15px;
    text-align: center;
    width: 100%;
    flex-shrink: 0; /* Impede que o footer encolha */
}

.tool-footer-links {
    margin-bottom: 10px;
}

.tool-footer-links a {
    color: #adb5bd;
    text-decoration: none;
    margin: 0 8px;
    transition: color 0.3s ease;
}

.tool-footer-links a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.tool-footer div:last-of-type {
    font-size: 0.9em;
    color: #ced4da;
    margin-top: 5px;
}
/* --- Fim Estilos do Rodapé --- */


/* Responsividade */
@media (max-width: 768px) {
    .header-compact-content {
        flex-direction: column;
        text-align: center;
    }
     .header-logo {
         margin-right: 0;
         margin-bottom: 8px;
         height: 40px;
     }
     .header-compact-text h1 {
         font-size: 1.4rem;
     }
     .header-compact-text p {
         font-size: 0.8rem;
     }
     body {
        padding-top: 110px;
        padding-bottom: 80px;
     }

    main {
        padding: 20px 0;
    }

    .app-container {
        width: 90%;
        padding: 20px;
    }

     .tool-title-container h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    #notes-list {
         grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
         gap: 12px;
    }
}

@media (max-width: 600px) {
    #add-note-btn, .modal-actions button {
        font-size: 0.9rem;
        padding: 9px 16px;
    }

    .tool-footer {
        padding: 20px 10px;
    }
    .tool-footer-links a {
        margin: 0 5px;
    }
    .tool-footer div:last-of-type {
        font-size: 0.8em;
    }
}

@media (max-width: 400px) {
    .header-logo {
        height: 35px;
    }
    .header-compact-text h1 {
        font-size: 1.2rem;
    }
     body {
        padding-top: 100px;
     }
    .app-container {
        padding: 15px;
    }
    .tool-title-container h1 {
        font-size: 1.3rem;
    }
    h2 {
        font-size: 1.2rem;
    }
     #note-input {
        min-height: 70px;
    }
    #notes-list {
         grid-template-columns: 1fr;
         gap: 10px;
    }
    .note {
        padding: 12px;
    }
    .note-actions button {
        font-size: 1rem;
    }
}

/* Adicional: Estilo para placeholder para garantir visibilidade */
#note-input::placeholder {
    color: #666;
    opacity: 1; /* Garante que não esteja transparente por algum motivo */
}

/* Adicional: Estilo para o textarea no modal de edição */
#edit-textarea {
    width: 100%;
    min-height: 150px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 1rem;
    resize: vertical;
    color: #333; /* Garante a cor aqui também */
}
#edit-textarea::placeholder {
    color: #666;
    opacity: 1;
}