* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 15px;
    font-size: 2.5em;
}

.sub {
    text-align: center;
    font-size: 25px;
    padding-top: 10px;
    padding-bottom: 30px;
    color: #34495e;
    display: block;
    margin-bottom: 20px;
    background: none;
}

#div_ap, #div_pai, #div_res {
    width: calc(33.33% - 20px);
    margin: 10px;
    vertical-align: top;
    float: left;
}

form {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

form:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

h3 {
    color: #34495e;
    margin-bottom: 20px;
    font-size: 1.5em;
    text-align: center;
}

label {
    display: block;
    margin: 10px 0 5px;
    color: #2c3e50;
}

input[type="text"] {
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

input[type="text"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

button {
    background-color: #3498db;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.button-group button {
    flex: 1;
    padding: 8px 15px;
    font-size: 14px;
}

#rec {
    width: 100%;
    margin-top: 15px;
}

p {
    margin: 10px 0;
    padding: 15px;
    background-color: #e8f4f8;
    border-radius: 4px;
    display: none;
    font-size: 16px;
    line-height: 1.5;
}

/* Estilo específico para os resultados */
#ap_res, #pai_res, #np_res {
    margin: 10px 0;
    padding: 15px;
    background-color: #e8f4f8;
    border-radius: 4px;
    display: none;
    font-size: 16px;
    line-height: 1.5;
}

@media (max-width: 900px) {
    #div_ap, #div_pai, #div_res {
        width: calc(50% - 20px);
    }
}

@media (max-width: 600px) {
    #div_ap, #div_pai, #div_res {
        width: 100%;
        margin: 10px 0;
    }
    
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    h3 {
        font-size: 1.3em;
    }
    
    input[type="text"] {
        font-size: 14px;
    }
    
    button {
        font-size: 14px;
    }
}

footer {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    color: #656;
    font-size: 14px;
    border-top: 1px solid #eee;
}

footer p {
    display: block;
    margin: 5px 0;
    padding: 0;
    background: none;
    font-size: 14px;
}

footer a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: #2980b9;
}

@media (max-width: 600px) {
    footer {
        padding: 15px;
        font-size: 12px;
    }
    
    footer p {
        font-size: 12px;
    }
}