/* =====================================================
   MI PÁGINA WEB - ESTILOS GENERALES
   ===================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;

    font-family: Arial, Helvetica, sans-serif;

    background: #f5f4f1;
    color: #222;
}


/* =====================================================
   CABECERA
   ===================================================== */

.cabecera {
    height: 100px;

    background: #173A5E;
    color: white;

    display: flex;
    align-items: center;

    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);

    position: relative;
    z-index: 1000;
}


.contenedor-cabecera {
    width: 100%;
    max-width: 1200px;

    margin: 0 auto;
    padding: 0 30px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}


/* =====================================================
   LOGO
   ===================================================== */

.logo {
    color: white;
    text-decoration: none;

    font-family: Georgia, "Times New Roman", serif;

    font-size: 34px;
    font-weight: normal;

    letter-spacing: 1px;

    transition: opacity 0.25s ease;
}

.logo:hover {
    opacity: 0.75;
}


/* =====================================================
   NAVEGACIÓN
   ===================================================== */

.navegacion {
    display: flex;
    align-items: center;
    gap: 30px;
}

.navegacion a {
    color: white;
    text-decoration: none;
}


/* INICIO */

.enlace-inicio {
    font-size: 16px;

    transition: opacity 0.25s ease;
}

.enlace-inicio:hover {
    opacity: 0.65;
}


/* =====================================================
   MENÚ DESPLEGABLE
   ===================================================== */

.menu-desplegable {
    position: relative;
}

.boton-menu {
    border: none;
    background: transparent;

    color: white;

    font-family: inherit;
    font-size: 16px;

    cursor: pointer;

    padding: 10px 0;
}

.flecha {
    margin-left: 5px;
    font-size: 18px;
}


/* CONTENIDO DEL MENÚ */

.contenido-menu {
    position: absolute;

    right: 0;
    top: 100%;

    min-width: 190px;

    background: white;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.18);

    border-radius: 3px;

    overflow: hidden;

    opacity: 0;
    visibility: hidden;

    transform: translateY(8px);

    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0.2s ease;
}


/* MOSTRAR MENÚ */

.menu-desplegable:hover .contenido-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


/* ENLACES DEL MENÚ */

.contenido-menu a {
    display: block;

    padding: 13px 18px;

    color: #222;

    font-size: 15px;

    border-bottom: 1px solid #eeeeee;

    transition:
        background 0.2s ease,
        padding-left 0.2s ease;
}

.contenido-menu a:last-child {
    border-bottom: none;
}

.contenido-menu a:hover {
    background: #f2f2f2;
    padding-left: 23px;
}


/* =====================================================
   CONTENIDO PRINCIPAL
   ===================================================== */

.contenido-principal {
    width: 100%;
    max-width: 1200px;

    margin: 0 auto;

    padding: 60px 30px;

    flex: 1;
}


/* =====================================================
   PÁGINA DE INICIO
   ===================================================== */

.portada {
    text-align: center;

    padding: 80px 20px;
}

.portada h1 {
    font-family: Georgia, "Times New Roman", serif;

    font-size: 52px;
    font-weight: normal;

    margin-bottom: 20px;
}

.portada p {
    font-size: 18px;

    color: #666;

    line-height: 1.7;
}


/* =====================================================
   PIE DE PÁGINA
   ===================================================== */

.pie {
    background: #173A5E;

    color: #aaa;

    padding: 30px 20px;

    margin-top: auto;
}

.contenido-pie {
    max-width: 1200px;

    margin: 0 auto;

    text-align: center;
}

.pie-nombre {
    font-family: Georgia, "Times New Roman", serif;

    color: white;

    font-size: 20px;

    margin-bottom: 15px;
}

.enlaces-legales {
    display: flex;

    justify-content: center;
    align-items: center;

    gap: 10px;

    flex-wrap: wrap;

    margin-bottom: 15px;
}

.enlaces-legales a {
    color: #aaa;

    text-decoration: none;

    font-size: 14px;

    transition: color 0.2s ease;
}

.enlaces-legales a:hover {
    color: white;
}

.copyright {
    font-size: 13px;

    color: #777;
}


/* =====================================================
   MÓVILES
   ===================================================== */

