        body, html {
            background-color: #000000; /* Fondo negro */
            background-image: 
                linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
                linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
            background-size: 50px 50px; /* Tamaño de la cuadrícula */
            margin: 0;
            padding: 0;
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            font-family: sans-serif;
            overflow: hidden;
        } 
        

        /* nav bar */

        .navbar {
            width: 100%;
            background-color: #000000;
            overflow: hidden;
        }

        .navbar a {
            float: left;
            display: block;
            color: rgb(255, 255, 255); /* Letras verdes */
            text-align: center;
            padding: 7px 18px;
            text-decoration: none;
            border-radius: 7px; /* Ajuste del radio de los bordes */
            background-color: rgb(0, 0, 0); /* Fondo blanco */
            font-weight: bold; /* Hace el texto más grueso */
            font-size: 13px;
            box-shadow: 1px 2px 3px #ffc30f52; /* Añade sombra para efecto de profundidad */
            transition: background-color 0.3s, transform 0.3s; /* Transición suave */
            margin-top: 12px; /* Espacio superior */
        }

        .navbar a:hover {
            background-color: #ffc30f35; /* Fondo verde al pasar el ratón */
            color: white; /* Letras blancas */
            transform: translateY(-3px); /* Levanta ligeramente el botón al hacer hover */
        }

        .dropdown {
            float: left;
            overflow: hidden;
        }

        .dropdown .dropbtn {
            font-size: 16px;
            border: none;
            outline: none;
            color: white;
            padding: 14px 20px;
            background-color: inherit;
            font-family: inherit;
            margin: 0;
        }

        .dropdown-content {
            display: none;
            position: absolute;
            background-color: #f9f9f9;
            min-width: 160px;
            box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
            z-index: 1;
        }

        .dropdown-content select {
            color: black;
            padding: 12px 16px;
            text-decoration: none;
            display: block;
            width: 100%;
            background: none;
            border: none;
            font-size: 16px;
        }

        .dropdown-content select:hover {
            background-color: #ddd;
        }

        .dropdown:hover .dropdown-content {
            display: block;
        }

        .dropbtn .icon {
            width: 25px; /* Ajusta el tamaño según sea necesario */
            height: 25px; /* Ajusta el tamaño según sea necesario */
            vertical-align: middle; /* Alinea verticalmente el ícono */
        }

        .container {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            align-items: center;
            padding: 0px 0px 20px 0px;
            overflow: hidden;
        }

        .avatar {
            width: 100%;
            height: 60vh;
            min-height: 200px;
            position: relative;
            margin-bottom: 0px;
            background-color: #00000000;
        }

        .avatar canvas {
            width: 100%;
            height: 100%;
            position: absolute;
            top: 0;
            left: 0;
            object-fit: cover;
            pointer-events: none; /* Desactiva la interacción con el cursor */
        }

        .message-container {
            position: relative;
            width: 70%;
            //margin-bottom: auto; /* Mayor separación del borde inferior */
        }

        .message {
            height: 15vh;
            max-height: -webkit-fill-available;
            overflow-y: auto;
            background-color: rgb(255, 255, 255);
            white-space: pre-wrap;
            padding: 10px;
            border-radius: 10px;
            box-shadow: 0 0 10px rgba(255, 255, 255, 0.726);
            color: rgb(5, 5, 5);
            text-align: left;
            margin-bottom: auto; /* Mayor separación del borde inferior */
        }

        .message a {
            color: blue;
            text-decoration: underline;
        }

        .loading-overlay {
            position: absolute;
            top: 1%;
            left: 1%;
            width: 97%;
            height: 95%;
            background-color: rgba(255, 255, 255, 0.8); /* Fondo translúcido */
            justify-content: center;
            align-items: center;
            border-radius: 10px;
            display: none; /* Oculto por defecto */
        }

        .loading-gif {
            width: 100px; /* Ajusta el tamaño según lo necesario */
        }

        .user-label {
            color: #c70039; /* Cambia el color de 'Tú: ' */
            font-weight: bold; /* Negrita */
            font-size: 17px;
        }

        .emma-label {
            color: #219ebc; /* Cambia el color de 'Emma: ' */
            font-weight: bold; /* Negrita */
            font-size: 17px;
        }



        .input-container {
            position: relative;
            width: 70%;
            display: flex;
            align-items: center;
            
        }

        .input-container input[type="text"] {
            width: 100%;
            padding: 10px;
            padding-right: 45px; /* Espacio para el ícono del micrófono */
            border: 1px solid #ccc;
            border-radius: 7px;
            box-sizing: border-box;
            font-size: 16px;
        }

        .input-container .mic-button {
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            cursor: pointer;
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 40px; /* Tamaño fijo para el botón */
            height: 40px; /* Tamaño fijo para el botón */
        }

        .mic-button {
            box-shadow: 0px 0px 0px #ffffff !important; /* Asegura que no haya sombra */
        }

        .input-container .mic-button:hover {
            background: none !important; /* Asegura que el fondo no cambie */
            transform: translateY(-50%) !important; /* Asegura que no haya transformación */
            box-shadow: none !important; /* Elimina cualquier sombra */
        }

        .input-container .mic-icon {
            width: 23px;
            height: 23px;
        }

        .controls {
            width: 70%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 10px;
        }

        .controls button {
            padding: 4px 20px;
            border: 1px solid #ffc30f8c; /* Mantén el borde igual que el input */
            border-radius: 7px; /* Mantén la misma curvatura que el input */
            background-color: #000000;
            color: white;
            cursor: pointer;
            height: 40px; /* Asegura que la altura sea consistente */
            box-sizing: border-box; /* Asegura que el padding no afecte la altura */
            transition: background-color 0.3s, transform 0.3s;
            text-align: center; /* Asegura que el texto esté centrado */
            width: 30%;
        }

        .controls button:hover {
            background-color: #333333;
            transform: translateY(-2px); /* Levanta ligeramente el botón al hacer hover */
        }

        /* Ajuste del espacio entre botones */
        .controls button + button {
            margin-left: 5px; /* Aumenta el espacio entre los botones */
        }

        /* Botón para Crear Plan Estudio */
        .create-plan {
            padding: 4px 20px;
            border: 1px solid #ffc30f8c;
            border-radius: 7px;
            background-color: #000000;
            color: white;
            font-weight: bold;
            cursor: pointer;
            height: 37px;
            box-sizing: border-box;
            transition: background-color 0.3s, transform 0.3s;
            text-align: center;
        }

        .create-plan:hover {
            background-color: #333333;
            transform: translateY(-2px);
        }

        /* Botón para Consultar */
        .send-message {
            padding: 10px 20px;
            border: 1px solid #ffc30f8c;
            border-radius: 7px;
            background-color: #000000;
            color: white;
            font-weight: bold;
            cursor: pointer;
            height: 40px;
            box-sizing: border-box;
            transition: background-color 0.3s, transform 0.3s;
            text-align: center;
            margin-left: 5px;
        }

        .send-message:hover {
            background-color: #333333;
            transform: translateY(-2px);
        }

        /* Oculta el botón de mobile en desktop */
        .desktop-only {
            display: inline-block;
        }

        .mobile-only {
            display: none;
        }

        /* Nueva clase para ocultar el botón Crear Plan Estudio */
        .hide-create-plan {
            display: none !important; /* Oculta el botón */
        }

        /* Nueva clase para hacer que el botón Consultar ocupe todo el ancho */
        .full-width {
            width: 30% !important;
        }

        /* Estilos para mobile */
        @media (max-width: 600px) {

            .container{
                padding: 0px 0px 20px 0px;
            }

            .avatar {
            height: 47vh;
            }

            .message-container {
                position: relative;
                width: 97%;
                margin-bottom: 0px; /* Ajusta el margen inferior */
            }

            .message {
                margin-bottom: 0px; /* Ajusta el margen inferior */
                font-size: 15px; /* Ajusta el tamaño de la letra en mobile */
                height: 13vh;
            }

            .message p {
                margin: 4px 0; /* Reduce el espacio entre líneas */
            } 
            
            .controls {
                width: 97%; 
                margin-top: 10px;       
            }

            .input-container {
                width: 100%; /* Ajustar el ancho para dejar espacio al botón de enviar */
            }

            .input-container .mic-button {
                right: 10px !important; /* Asegura que el ícono esté alineado a la derecha */
                top: 50%;
                transform: translateY(-50%) !important;
                width: 40px;
                height: 40px;
            }

            .controls {
                flex-direction: row;
                justify-content: space-between;
            }

            .controls button {
                width: auto;
                margin-bottom: 0;
                padding: 0px 20px;
            }

            /* Muestra el botón de mobile y oculta el de desktop */
            .desktop-only {
                display: inline-block;
            }

            .mobile-only {
                display: none;
                width: 90%; /* Asegura que ocupe un buen espacio en mobile */
                margin: 5px 0px 0px 0px;
            }

            /* Contenedor para los botones de mobile */
            .mobile-controls {
                display: flex;
                justify-content: center;
                width: 90%;
                margin: 7px 0px 0px 0px;
                display: none;
            }

            /* Estilos para los botones en mobile */
            .mobile-consultar {
                width: 45%;
                padding: 0px 20px;
                border: 1px solid #ffc30f8c;
                border-radius: 7px;
                background-color: #000000;
                color: white;
                font-weight: bold;
                cursor: pointer;
                height: 37px;
                box-sizing: border-box;
                text-align: center;
                transition: background-color 0.3s, transform 0.3s;
                margin-right: 4px;
                margin-left: 4px;
            }

            .mobile-consultar:hover {
                background-color: #333333;
                transform: translateY(-2px);
            }

            .generateStudyPlan.mobile-only {
                width: 45%;
                padding: 2px 20px;
                margin-left: 4px;
            }
        

            .full-width {
            width: 90% !important;
        }       
        }

        .hidden-dropdown {
            display: none !important;
        }

        /* PopUP */

        .modal {
            display: none;
            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: 5% auto;
            padding: 20px;
            border: 1px solid #888;
            width: 80%;
            max-width: 600px;
            border-radius: 10px;
        }

        .login-modal {
            
            display: none; /* Force hiding when needed */
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            overflow: auto;
            background-color: rgba(0,0,0,0.4);
            display: flex ;
            align-items: center;
        }

        .login-modal-content {
            background-color: #ffffff;
            margin: 5% auto;
            padding: 20px;
            border: 1px solid #888;
            width: 80%;
            max-width: 600px;
            border-radius: 10px;
            height: 80vh;
            display: flex;
            flex-direction: column;
            justify-content: space-around;
        }

        /* Targeting only h2 and p inside .login-modal-content */
        .login-modal-content h2 {
            font-size: 50px; /* Increase the font size for the title */
            font-weight: bold;
            margin: 0px;
            text-align: center;
            color: #219ebc; /* Color for Emma branding */
        }

        .login-modal-content p {
            font-size: 17px; /* Adjust for readability */
            line-height: 1.6; /* Add space between lines for a clean look */
            text-align: justify; /* Justify the text for better readability */
            color: #333; /* Soft, dark color for better contrast */
            font-family: sans-serif; /* Clean, modern font */
            border-radius: 5px; /* Softens the look */
            box-shadow: 4px 5px 8px rgb(0 0 0 / 15%); /* Adds a subtle shadow for depth */
            //transition: all 0.3s ease; /* Smooth transition effect */
            padding: 3px 14px;
            margin: 0px;
        }

        @media (max-width: 600px) {
            .login-modal-content h2 {
            font-size: 32px; /* Increase the font size for the title */            
            }

            .login-modal-content p {
                box-shadow: 4px 5px 8px rgb(0 0 0 / 8%); /* Adds a subtle shadow for depth */
                line-height: 1.4; /* Add space between lines for a clean look */
                padding: 2px 0px;
                font-size: 16px; /* Adjust for readability */
            }

            .login-modal-content {
            height: 70vh;            
            }
        }


        .login-modal-content p:hover {
            background-color: rgba(240, 248, 255, 0.6); /* Changes background color on hover */
            transform: scale(1.02); /* Slight zoom effect */
            box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2); /* Enhanced shadow on hover */
        }

        /* Botón "Continuar" */
        .continue-btn {
            background-color: #000;
            color: white;
            border: none;
            padding: 12px 20px;
            font-size: 18px;
            border-radius: 10px;
            cursor: pointer;
            transition: background-color 0.3s ease;    
            display: flex;
            justify-content: center;
            align-items: center;
            width: 60%;
            align-self: center;
            margin-top: 20px;
        }

        .continue-btn:hover {
            background-color: #333;
        }

        @media (max-width: 600px) {
            .continue-btn {
                width: 100%;
            }
        }

        /* Estilos para el popup de bienvenida */
        .login-modal.welcome-popup .login-modal-content {
            width: 400px;
            max-width: 80%;
            padding: 30px;
            height: auto;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        .login-modal.welcome-popup h2 {
            font-size: 40px;
            margin-bottom: 20px;
            text-align: center;
        }

        .login-modal.welcome-popup p {
            font-size: 18px;
            text-align: justify;
            margin-top: 20px;
            margin-bottom: 20px;
            box-shadow: 4px 5px 8px rgb(0 0 0 / 0%);
        }

        .login-modal.welcome-popup #googleLoginBtn {
            display: none;
        }

        .login-modal.welcome-popup #continueBtn {
            display: block;
            margin-top: 20px;
        }

        @media (max-width: 600px) {
            .login-modal.welcome-popup .login-modal-content {
                width: 90%;
            }

            .login-modal.welcome-popup h2 {
                font-size: 30px;
            }

            .login-modal.welcome-popup p {
                font-size: 16px;
                
            }
        }

        .close {
            color: #aaa;
            float: right;
            font-size: 28px;
            font-weight: bold;
        }

        .close:hover,
        .close:focus {
            color: black;
            text-decoration: none;
            cursor: pointer;
        }

        /* Ajuste del contenedor de las tarjetas */
        .metadata-container {
            display: flex;
            flex-direction: row;
            overflow-x: auto;
            white-space: nowrap; /* Evita que las tarjetas se alineen en nuevas filas */
            padding: 10px;
            scroll-behavior: smooth; /* Suaviza el scroll horizontal */
            margin-top: 10px;
        }

        /* Estructura de las tarjetas */
        .metadata-card {
            background-color: #f9f9f9;
            border: 0px solid #ffc30f;
            border-radius: 10px;
            width: 280px;
            margin-right: 15px;
            padding: 7px;
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
            display: inline-block;
            text-align: left;
            white-space: normal;
        }

        .metadata-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;    
            padding-right: 5px;
        }

        .resource-type {
            background-color: #219ebc;
            padding: 2px 5px;
            border-radius: 15px;
            color: white;
            font-size: 12px;
            font-weight: bold;
            margin: 0;
        }

        .reviews {
            font-size: 12px;
            color: #c700399e;
            margin-left: 10px;
        }

        .metadata-body {
            display: flex;
            align-items: flex-start;
            flex-direction: row;
            margin-bottom: 2px;
        }

        .metadata-image {
            margin-right: 10px;
        }

        .metadata-image img {
            width: 60px;
            height: 60px;
            object-fit: cover;
            border-radius: 5px;
        }

        .metadata-details {
            display: flex;
            flex-direction: column;
            justify-content: center;
            flex-grow: 1;
        }

        .product-name {
            font-size: 14px;
            font-weight: bold;
            color: #333;
            overflow: hidden;
            text-overflow: ellipsis;
            margin-top: 0px;
            margin-bottom:0px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
        }        

        .students-enrolled {
            font-size: 12px;
            color: #888;
            margin-bottom: 0px;
            margin-top: 0;
        }

        .author {
            font-size: 11px;
            color: #666;
            margin-bottom: 10px;
            margin-top: 0;
            //margin-bottom: 0;
        }

        .metadata-price {
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
        }

        .price {
            font-size: 14px;
            margin-bottom: 10px;
            color: #000;
        }

        .discount-price {
            color: #c70039;
            font-weight: bold;
        }

        .buy-button {
            display: inline-block;
            padding: 7px 15px;
            background-color: #219ebc;
            color: rgb(255, 255, 255);
            text-decoration: none;
            border-radius: 5px;
            font-weight: bold;
            text-align: center;
        }

        .buy-button:hover {
            background-color: #c70038;
        }

        @media (max-width: 600px) {
            .metadata-card {
                width: 180px;
            }

            .product-name {
                display: -webkit-box;
                -webkit-line-clamp: 2;
                -webkit-box-orient: vertical;
            }

            .author {
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            };
        
            .students-enrolled {
                font-size: 10px !important;
            }

            .buy-button{
                font-size: 12px;
                padding: 5px 15px;
            }
            .price {
            font-size: 12px;
            }
            .metadata-image img {
                width: 50px;
                height: 50px;
            }
            
        }

        /* Botón para Iniciar Sesión con Google en el Popup */
        .google-login-btn {
            background-color: #000;
            color: white;
            border: none;
            padding: 12px 20px;
            font-size: 18px;
            border-radius: 10px;
            cursor: pointer;
            transition: background-color 0.3s ease;    
            display: flex;
            justify-content: space-evenly;
            align-items: center;
            width: 60%;
            align-self: center;
        }

        @media (max-width: 600px) {
            .google-login-btn {
            width: 100%; /* Full width for the login button */
        }}



        .google-login-btn:hover {
            background-color: #000000;
        }

        .google-login-btn img {
            width: 30px; /* Adjust icon size */
            height: 30px;
            margin-right: 8px; /* Spacing between icon and text */
        }

        .logout-icon {
            float: right !important;
            margin-top: 13px !important;
            margin-right: 20px !important;
            padding: 0 !important;
            box-shadow: none !important;
        }

        .logout-icon img.icon {
            width: 27px; /* Adjust the size */
            height: 27px;
            vertical-align: middle;
        }

        .logout-icon:hover {
            transform: scale(1.1); /* Slightly enlarge on hover */
            transition: transform 0.3s;
        }
