   :root {
            --primary-color: #3b82f6;
            --primary-hover-color: #2563eb;
            --secondary-color: #10b981;
            --secondary-hover-color: #059669;
            --border-radius: 8px;
            --box-shadow: 0 4px 12px rgba(0,0,0,0.1); /* Slightly more prominent shadow */
            --light-gray: #e2e8f0;
            --text-color: #333;
        }

        body {
            font-family: 'Segoe UI', sans-serif;
            background-color: #f8fafc; /* Lighter background */
            padding: 0;
            margin: 0;
            line-height: 1.6;
            color: var(--text-color);
        }

        header {
            background: #ffffff;
            border-bottom: 1px solid var(--light-gray);
            padding: 15px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: var(--box-shadow); /* Shadow for header */
        }

        header .logo-container {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        header .logo-container img {
            height: 35px; /* Slightly larger logo */
        }

        header nav a {
            text-decoration: none;
            color: var(--primary-color);
            font-weight: 600;
            transition: color 0.2s;
        }

        header nav a:hover {
            color: var(--primary-hover-color);
        }

        h1 {
            text-align: center;
            margin: 40px auto 30px auto; /* More vertical space */
            color: var(--primary-color);
            max-width: 900px;
            padding: 0 20px;
        }

        /* Contenedor para las entradas */
        .contenedor-entradas {
            display: flex;
            flex-direction: column; /* Stack children vertically */
            gap: 20px; /* Space between entrada and segunda-entrada */
            margin-bottom: 20px;
            max-width: 1000px;
            margin-left: auto;
            margin-right: auto;
            padding: 0 20px;
        }

        .entrada {
            display: flex;
            flex-wrap: wrap; /* Allow wrapping on small screens */
            justify-content: center;
            gap: 15px; /* Increased gap */
            padding: 0 20px; /* Adjusted to be inside .contenedor-entradas for consistency */
        }

        .segunda-entrada {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 10px;
            padding: 0 20px; /* Adjusted to be inside .contenedor-entradas for consistency */
        }

        input[type="text"] {
            padding: 12px 15px; /* More padding */
            border-radius: var(--border-radius);
            border: 1px solid var(--light-gray);
            flex-grow: 1;
            max-width: 350px; /* Increased max-width */
            font-size: 1rem; /* Readable font size */
            box-shadow: inset 0 1px 3px rgba(0,0,0,0.05); /* Subtle inner shadow */
        }

        button, .button {
            padding: 12px 20px; /* More padding */
            border: none;
            border-radius: var(--border-radius);
            background-color: var(--primary-color);
            color: white;
            cursor: pointer;
            transition: background-color 0.2s ease, transform 0.1s ease; /* Smooth transition */
            font-size: 1rem;
            font-weight: 500;
            display: inline-flex; /* For consistent alignment with icons */
            align-items: center;
            gap: 8px; /* Space between text and icon */
        }

        button:hover, .button:hover {
            background-color: var(--primary-hover-color);
            transform: translateY(-1px); /* Slight lift effect */
        }

        button:active {
            transform: translateY(0); /* Press down effect */
        }

 
/* Contenedor de resultados: columnas fluidas */
#resultados {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); /* ya era flexible */
    gap: 15px;
    padding: 20px;
    border: 1px solid var(--light-gray);
    background: #ffffff;
    border-radius: var(--border-radius);
    min-height: 200px;
    margin: 0 20px 40px 20px;
    box-shadow: var(--box-shadow);
    align-items: start;
}

/* Cada pictograma: ancho flexible, alto automático */
.pictograma {
    text-align: center;
    background-color: #ffffff;
    border-radius: var(--border-radius);
    padding: 10px; /* menos padding para más espacio real de imagen */
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease;
    cursor: grab;
    position: relative;
    width: 100%; /* ocupa todo el espacio del grid */
    box-sizing: border-box; /* padding no rompe el ancho */
}


/* Reglas comunes para imagen o texto */
.pictograma img, 
.pictograma .texto-contenedor {
    width: 100%;
    max-width: 120px;
    aspect-ratio: 1/1;
    border-radius: var(--border-radius);
    border: 2px solid var(--light-gray);
    margin: 0 auto 10px auto;
    background-color: #fefefe;
    overflow: hidden;
}

/* Imagen: que no se deforme */
.pictograma img {
    height: auto;
    object-fit: contain;
    display: block; /* evita que se comporte como inline */
}

/* Texto: centrado dentro del cuadrado */
.pictograma .texto-contenedor {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: bold;
    padding: 10px;
    box-sizing: border-box;
    word-break: break-word;
}



        .pictograma:active {
            cursor: grabbing;
        }

        .pictograma:hover {
            transform: translateY(-3px); /* Slight hover lift */
        }
        .pictograma img {
            object-fit: contain; /* Ensure image fits */
        }

        .pictograma .texto-contenedor {
            font-size: 28px; /* Larger text */
            font-weight: bold;
            padding: 5px; /* Inner padding */
            word-break: break-word; /* Break long words */
        }

        .pictograma p {
            margin: 10px 0 15px 0; /* Adjust spacing */
            font-weight: 600;
            color: var(--primary-hover-color); /* Highlight word */
            font-size: 1.1rem;
        }


.acciones {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    gap: 6px;
}

/* Botones redondos y compactos */
.acciones button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border: none;
    cursor: pointer;
    color: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: background 0.2s ease, transform 0.1s ease;
}

.acciones .btn-eliminar {
    background-color: #ef4444;
}
.acciones .btn-eliminar:hover {
    background-color: #dc2626;
    transform: scale(1.05);
}