@media (max-width: 700px) {

    .cabecera {
        height: auto;
        min-height: 90px;
    }

    .contenedor-cabecera {
        padding: 20px;

        flex-direction: column;

        gap: 15px;
    }

    .logo {
        font-size: 30px;
    }

    .navegacion {
        gap: 25px;
    }

    .contenido-principal {
        padding: 40px 20px;
    }

    .portada {
        padding: 50px 10px;
    }

    .portada h1 {
        font-size: 38px;
    }

}


/* =====================================================
   REPRODUCTOR
   Estilos integrados en el CSS general de la web.
   Mantienen el aspecto original de Audio Pro.
   ===================================================== */

.reproductor-app {
    width: 100%;
}

.reproductor-boton-todo {
    background: #173A5E;
    color: #fff;
    padding: 18px;
    border-radius: 12px;
    margin: 0 auto 20px auto;
    text-align: center;
    font-weight: bold;
    cursor: pointer;
    max-width: 500px;
}

.reproductor-carpeta {
    background: #fff;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    border: 1px solid #d9d9d9;
    align-items: center;
    cursor: pointer;
}

.reproductor-cantidad {
    font-size: 0.8rem;
    color: #777;
}

.reproductor-panel {
    width: 100%;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
}

.reproductor-oculto {
    display: none !important;
}

.reproductor-barra-superior {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reproductor-volver {
    background: none;
    color: #555;
    border: none;
    padding: 10px;
    font-size: 1.5rem;
    cursor: pointer;
}

.reproductor-estado {
    font-size: 0.6rem;
    color: #777;
}

.reproductor-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.reproductor-artista {
    color: #173A5E;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.reproductor-cancion {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 25px;
    font-weight: 300;
}

.reproductor-boton-reposo {
    width: 200px;
    background: #f0f0f0;
    color: #666;
    border: 1px solid #ccc;
    padding: 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.8rem;
    cursor: pointer;
}

.reproductor-reposo-activo {
    background: #173A5E !important;
    color: #fff !important;
    border: none;
}

.reproductor-audio {
    width: 100%;
    background: #f5f4f1;
    padding: 10px 15px;
    padding-bottom: calc(15px + env(safe-area-inset-bottom));
    border-top: 1px solid #ddd;
}

.reproductor-audio audio {
    width: 100%;
    height: 40px;
}

.reproductor-indicador {
    width: 12px;
    height: 12px;
    background: #173A5E;
    border-radius: 50%;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 10001;
    box-shadow: 0 0 8px #173A5E;
    animation: reproductor-pulse 1s infinite;
    pointer-events: none;
}

@keyframes reproductor-pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.3; }
    100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 700px) {
    .reproductor-boton-todo {
        max-width: none;
    }
}


/* =====================================================
   ACCESO PRIVADO
   ===================================================== */

.login-pagina {
    min-height: 55vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-caja {
    width: 100%;
    max-width: 420px;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.login-caja h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 32px;
    font-weight: normal;
    margin-bottom: 10px;
}

.login-caja p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

.login-caja label {
    display: block;
    margin-bottom: 7px;
    font-weight: bold;
}

.login-caja input {
    width: 100%;
    padding: 13px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    margin-bottom: 15px;
}

.login-caja button {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 6px;
    background: #173A5E;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.login-caja button:hover {
    opacity: 0.9;
}

.login-error {
    background: #f7e4e4;
    color: #8a2222;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 18px;
}

@media (max-width: 700px) {
    .login-caja {
        padding: 30px 22px;
    }
}


/* =====================================================
   CIUDADES
   Integrado en el estilos.css general de la web.
   ===================================================== */

.ciudades-contenido { width: 100%; }

.ciudades-titulo {
    text-align: center;
    margin: 0 0 20px;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: normal;
}

.ciudades-contenido select,
.ciudades-contenido button {
    padding: 0.8em;
    font-size: 1.1em;
    margin: 1em auto;
    display: block;
    background: #173A5E;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.ciudades-contenido select {
    background: #fff;
    color: #333;
    border: 1px solid #ccc;
    max-width: 500px;
    width: 100%;
}

.ciudades-contenido button:hover { opacity: 0.9; }

.ciudades-carga,
.ciudades-ubicacion,
.ciudades-resultado { text-align: center; }

.ciudades-carga {
    font-style: italic;
    color: #555;
    margin-top: 1em;
}

.ciudades-resultado {
    margin-top: 20px;
    font-size: 1.1em;
    text-align: center;
}

.ciudades-contenido ul {
    list-style-type: none;
    padding: 0;
    margin: 20px auto;
    max-width: 600px;
}

.ciudades-monumento {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    height: 350px;
    overflow: hidden;
    box-sizing: border-box;
    margin: 10px 0;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,.15);
}

