/* Importa los estilos de subtemas al inicio */
@import url('arte-subtemas.css');
@import url('juegos-subtemas.css');

/* --- Estilos generales y para ACERCA --- */
body.bg-acerca {
    background: url('../img/backround/bg_acerca.gif') no-repeat center center fixed !important;
    background-size: cover !important;
    background-color: #000 !important;
}
body {
    background: none !important;
    color: #fff;
    font-family: 'Courier New', Courier, monospace;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}
.card {
    border-radius: 0;
    box-sizing: border-box;
}
.btn-link {
    display: inline-block;
    color: #fff;
    border: 1px solid #fff;
    background: transparent;
    padding: 0.3em 0.8em;
    margin-bottom: 0.2em;
    text-decoration: none;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1em;
    transition: background 0.2s, color 0.2s;
    border-radius: 2px;
    text-align: center;
}
.btn-link:hover {
    background: #7a1a1a;
    color: #fff;
    border-color: #7a1a1a;
}

/* --- ACERCA LAYOUT --- */
.acerca-layout {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    min-height: 100vh;
    width: 100vw;
    padding-left: 32px;
    padding-right: 32px;
    box-sizing: border-box;
}
.acerca-layout .nav-card {
    margin: 32px 32px 40px 0;
    min-width: 180px;
    width: 220px;
    background: #000;
    border: 2px solid #fff;
    border-right: 4px double #7a1a1a;
    min-height: 500px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1em;
}
.acerca-layout .nav-card a {
    color: #fff;
    text-decoration: underline;
    font-size: 1rem;
    transition: color 0.2s, background 0.2s, border-bottom 0.2s;
    border-bottom: 1px dotted #7a1a1a;
    padding: 2px 2px;
    border-radius: 2px;
    font-weight: bold;
    letter-spacing: 0.5px;
}
.acerca-layout .nav-card a:hover {
    color: #7a1a1a;
    background: #fff1;
    border-bottom: 1px solid #fff;
}
.acerca-layout .nav-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.acerca-layout .nav-card li {
    margin-bottom: 1.1rem;
}
.temas-card {
    background: #111;
    border: 2px solid #fff;
    border-radius: 8px;
    margin-top: 1em;
    padding: 1.2em 1em 1em 1em;
    box-shadow: 0 0 0 2px #7a1a1a22 inset;
}
.temas-card h2 {
    color: #fff;
    font-size: 1.05rem;
    margin: 0 0 0.7em 0;
    border-bottom: 1px solid #fff;
    padding-bottom: 0.3em;
    font-weight: normal;
    letter-spacing: 1px;
}
.temas-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.temas-list li {
    margin-bottom: 1em;
}
.temas-list a {
    color: #fff;
    text-decoration: underline;
    font-size: 1em;
    border-bottom: 1px dotted #7a1a1a;
    transition: color 0.2s, background 0.2s, border-bottom 0.2s, box-shadow 0.2s;
    padding: 2px 2px;
    border-radius: 2px;
    position: relative;
    z-index: 1;
}
.temas-list a:hover {
    color: #7a1a1a;
    border-bottom: 1px solid #fff;
    background: none;
}
.temas-list a.active-tema {
    color: #fff;
    background: #232326;
    border-bottom: 2px solid #fff;
    font-weight: bold;
    box-shadow: 0 2px 12px #23232699, 0 0 0 2px #fff3 inset;
    text-shadow: 0 1px 4px #000b;
    outline: 1.5px solid #7a1a1a55;
}
.main-acerca-card {
    background: #000;
    border: 2.5px solid #fff;
    margin: 0;
    padding: 3rem 3.5rem 2.5rem 3.5rem;
    max-width: 660px;
    min-width: 300px;
    width: 100%;
    min-height: 85vh;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-shadow: none;
    color: #fff;
    font-family: 'Courier New', Courier, monospace;
    margin-top: 32px;
    overflow: hidden; /* Oculta scroll general */
}

/* Contenedor desplazable solo para el contenido */
#main-content {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.5rem;
    /* Altura máxima para que el header quede fijo arriba */
    max-height: calc(85vh - 4.5rem); /* Ajusta según el header y padding */
}

/* Scrollbar personalizada solo para el contenido desplazable */
#main-content::-webkit-scrollbar {
    width: 16px;
    height: 16px;
}
#main-content::-webkit-scrollbar-track {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAAFElEQVQIW2M4fPz0////GYAYyAIASnoKpV3w4kgAAAAASUVORK5CYII=");
    image-rendering: pixelated;
    filter: grayscale(100%);
}
#main-content::-webkit-scrollbar-thumb {
    border-top: 1px solid #cccccc;
    border-left: 1px solid #cccccc;
    border-right: 1px solid black;
    border-bottom: 1px solid black;
    box-shadow: inset 1px 1px 0 0 white, inset -1px -1px 0 0 #868a8e;
    width: 16px;
    height: 16px;
    background-color: #cccccc;
    z-index: 1;
}
#main-content::-webkit-scrollbar-corner {
    background-color: #cccccc;
}
#main-content::-webkit-resizer {
    width: 16px;
    height: 16px;
    background-color: #cccccc;
}
#main-content::-webkit-scrollbar-button {
    display: none;
}

