body {
    background-color: #2c3e50;
    color: #ecf0f1;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.container {
    background-color: #34495e;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 600px;
    text-align: center;
}

h1 {
    color: #1abc9c;
    margin-bottom: 30px;
}

h2, h3 {
    color: #e67e22;
    margin-top: 25px;
}

.controls {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.select-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

label {
    margin-bottom: 8px;
    font-weight: bold;
    color: #bdc3c7;
}

select {
    width: 100%;
    padding: 12px;
    border-radius: 5px;
    border: 1px solid #7f8c8d;
    background-color: #5d6d7e;
    color: #ecf0f1;
    font-size: 16px;
    box-sizing: border-box;
}

select:focus {
    outline: none;
    border-color: #1abc9c;
    box-shadow: 0 0 5px #1abc9c;
}

button {
    background-color: #1abc9c;
    color: #2c3e50;
    border: none;
    padding: 15px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #16a085;
}


#resultado p {
    font-size: 16px;
    line-height: 1.6;
    color: #bdc3c7;
    word-wrap: break-word;
}

#caminho-texto {
    font-family: 'Courier New', Courier, monospace;
    font-size: 15px;
}



#resultado {
    background-color: #465a70;
    padding: 25px;
    border-radius: 8px;
    margin-top: 30px;
    text-align: left;
}

#resultado h2 {
    margin-bottom: 15px;
    color: #e67e22;
    border-bottom: 1px solid #5d6d7e;
    padding-bottom: 10px;
}

#caminho-lista {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
}

#caminho-lista li {
    background-color: #5d6d7e;
    margin-bottom: 10px;
    padding: 12px 15px;
    border-radius: 5px;
    font-size: 15px;
    color: #ecf0f1;
    display: flex;
    align-items: center;
    border-left: 5px solid #1abc9c;
}

#caminho-lista li .trecho-distancia {
    font-weight: bold;
    color: #f1c40f;
    margin-left: auto;
    padding-left: 10px;
}



.distancia-final {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #5d6d7e;
}

.distancia-final h3 {
     margin-bottom: 8px;
     color: #e67e22;
}

#distancia-total {
    font-size: 22px;
    font-weight: bold;
    color: #1abc9c;
    text-align: center;
    background-color: #34495e;
    padding: 10px;
    border-radius: 5px;
}


#caminho-lista .mensagem {
    background-color: transparent;
    border-left: none;
    color: #e74c3c;
    font-style: italic;
    padding: 10px 0;
}

.github-link {
    text-align: center;
    margin-top: -20px;
    margin-bottom: 30px;
    font-size: 0.95em;
    color: #bdc3c7;
}

.github-link a {
    color: #1abc9c;
    text-decoration: none;
    font-weight: bold;
}

.github-link a:hover {
    text-decoration: underline;
}


.visualizacoes-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-top: 20px;
    margin-bottom: 30px;
    padding: 10px;
    border-radius: 8px;
}

.imagem-item {
    flex-basis: calc(50% - 20px);
    min-width: 280px;
    margin: 10px;
    text-align: center;
    background-color: #465a70;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

.imagem-item h3 {
    color: #e67e22;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.imagem-item img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    border: 3px solid #5d6d7e;
    background-color: #ffffff;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.imagem-item .caption {
    font-size: 0.9em;
    color: #bdc3c7;
    margin-top: 12px;
    font-style: italic;
    line-height: 1.4;
}


@media (max-width: 768px) {
    .visualizacoes-container {
        flex-direction: column;
        align-items: center;
    }
    .imagem-item {
        flex-basis: 90%;
        max-width: 450px;
        margin: 15px 0;
    }
}