/* Estilo global */
body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    color: #333;
}

/* Container geral (páginas como home.php) */
.container {
    width: 80%;
    max-width: 900px; /* Largura maior para conteúdo geral */
    margin: auto;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Container específico para formulários (register_node.php) */
.form-container {
    width: 80%;
    max-width: 500px; /* Largura reduzida para formulários */
    margin: auto;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Navegação */
nav {
    background: linear-gradient(90deg, #2e7d32, #1b5e20);
    color: white;
    padding: 15px;
    text-align: center;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

nav a {
    color: white;
    text-decoration: none;
    margin: 0 20px;
    font-weight: bold;
    font-size: 16px;
    transition: color 0.3s;
}

nav a:hover {
    color: #f1c40f;
}

/* Seções */
section {
    display: none;
    padding: 20px;
}

.active {
    display: block;
}

h1, h2 {
    color: #2e7d32;
}

h1 {
    font-size: 28px;
    margin-bottom: 20px;
    text-align: center;
}

h2 {
    font-size: 22px;
    margin-top: 30px;
}

/* Caixa de aviso */
.warning-box {
    background: #fff8e1;
    border-left: 6px solid #ffb300;
    padding: 20px;
    margin: 20px 0;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    color: #5f4b00;
    font-style: italic;
    font-size: 16px;
}

/* Formulários e Inputs */
form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

label {
    display: block;
    margin: 5px 0;
    color: #388e3c;
    font-weight: bold;
    font-size: 14px;
}

input, select {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #81c784;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 16px;
    background: #f9f9f9;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="hidden"] {
    display: none;
}

input:focus, select:focus {
    border-color: #2e7d32;
    box-shadow: 0 0 5px rgba(46, 125, 50, 0.3);
    outline: none;
}

select {
    appearance: none;
    background: url('data:image/svg+xml;utf8,<svg fill="%23388e3c" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat right 10px center;
    background-size: 16px;
}

/* Botões e Links */
button, .action-link {
    display: inline-block;
    padding: 12px 20px;
    background: linear-gradient(90deg, #4caf50, #2e7d32);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.3s, transform 0.2s;
    text-align: center;
}

button:disabled {
    background: #bdbdbd;
    cursor: not-allowed;
}

button:hover:not(:disabled), .action-link:hover {
    background: linear-gradient(90deg, #388e3c, #1b5e20);
    transform: translateY(-2px);
}

.back-button {
    background: linear-gradient(90deg, #81c784, #4caf50);
    margin-top: 15px;
}

.back-button:hover:not(:disabled) {
    background: linear-gradient(90deg, #66bb6a, #388e3c);
}

/* Mensagens de Resposta */
.response {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    font-size: 14px;
    transition: opacity 0.3s;
}

.response.success {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    color: #2e7d32;
}

.response.error {
    background: #ffebee;
    border-left: 4px solid #d32f2f;
    color: #c62828;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    text-align: center;
    padding: 15px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    z-index: 1000;
}

.cookie-banner a {
    color: #f1c40f;
    text-decoration: underline;
}

.cookie-banner button {
    background: #f1c40f;
    color: black;
    padding: 10px 15px;
    border-radius: 5px;
}

.cookie-banner button:hover {
    background: #e1b700;
    transform: none;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    color: #666;
}

footer a {
    color: #388e3c;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s;
}

footer a:hover {
    color: #2e7d32;
}

/* Listas e Pre */
ul {
    margin: 10px 0;
    padding-left: 20px;
}

pre {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
}

/* Responsividade */
@media (max-width: 600px) {
    .container, .form-container {
        width: 90%;
        padding: 20px;
    }
    nav {
        padding: 10px;
    }
    nav a {
        margin: 0 10px;
        font-size: 14px;
    }
    h1 {
        font-size: 22px;
    }
    h2 {
        font-size: 18px;
    }
    input, select, button, .action-link {
        font-size: 14px;
        padding: 10px;
    }
    .warning-box {
        font-size: 14px;
        padding: 15px;
    }
    .response {
        font-size: 12px;
    }
    .cookie-banner {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
        font-size: 12px;
    }
}

.response code {
    display: block;
    background: #f5f5f5;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    font-family: monospace;
    color: #333;
}

.response b {
    color: #2e7d32;
    font-size: 16px;
}
.modal {
    display: none; /* Oculto por padrão */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}
.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 5px;
    text-align: center;
    position: relative;
}
/* Se a mensagem for de sucesso, aumenta o tamanho da caixa */
.modal-content.success {
    max-width: 700px;
}
.modal-close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.modal-close:hover,
.modal-close:focus {
    color: black;
}
/* Estilos para mensagens de sucesso e erro */
.success {
    border-color: green;
}
.error {
    border-color: red;
}