/* Importar fuentes de Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600&display=swap');

/* --- Estilos Generales y del Cuerpo --- */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #121212; /* Fondo oscuro casi negro */
    color: #e0e0e0; /* Texto claro */
    font-size: 16px;
    line-height: 1.6;
}

.main-container {
    width: 100%;
    max-width: 400px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #1f1f1f; /* Contenedor principal oscuro */
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
}

.screen {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
    overflow-y: auto;
    -ms-overflow-style: none; /* IE y Edge */
    scrollbar-width: none; /* Firefox */
}

.screen::-webkit-scrollbar {
    display: none; /* Chrome, Safari y Opera */
}

.hidden {
    display: none;
}

/* --- Estilos de la Pantalla de Login --- */
#login-screen {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.logo {
    width: 150px;
    height: auto;
    margin-bottom: 16px;
}

.logo-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    color: #BDBDBD;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.welcome-subtitle {
    font-size: 1rem;
    color: #c4c4c4;
    margin-bottom: 24px;
}

.definition-text {
    font-size: 0.9rem;
    color: #8c8c8c;
    text-align: left;
    margin-top: 16px;
    border-left: 2px solid #5a5a5a;
    padding-left: 12px;
}

.google-btn {
    background-color: #4285F4;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    border: none;
    transition: background-color 0.3s ease;
}

.google-btn:hover {
    background-color: #357ae8;
}

.google-icon {
    width: 20px;
    height: 20px;
}

/* --- Estilos de la Pantalla de Consentimiento --- */
#consent-screen {
    justify-content: center;
}

.declaration-text {
    font-size: 0.9rem;
    color: #c4c4c4;
    margin-bottom: 24px;
    padding-right: 8px;
    text-align: justify;
}

.declaration-text p {
    margin-bottom: 12px;
}

#consent-checkbox {
    accent-color: #4CAF50; /* Color verde para el checkbox */
}

#start-chat-btn {
    background-color: #4CAF50;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s ease;
}

#start-chat-btn:hover {
    background-color: #45a049;
}

/* --- Estilos de la Pantalla de Chat --- */
#chat-screen {
    position: relative;
    padding: 0;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #333;
}

.top-icon-btn {
    background: none;
    border: none;
    color: #e0e0e0;
    cursor: pointer;
    padding: 8px;
}

.top-icon-btn svg {
    width: 24px;
    height: 24px;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

#time-slider {
    width: 100px;
}

#slider-value {
    font-size: 0.9rem;
    color: #c4c4c4;
}

.message-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 24px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.message-container::-webkit-scrollbar {
    display: none;
}

.message {
    margin-bottom: 16px;
    max-width: 85%;
    padding: 10px 15px;
    border-radius: 20px;
    line-height: 1.4;
}

.bot-message {
    background-color: #2a2a2a;
    color: #e0e0e0;
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

.user-message {
    background-color: #4a4a4a;
    color: #f0f0f0;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.chat-input-container {
    padding: 16px 24px;
    border-top: 1px solid #333;
    display: flex;
    gap: 8px;
}

#chat-input {
    flex-grow: 1;
    padding: 10px 15px;
    border-radius: 20px;
    border: 1px solid #333;
    background-color: #2a2a2a;
    color: #e0e0e0;
    font-size: 1rem;
    outline: none;
}

#send-btn {
    padding: 10px 20px;
    border-radius: 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 500;
}

.button-group {
    display: flex;
    justify-content: space-between;
    padding: 16px 24px;
}

.action-btn {
    flex-grow: 1;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s ease;
}

.unlock-btn {
    background-color: #007bff; /* Azul para desbloquear */
    color: white;
    margin-right: 8px;
}

.unlock-btn:hover {
    background-color: #0056b3;
}

.exit-btn {
    background-color: #dc3545; /* Rojo para salir */
    color: white;
}

.exit-btn:hover {
    background-color: #c82333;
}

/* --- Estilos para la Caja de Mensajes Flotante --- */
.message-box {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 350px;
    background-color: #2c3e50;
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    font-size: 0.9rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.message-box.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-20px);
}

/* --- Estilos del Footer --- */
.footer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    border-top: 1px solid #333;
    background-color: #1a1a1a;
    font-size: 0.8rem;
    color: #999;
    text-align: center;
}

.footer-logo {
    height: 20px;
    margin-right: 8px;
    opacity: 0.6;
}