.monumento-info {
    text-align: center;
    margin-bottom: 10px;
    font-size: 1em;
    color: #333;
}

.ciudades-distancia { font-size: .95em; color: #555; }

.monumento-imagen {
    max-width: 100%;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-top: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,.15);
}

.link-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 30px;
}

.link-container a {
    text-decoration: none;
    color: #173A5E;
    font-weight: bold;
}

.link-container a:hover { text-decoration: underline; }

.ciudades-audio {
    height: 30px;
    max-width: 100%;
}

.ciudades-maps-link {
    display: inline-flex;
    align-items: center;
}

.ciudades-modal {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.ciudades-modal-caja {
    background: #fff;
    color: #333;
    max-width: 600px;
    max-height: 80%;
    overflow: auto;
    padding: 20px;
    border-radius: 8px;
    position: relative;
}

.ciudades-modal-cerrar {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.ciudades-modal-lista {
    text-align: left;
    font-size: .9rem;
    margin: 1rem auto;
    max-width: 300px;
}

.ciudades-modal-boton {
    margin-top: 1rem !important;
    padding: .7rem 1.2rem !important;
    background: #173A5E !important;
    color: white !important;
    border: none !important;
    border-radius: 5px !important;
    font-size: 1rem !important;
}


/* =====================================================
   ACORDES
   Integrado en el estilos.css general de la web.
   ===================================================== */

.pagina-acordes {
    background: #fff;
    color: #000;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.1;
}

.pagina-acordes .acordes-titulo {
    text-align: center;
    margin: 0 0 8px;
}

.pagina-acordes .acordes-titulo h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.4em;
    font-weight: normal;
    margin: 0;
}

.pagina-acordes #controles {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #fafafa;
    padding: 8px 10px;
    border-bottom: 1px solid #ccc;
    box-sizing: border-box;
}

.pagina-acordes #controles button,
.pagina-acordes #controles select {
    font-family: monospace;
    font-size: 14px;
    padding: 4px 10px;
    border: 1px solid #888;
    border-radius: 4px;
    background: #f9f9f9;
    color: #000;
    cursor: pointer;
    transition: all .2s ease;
}

.pagina-acordes #controles button:hover,
.pagina-acordes #controles select:hover {
    background: #e0e0e0;
}

.pagina-acordes #contenido {
    padding: 20px;
    box-sizing: border-box;
}

.pagina-acordes .fila {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
}

.pagina-acordes .acorde {
    margin: 0;
}

.pagina-acordes h2 {
    margin: 0;
    padding: 0;
    width: 50px;
    font-size: 22px;
    text-align: left;
}

.pagina-acordes .fila div:first-of-type {
    margin-left: 90px;
}

.pagina-acordes .listaAcordes {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 5px;
    border: 1px solid #ccc;
}

.pagina-acordes .listaAcordes li {
    cursor: pointer;
    margin: 2px 0;
}

.pagina-acordes .listaAcordes li span {
    display: inline-block;
    padding: 3px 6px;
    border-radius: 4px;
    transition: background .2s ease;
}

.pagina-acordes .listaAcordes li:hover span {
    color: #c00;
    background: #ffeaea;
}

@media (max-width: 768px) {
    .pagina-acordes {
        font-size: 18px;
        line-height: 1.4;
    }

    .pagina-acordes #controles button,
    .pagina-acordes #controles select {
        font-size: 16px;
        padding: 6px 12px;
    }

    .pagina-acordes h2 {
        font-size: 20px;
    }
}


/* =====================================================
   GALERÍA
   Integrado en el estilos.css general de la web.
   Reglas aisladas para conservar el aspecto original.
   ===================================================== */

.pagina-galeria {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f4f4f4;
    font-family: Arial, Helvetica, sans-serif;
    user-select: none;
}

.pagina-galeria .galeria-contenedor {
    max-width: 900px;
    width: 100%;
    margin: 30px auto;
    padding: 0 20px;
}

.pagina-galeria .galeria-contenedor h1 {
    text-align: center;
    margin-bottom: 25px;
    color: #0056B3;
}

.pagina-galeria .galeria-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.pagina-galeria .galeria-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.2s;
    cursor: pointer;
}