/* Botón editar (azul) */
.acciones .btn-editar {
   /* background-color: #3b82f6;*/
    background-color:#10b981;
}
.acciones .btn-editar:hover {
   /* background-color: #2563eb;*/
    background-color: #059669;
    transform: scale(1.05);
}





        .acciones button:hover {
            background-color: var(--secondary-hover-color);
        }

     
     
     .overlay {
    display: none; /* hidden by default */
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4); /* semi-transparent */
    z-index: 99;
}

.menu-edicion {
    position: fixed; /* modal-like */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    padding: 20px;
    z-index: 100;
    box-shadow: var(--box-shadow);
    display: none;
    width: 320px;
    max-width: 90vw; /* Responsive */
}

        .menu-edicion p {
            margin-top: 0;
            margin-bottom: 10px;
            font-weight: 600;
            color: var(--text-color);
        }

        .menu-edicion input[type="file"],
        .menu-edicion input[type="text"] {
            width: calc(100% - 20px); /* Account for padding */
            margin-bottom: 15px;
        }

        .menu-edicion .sugerencias {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            max-height: 180px; /* Increased max height */
            overflow-y: auto;
            padding: 5px; /* Padding for scrollable area */
            border: 1px solid var(--light-gray); /* Border for suggestions box */
            border-radius: var(--border-radius);
            background-color: #fbfbfb;
        }

        .menu-edicion .sugerencias img {
            height: 60px; /* Slightly larger suggestions */
            width: 60px; /* Maintain aspect ratio */
            object-fit: cover;
            cursor: pointer;
            border-radius: 6px;
            border: 1px solid #ccc;
            transition: transform 0.1s ease, border-color 0.2s ease;
        }
        
        .menu-edicion .sugerencias img:hover {
            transform: scale(1.05);
            border-color: var(--primary-color);
        }
        
        
        .dropdown {
            position: relative;
            display: inline-block;
        }

        .opciones-exportar {
            display: none;
            position: absolute;
            background-color: white;
            border: 1px solid var(--light-gray);
            border-radius: var(--border-radius);
            box-shadow: var(--box-shadow);
            z-index: 1;
            top: 100%;
            left: 0;
            width: 100%;
            min-width: 180px; /* Ensure a minimum width */
            margin-top: 5px; /* Small space below button */
        }

        .opciones-exportar button {
            width: 100%;
            padding: 10px 15px; /* Consistent padding */
            text-align: left;
            background: white;
            color: var(--text-color);
            border-radius: var(--border-radius); /* Apply border-radius to individual buttons */
        }

        .opciones-exportar button:hover {
            background-color: #f0f4f8; /* Lighter hover for dropdown */
            color: var(--primary-color);
        }

        footer {
            margin-top: 40px; /* More space above footer */
            padding: 20px;
            background: #ffffff;
            border-top: 1px solid var(--light-gray);
            box-shadow: 0 -2px 8px rgba(0,0,0,0.05); /* Subtle shadow above footer */
            color: #666;
        }
        .footer-content {
            display: flex;
            flex-direction: column; /* Stack on small screens */
            justify-content: space-between;
            align-items: center; /* Center items when stacked */
            gap: 15px; /* Space between footer items */
            max-width: 1200px;
            margin: 0 auto;
            text-align: center;
        }

        .footer-content div p {
            margin: 0;
            font-size: 0.9rem;
        }

        .footer-content strong {
            color: var(--primary-hover-color);
        }


  .btn-subir {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: var(--border-radius);
    background-color: var(--primary-color);
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: var(--box-shadow);

    /* 🔑 Ajustes responsivos dentro del modal */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.btn-subir:hover {
    background-color: var(--primary-hover-color);
    transform: translateY(-1px);
}

.btn-subir:active {
    transform: translateY(0);
}



        /* Responsive Adjustments */
       @media (max-width: 768px) {
            h1 {
                font-size: 1.8rem;
                margin-top: 25px;
                margin-bottom: 25px;
            }

            .entrada {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .fila1 {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
    }

    .fila1 input[type="text"] {
        flex: 1 1 auto;
        max-width: 75%;  /* ✅ más chico */
        box-sizing: border-box;
    }

    .fila1 button {
        flex: 0 0 auto;
        max-width: 25%;
        white-space: nowrap;
    }


            .dropdown button {
                width: 100%; 
            }

            #resultados {
                grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); 
                gap: 15px;
                margin: 0 15px 30px 15px;
            }

            .pictograma img, .pictograma .texto-contenedor {
                height: 100px; 
                width: 100px;
            }

            .menu-edicion {
                left: 50% !important; 
                transform: translateX(-50%);
                width: 90vw; 
            }
        }


/* --- Video responsive --- */
.video-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 20px auto;
    padding-bottom: 56.25%; /* 16:9 ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

        @media (max-width: 480px) {

            header {
                flex-direction: column;
                padding: 10px;
                gap: 10px;
            }
            header .logo-container {
                width: 100%;
                justify-content: center;
            }
            header nav {
                width: 100%;
                text-align: center;
            }

            h1 {
                font-size: 1.5rem;
                margin-top: 20px;
                margin-bottom: 20px;
            }

            .contenedor-entradas {
                padding: 0 15px;
            }

            #resultados {
                grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
                gap: 10px;
                padding: 15px;
            }

            .pictograma {
                padding: 10px;
            }

            .pictograma img, .pictograma .texto-contenedor {
                height: 80px;
                width: 80px;
            }

            .pictograma p {
                font-size: 1rem;
            }

            .acciones button {
              /*  font-size: 12px;
                padding: 4px 8px;
                */
                  width: 24px;
        height: 24px;
        font-size: 12px;
            }
            
            .footer-content {
                gap: 10px;
            }

      .btn-subir {
        font-size: 0.9rem;
        padding: 10px 14px;
    }

     .video-container {
        padding-bottom: 62%; /* un poco más alto en móviles */
    }
        }


        