/* Estilos Generales */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f6f9;
    color: #333;
    text-align: center;
    padding: 20px;
}

/* Contenedor Principal */
.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Header */
header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.logo {
    max-width: 120px;
}

h1 {
    font-size: 24px;
    font-weight: bold;
    color: black;
}

h1 span {
    color: #333;
    font-size: 18px;
    font-weight: normal;
}

.logo-name {
    height: 20px; /* Ajusta el tamaño del logo */
    vertical-align: middle; /* Alinea con el texto "by" */
    margin-left: 5px; /* Espacio entre "by" y el logo */
}

.description {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin-top: -5px;
}

/* Diseño Principal */
.main-content {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

/* Historial de Búsquedas */
.history-section {
    flex: 1; /* Ocupa 1/3 del espacio */
    background: #F9FAFB; /* Gris muy claro */
    padding: 15px;
    border-radius: 8px;
    text-align: left;
}

.history-section h2 {
    font-size: 16px;
    color: #333;
    text-align: center;
}

#historyList {
    list-style: none;
    padding: 0;
}

/* Estilos de cada historial */
#historyList li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    margin: 3px 0;
    border-radius: 6px;
    font-size: 14px;
    color: #333; /* Texto negro */
    background: transparent; /* Sin fondo por defecto */
    transition: background 0.2s ease-in-out;
    cursor: pointer;
}

/* Sutil cambio al hacer hover */
#historyList li:hover {
    background: #F3F4F6; /* Un gris aún más claro */
}

/* Botón de eliminación más discreto */
.delete-btn {
    background: transparent;
    color: #dc2626;
    border: none;
    padding: 4px 6px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0; /* Ocultar el botón por defecto */
    transition: opacity 0.2s ease-in-out;
}

/* Mostrar botón solo al hacer hover */
#historyList li:hover .delete-btn {
    opacity: 1;
}

/* Cambio de color sutil al hacer hover sobre el botón */
.delete-btn:hover {
    background: rgba(220, 38, 38, 0.1); /* Rojo muy claro */
}



/* Sección de Búsqueda y Resultados (Más Importancia) */
.search-results-container {
    flex: 2; /* 2/3 del espacio */
}

.search-section {
    text-align: center;
    margin-bottom: 10px;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

input {
    flex: 1;
    padding: 12px;
    font-size: 16px;
    border: 2px solid #ccc;
    border-radius: 8px;
    outline: none;
}

input:focus {
    border-color: #1A53E6;
}

button {
    background-color: #1A53E6;
    color: white;
    padding: 12px 20px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background-color: #1A53E6;
}

/* Sección de Resultados */
.results-section {
    text-align: left;
}

.results-section h2 {
    text-align: center;
}

#resultsList {
    list-style: none;
    padding: 0;
}

#resultsList li {
    background: #EDE9FE;
    color: #1A53E6;
    padding: 10px;
    margin: 5px 0;
    border-radius: 6px;
    transition: background 0.3s;
}

#resultsList li:hover {
    background: #C7D2FE;
}

/* Ocultar elementos */
.hidden {
    display: none;
}

/* Ajuste del botón de menú en móviles */
.menu-button {
    display: none; /* Oculto por defecto */
}

/* Ajustar historial en escritorio */
@media (min-width: 769px) {
    .history-section {
        position: relative;
        left: 0 !important;
        width: auto;
        height: auto;
        box-shadow: none;
    }
}

/* Ajustar el historial como barra lateral en móviles */
@media (max-width: 768px) {
    .history-section {
        position: fixed;
        top: 0;
        left: -100%; /* Oculto por defecto */
        width: 60%; /* Ocupa solo el 60% de la pantalla */
        height: 100%;
        background: #F9FAFB;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease-in-out;
        padding: 20px;
        z-index: 1000;
        overflow-y: auto;
    }

    /* Mostrar historial cuando está activo */
    .history-section.active {
        left: 0;
    }

    /* Mostrar botón de menú solo en móviles */
    .menu-button {
        display: block;
        position: fixed;
        top: 15px;
        left: 15px;
        background: #1A53E6;
        color: white;
        border: none;
        padding: 10px;
        font-size: 18px;
        cursor: pointer;
        border-radius: 5px;
        z-index: 1100;
    }
}