.pagina-galeria .galeria-item:hover {
    transform: scale(1.02);
}

/* Igual que en el programa original */
.pagina-galeria .galeria-item img {
    width: 100%;
    display: block;
    object-fit: cover;
    pointer-events: none;
}

.pagina-galeria .galeria-item p {
    padding: 10px;
    text-align: center;
    font-size: 0.95rem;
    color: #333;
}

.pagina-galeria #modal {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.pagina-galeria #modal img {
    max-width: 90%;
    max-height: 80%;
    border-radius: 10px;
    pointer-events: none;
}

.pagina-galeria #closeBtn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.9);
    padding: 10px 14px;
    font-size: 18px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
}

.pagina-galeria .modal-controls {
    margin-top: 20px;
    display: flex;
    gap: 20px;
}

.pagina-galeria .ctrl-btn {
    background: rgba(255,255,255,0.9);
    border: none;
    padding: 10px 18px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.pagina-galeria .ctrl-btn:hover {
    background: white;
}

@media (max-width: 600px) {
    .pagina-galeria .galeria-grid {
        grid-template-columns: 1fr;
    }
}


/* =====================================================
   VÍDEOS
   Integrado en el estilos.css general de la web.
   Reglas aisladas para conservar el aspecto original.
   ===================================================== */

.pagina-videos {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f4f4f4;
    font-family: Arial, Helvetica, sans-serif;
}

.pagina-videos .videos-contenedor {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.pagina-videos .videos-contenedor h1 {
    text-align: center;
    margin-bottom: 25px;
    color: #0056B3;
}

.pagina-videos .videos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.pagina-videos .video-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: transform 0.2s;
}

.pagina-videos .video-item:hover {
    transform: scale(1.03);
}

.pagina-videos .video-item img {
    width: 100%;
    display: block;
}

.pagina-videos .video-item video {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #000;
}

.pagina-videos .video-item p {
    padding: 10px;
    text-align: center;
    font-size: 0.95rem;
    color: #333;
}

.pagina-videos #modal {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
}

.pagina-videos #modal video {
    width: 90%;
    max-width: 800px;
    border-radius: 10px;
}

@media (max-width: 800px) {
    .pagina-videos .videos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .pagina-videos .videos-grid {
        grid-template-columns: 1fr;
    }
}





/* =====================================================
   METRÓNOMO / DRUM PRO SOLOIST
   Integrado en el estilos.css general.
   El diseño propio queda aislado para no interferir
   con el resto de la web.
   ===================================================== */

.pagina-metronomo {
    --metro-primary: #ffffff;
    --metro-accent: #ff4444;
    --metro-mid: #ffca28;
    --metro-bg: #121212;
    --metro-surface: #252525;
    --metro-drum: #4cc9f0;
    --metro-solo: #a2d2ff;

    user-select: none;
    font-family: Arial, sans-serif;
    background: #000;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
}

.pagina-metronomo .metronomo-container {
    width: 92%;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
    align-self: auto;
    background: var(--metro-surface);
    padding: 1rem;
    border-radius: 24px;
    text-align: center;
    width: 92%;
    max-width: 340px;
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
}

.pagina-metronomo #beatContainer {
    display: flex;
    gap: 6px;
    justify-content: center;
    min-height: 20px;
    margin-top: 5px;
    flex-wrap: wrap;
}

.pagina-metronomo .beat-circle {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #333;
    transition: 0.1s;
}

.pagina-metronomo .active-main {
    background: var(--metro-accent);
    box-shadow: 0 0 12px var(--metro-accent);
    transform: scale(1.3);
}

.pagina-metronomo .active-mid {
    background: var(--metro-mid);
    box-shadow: 0 0 10px var(--metro-mid);
    transform: scale(1.15);
}

.pagina-metronomo .active-drum {
    background: var(--metro-drum);
    box-shadow: 0 0 12px var(--metro-drum);
    transform: scale(1.3);
}

.pagina-metronomo .active-sub {
    background: var(--metro-primary);
    transform: scale(1.1);
}

.pagina-metronomo .solo-panel {
    background: #1a1a1a;
    padding: 10px;
    border-radius: 15px;
    border: 1px solid #444;
    flex-grow: 0.1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pagina-metronomo #chordDisplay {
    font-size: 1.5rem;
    color: var(--metro-solo);
    font-weight: bold;
    margin-bottom: 2px;
    line-height: 1.1;
    letter-spacing: 1px;
}