/* Ojo decorativo */
.ojo-decorativo {
    position: fixed;
    right: 32px;
    bottom: 32px;
    width: 135px;
    height: 68px;
    opacity: 1;
    background: transparent;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    transition: opacity 0.22s;
}
.ojo-decorativo.temblor {
    animation: ojo-temblor 0.22s infinite;
}
@keyframes ojo-temblor {
    0% { transform: translate(0, 0) rotate(-1.5deg);}
    10% { transform: translate(-2.5px, 1.5px) rotate(1.5deg);}
    20% { transform: translate(2.5px, -1.5px) rotate(-1.5deg);}
    30% { transform: translate(-1.5px, 2.5px) rotate(1.5deg);}
    40% { transform: translate(1.5px, -2.5px) rotate(-1.5deg);}
    50% { transform: translate(-2.5px, 1.5px) rotate(1.5deg);}
    60% { transform: translate(2.5px, -1.5px) rotate(-1.5deg);}
    70% { transform: translate(-1.5px, 2.5px) rotate(1.5deg);}
    80% { transform: translate(1.5px, -2.5px) rotate(-1.5deg);}
    90% { transform: translate(-2.5px, 1.5px) rotate(1.5deg);}
    100% { transform: translate(0, 0) rotate(0deg);}
}
.ojo-decorativo-img {
    width: 110px;
    height: 54px;
    object-fit: cover;
    object-position: 48% 54%;
    border-radius: 50% / 45%;
    background: transparent;
    filter: none;
    transition: none;
    user-select: none;
    pointer-events: none;
    box-shadow: none;
}
.ojo-decorativo:hover {
    animation: ojo-temblor 0.42s infinite;
}

/* Overlay oscuro para el modo ojo */
#ojo-overlay {
    position: fixed;
    z-index: 1000;
    inset: 0;
    background: #000 !important;
    opacity: 1 !important;
    transition: opacity 0.4s;
    pointer-events: auto;
}

/* Ojo centrado y agrandado, aún más arriba */
.ojo-decorativo.ojo-central {
    position: fixed !important;
    left: 50% !important;
    top: 30% !important; /* Subido aún más */
    right: auto !important;
    bottom: auto !important;
    width: 260px !important;
    height: 130px !important;
    transform: translate(-50%, -50%) scale(2.1);
    z-index: 1100 !important;
    background: transparent !important;
    transition: all 0.6s cubic-bezier(.77,0,.18,1.01);
    box-shadow: 0 0 80px 20px #000b;
    pointer-events: none;
}

/* Texto del ojo estilo Undertale, más arriba */
#ojo-texto-undertale {
    position: fixed;
    left: 50%;
    top: calc(30% + 80px); /* Subido más cerca del ojo */
    transform: translateX(-50%);
    z-index: 1201;
    color: #fff;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.35em;
    text-align: center;
    background: none;
    padding: 0.5em 0 0 0;
    letter-spacing: 0.5px;
    min-width: 320px;
    max-width: 90vw;
    pointer-events: none;
    user-select: none;
    text-shadow: 0 2px 8px #000, 0 0 2px #000;
    white-space: pre-line;
    line-height: 1.6;
    opacity: 1;
    transition: opacity 0.2s;
}

/* Input y botón más abajo del texto */
#ojo-input-undertale {
    position: fixed;
    left: 50%;
    top: calc(30% + 260px); /* Aún más separado del texto */
    transform: translateX(-50%);
    z-index: 1202;
    display: flex;
    gap: 0.5em;
    justify-content: center;
    align-items: center;
    background: none;
    pointer-events: auto;
}
#ojo-input-undertale input {
    width: 260px;
    max-width: 60vw;
    padding: 0.5em 0.7em;
    font-size: 1em;
    border-radius: 6px;
    border: 1.5px solid #7a1a1a;
    background: #232326;
    color: #fff;
    outline: none;
    font-family: inherit;
}
#ojo-input-undertale button {
    padding: 0.45em 1.2em;
    font-size: 1em;
    border-radius: 6px;
    border: 1.5px solid #fff;
    background: #7a1a1a;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, color 0.2s;
}
#ojo-input-undertale button:hover {
    background: #fff;
    color: #7a1a1a;
}

/* Botón cerrar arriba a la derecha */
#ojo-close-undertale {
    position: fixed;
    top: 2.5em;
    right: 3em;
    z-index: 1300;
    color: #fff;
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}
#ojo-close-undertale:hover {
    opacity: 1;
}

/* Responsive */
@media (max-width: 1100px) {
    .acerca-layout {
        flex-direction: column;
        align-items: center;
        padding-top: 20px;
        gap: 16px;
        padding-left: 8px;
        padding-right: 8px;
    }
    .acerca-layout .nav-card {
        width: 95vw;
        margin: 0 0 10px 0;
        border-left: none;
        border-right: none;
        border-top: 2px solid #fff;
        border-bottom: 2px solid #fff;
        text-align: center;
        min-height: unset;
        max-width: 98vw;
    }
    .main-acerca-card {
        margin: 0;
        padding: 1.2rem 0.7rem;
        width: 95vw;
        max-width: 98vw;
        min-height: 65vh;
    }
    .temas-card {
        margin-top: 1em;
    }
    .ojo-decorativo {
        display: none;
    }
}
@media (max-width: 700px) {
    .main-acerca-card {
        padding: 1.2rem 0.7rem;
        max-width: 98vw;
        min-height: 55vh;
    }
}
@media (max-width: 900px) {
    .ojo-decorativo {
        display: none;
    }
}