.pagina-metronomo #scaleSuggest {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 5px;
}

.pagina-metronomo .tempo-display {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 2px 0;
    color: var(--metro-primary);
    line-height: 1;
}

.pagina-metronomo .controls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.pagina-metronomo .metronomo-container select,
.pagina-metronomo .metronomo-container button {
    padding: 8px;
    border-radius: 8px;
    border: none;
    background: #333;
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
}

.pagina-metronomo .metronomo-container .btn-main {
    background: var(--metro-primary);
    color: #000;
    font-weight: bold;
    grid-column: span 2;
    font-size: 1.2rem;
    padding: 12px;
    margin-top: 2px;
}

.pagina-metronomo .toggle-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #333;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    color: white;
}

.pagina-metronomo .label {
    font-size: 0.65rem;
    color: #aaa;
    text-transform: uppercase;
    text-align: left;
    margin-bottom: 2px;
}

.pagina-metronomo input[type="range"] {
    width: 100%;
    height: 5px;
    margin: 8px 0;
    accent-color: var(--metro-primary);
}

.pagina-metronomo sup {
    font-size: 0.6em;
    vertical-align: super;
}

.pagina-metronomo .hidden {
    display: none !important;
}


/* =====================================================
   AJEDREZ — ESTUDIO DE APERTURAS
   Integrado en el estilos.css general.
   Reglas aisladas para conservar el diseño original.
   ===================================================== */

.pagina-ajedrez {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #f8f8f8;
    box-sizing: border-box;
}

.pagina-ajedrez h1 {
    margin-bottom: 10px;
    text-align: center;
}

.pagina-ajedrez .ajedrez-contenedor {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 100%;
    box-sizing: border-box;
}

.pagina-ajedrez #board {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    width: min(90vw, 384px);
    aspect-ratio: 1;
    border: 2px solid #333;
    margin-top: 10px;
}

.pagina-ajedrez .square {
    width: 100%;
    aspect-ratio: 1;
    font-size: clamp(20px, 9vw, 36px);
    line-height: 1;
    text-align: center;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagina-ajedrez .light {
    background-color: #f0d9b5;
}

.pagina-ajedrez .dark {
    background-color: #b58863;
}

.pagina-ajedrez button,
.pagina-ajedrez select {
    font-size: clamp(14px, 4vw, 16px);
    padding: 8px 16px;
    margin: 8px 5px 0 0;
    cursor: pointer;
}

.pagina-ajedrez #btnNext {
    font-size: clamp(20px, 6vw, 22px);
    padding: 8px 16px;
    border-radius: 50%;
    background: #4CAF50;
    color: #fff;
    border: none;
    margin-top: 10px;
}

.pagina-ajedrez .highlight {
    animation: ajedrez-parpadeo 2.6s ease-in-out;
}

@keyframes ajedrez-parpadeo {
    0% { background-color: #ffe066; }
    50% { background-color: #ffca3a; }
    100% { background-color: inherit; }
}

.pagina-ajedrez #movelist {
    margin-top: 10px;
    font-family: monospace;
    white-space: pre-wrap;
    background: #fff;
    padding: 8px;
    border: 1px solid #ccc;
    min-width: 160px;
    min-height: 180px;
    font-size: clamp(12px, 3.5vw, 14px);
    max-width: 90vw;
}

.pagina-ajedrez #infoApertura {
    margin-top: 20px;
    font-family: sans-serif;
    background: #fff;
    padding: 8px;
    border: 1px solid #ccc;
    min-width: 180px;
    min-height: 180px;
    font-size: clamp(12px, 3.5vw, 14px);
    max-width: 220px;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .pagina-ajedrez {
        padding: 10px;
    }

    .pagina-ajedrez button,
    .pagina-ajedrez select {
        width: 100%;
        margin: 6px 0;
    }

    .pagina-ajedrez #btnNext {
        width: 60px;
        height: 60px;
        padding: 0;
    }

    .pagina-ajedrez .ajedrez-contenedor {
        flex-direction: column;
        align-items: center;
    }

    .pagina-ajedrez #infoApertura {
        order: 2;
        width: 100%;
        max-width: 100%;
        margin-top: 10px;
    }
}


/* =====================================================
   FUNCIONARIO — ¿QUIÉN QUIERE SER FUNCIONARIO?
   Aspecto inspirado directamente en la interfaz original.
   Aislado del resto de la web.
   ===================================================== */

.pagina-funcionario .funcionario-app{
    width:100%;
    padding:30px 20px 40px;
    display:flex;
    justify-content:center;
    box-sizing:border-box;
}

.pagina-funcionario .funcionario-inicio,
.pagina-funcionario .funcionario-juego{
    width:100%;
    max-width:760px;
    margin:0 auto;
    text-align:center;
    box-sizing:border-box;
}

.pagina-funcionario .funcionario-inicio{
    padding:45px 25px;
}

.pagina-funcionario .funcionario-logo{
    display:inline-block;
    font-family:Georgia,"Times New Roman",serif;
    font-size:30px;
    line-height:1.15;
    font-weight:bold;
    color:#173A5E;
    margin-bottom:28px;
}

.pagina-funcionario .inicio-instruccion{
    margin-bottom:15px;
    font-size:16px;
}

.pagina-funcionario #archivoTxt{
    position:absolute;
    width:1px;
    height:1px;
    opacity:0;
    pointer-events:none;
}

.pagina-funcionario .archivo-boton{
    display:inline-block;
    padding:10px 28px;
    background:#173A5E;
    color:#fff;
    border-radius:4px;
    cursor:pointer;
    font-weight:bold;
}

.pagina-funcionario .archivo-nombre{
    min-height:22px;
    margin:14px 0;
    color:#666;
}

.pagina-funcionario .btn-verde{
    border:1px solid #006b00;
    background:#008000;
    color:#fff;
    border-radius:4px;
    padding:9px 28px;
    font-weight:bold;
    cursor:pointer;
    font-size:15px;
}

.pagina-funcionario .btn-verde:disabled{
    opacity:.45;
    cursor:not-allowed;
}

.pagina-funcionario .funcionario-titulo{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:35px;
    margin-bottom:12px;
}

.pagina-funcionario .funcionario-titulo h1{
    border:1px solid #777;
    padding:7px 25px;
    margin:0;
    font-family:Arial,Helvetica,sans-serif;
    font-size:22px;
    font-weight:normal;
}

.pagina-funcionario .modo-estudio{
    display:flex;
    align-items:center;
    gap:8px;
    white-space:nowrap;
}

.pagina-funcionario .interruptor{
    width:48px;
    height:25px;
    padding:3px;
    border:1px solid #777;
    border-radius:15px;
    background:#ddd;
    cursor:pointer;
}

.pagina-funcionario .interruptor span{
    display:block;
    width:17px;
    height:17px;
    border-radius:50%;
    background:#777;
    transition:transform .2s;
}

.pagina-funcionario .interruptor.activo{
    background:#cfcfcf;
}

.pagina-funcionario .interruptor.activo span{
    transform:translateX(21px);
    background:#008000;
}

.pagina-funcionario .barra-info{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:35px;
    margin:10px 0 14px;
    font-size:14px;
}

.pagina-funcionario .puntuacion{
    border:1px solid #777;
    padding:5px 18px;
}

.pagina-funcionario .seleccion-preguntas{
    display:grid;
    gap:8px;
    width:100%;
    margin-bottom:12px;
}

.pagina-funcionario .seleccion-preguntas label{
    display:grid;
    grid-template-columns:180px 1fr 40px;
    align-items:center;
    gap:10px;
    text-align:left;
    font-size:14px;
}

.pagina-funcionario .seleccion-preguntas input[type=range]{
    width:100%;
    accent-color:#008000;
}

.pagina-funcionario .pregunta-caja{
    border:1px solid #777;
    background:#fff;
    min-height:95px;
    padding:15px;
    display:flex;
    align-items:center;
    text-align:left;
    box-sizing:border-box;
    margin:10px 0 12px;
}

.pagina-funcionario #pregunta{
    width:100%;
    white-space:pre-wrap;
    line-height:1.4;
    font-size:16px;
}

.pagina-funcionario .respuestas{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
}

.pagina-funcionario .respuesta{
    min-height:72px;
    display:grid;
    grid-template-columns:42px 1fr;
    align-items:center;
    gap:10px;
    padding:8px;
    text-align:left;
    background:#fff;
    border:1px solid #777;
    border-radius:3px;
    cursor:pointer;
    color:#222;
    font:inherit;
}

.pagina-funcionario .respuesta:hover:not(:disabled){
    background:#f4f4f4;
}

.pagina-funcionario .respuesta .numero{
    width:32px;
    height:32px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#008000;
    color:#fff;
    font-weight:bold;
}

.pagina-funcionario .respuesta.correcta{
    border:2px solid #008000;
}

.pagina-funcionario .respuesta.incorrecta{
    border:2px solid #c00000;
    background:#f9e2e2;
}

.pagina-funcionario .respuesta.incorrecta .numero{
    background:#c00000;
}

.pagina-funcionario .mensaje{
    margin:14px auto;
    padding:10px;
    font-weight:bold;
}

.pagina-funcionario .continuar{
    margin:10px auto;
}

@media(max-width:700px){
    .pagina-funcionario .funcionario-app{
        padding:15px 10px 25px;
    }
    .pagina-funcionario .funcionario-inicio{
        padding:30px 10px;
    }
    .pagina-funcionario .funcionario-titulo{
        flex-direction:column;
        gap:12px;
    }
    .pagina-funcionario .funcionario-titulo h1{
        width:100%;
        box-sizing:border-box;
        font-size:19px;
    }
    .pagina-funcionario .barra-info{
        gap:12px;
        flex-wrap:wrap;
    }
    .pagina-funcionario .seleccion-preguntas label{
        grid-template-columns:1fr;
        gap:3px;
    }
    .pagina-funcionario .respuestas{
        grid-template-columns:1fr;
    }
}


/* Selector de tests del servidor */
.pagina-funcionario .selector-tests{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:10px;
    max-width:700px;
    margin:20px auto 10px;
}
.pagina-funcionario .categoria-test,
.pagina-funcionario .test-servidor,
.pagina-funcionario .volver-tests{
    border:1px solid #777;
    background:#fff;
    color:#222;
    border-radius:4px;
    padding:10px 18px;
    cursor:pointer;
    font:inherit;
}
.pagina-funcionario .categoria-test{
    min-width:180px;
}
.pagina-funcionario .categoria-test:hover,
.pagina-funcionario .test-servidor:hover,
.pagina-funcionario .volver-tests:hover{
    background:#f1f1f1;
}
.pagina-funcionario .lista-tests{
    max-width:700px;
    margin:20px auto;
    text-align:center;
}
.pagina-funcionario .lista-tests h2{
    margin:12px 0 16px;
    font-size:1.2rem;
    color:#173A5E;
}
.pagina-funcionario .test-servidor{
    display:block;
    width:100%;
    margin:8px 0;
    text-align:left;
}
.pagina-funcionario .volver-tests{
    margin-bottom:8px;
}
.pagina-funcionario .cargando-tests,
.pagina-funcionario .error-tests,
.pagina-funcionario .test-seleccionado{
    color:#666;
}
.pagina-funcionario .test-seleccionado{
    margin:10px 0;
}
@media(max-width:700px){
    .pagina-funcionario .selector-tests{
        flex-direction:column;
    }
    .pagina-funcionario .categoria-test{
        width:100%;
    }
}


    body { font-family: sans-serif; margin: 0; padding: 0; }

    .contenedor {
  margin-top: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
  box-sizing: border-box;
}
#panelImagen, #panelResultado {
  flex: 1 1 100%;
}
@media (min-width: 600px) {
  #panelImagen { flex: 2; }
  #panelResultado { flex: 1; }
}

  


.pagina-pigmentos { 
  font-family: sans-serif;
}

    body { font-family: sans-serif; margin: 0; padding: 0; }

    .contenedor {
  margin-top: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
  box-sizing: border-box;
}
#panelImagen, #panelResultado {
  flex: 1 1 100%;
}
@media (min-width: 600px) {
  #panelImagen { flex: 2; }
  #panelResultado { flex: 1; }
}

  
/* Integración con la web común: solo el título de la aplicación */
.pagina-pigmentos .pigmentos-titulo-aplicacion {
  text-align: center;
  padding: 10px 20px 0;
  box-sizing: border-box;
}

.pagina-pigmentos .pigmentos-titulo-aplicacion h1 {
  margin: 0;
  font-size: 1.4em;
  line-height: 1.25;
}

.pagina-pigmentos .contenedor {
  margin-top: 10px;
}

@media (max-width: 599px) {
  .pagina-pigmentos .pigmentos-titulo-aplicacion h1 {
    font-size: 1.15em;
  }
}
