.wide {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 0px;
    box-shadow: none;
}

/* Imagenes dentro del contenedor */
.story-container img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem 0;
}

/* Imagen flotante a la izquierda */
.float-img {
    float: left;
    margin: 0.4rem 3vw 0.8rem 0;
    max-width: 50%;
    width: auto;
    height: auto;
}

.story-container .float-img {
    float: left;
    margin: 0.4rem 1.5rem 0.8rem 0;
    max-width: 50% !important;
    width: auto;
    height: auto;
}

/* Imagen flotante a la derecha */
.float-img-right {
    float: right;
    margin: 0.4rem 0 0.8rem 1.5rem;
    max-width: 280px;
}

/* Imagen de ancho completo */
.full-width-img {
    width: 100%;
    margin: 1.6rem 0;
    clear: both;
}

.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

/* --- TIPOGRAFÍA --- */
.story-container h1,
.story-container h2,
.story-container h3 {
    font-weight: bold;
    margin-top: 1.6em;
    margin-bottom: 0.6em;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

.story-container h1 {
    font-size: 2.4rem;
    text-align: center;
    margin-top: 0.3em;
    border-bottom: 2px solid #d4af37;
    display: inline-block;
    width: auto;
    padding-bottom: 0.2em;
    letter-spacing: 1px;
}

.story-container h2 {
    font-size: 1.9rem;
    border-left: 5px solid #2c6e9e;
    padding-left: 1rem;
    color: #1e3c4c;
    margin-top: 1.6em;
}

.story-container h3 {
    font-size: 1.4rem;
    color: #2c4f5e;
    margin-top: 1.2em;
}

.story-container p {
    margin-bottom: 1.2rem;
    text-align: justify;
    font-size: 1.05rem;
    line-height: 1.55;
}

.story-container em {
    font-style: italic;
}

/* --- ESTILOS ESPECIALES --- */

/* Estilo manuscrito */
.manuscrito {
    font-family: "Segoe Script", "Bradley Hand", "Comic Sans MS", cursive;
}

/* Estilo terminal */
.terminal {
    font-family: 'VT323', monospace;
    font-weight: bold;
    color: #00ff00;
    background-color: #000000;
    display: inline-block;
    position: relative;
    padding:5px 20px;
}

/* Cursor parpadeante al final */
.terminal::after {
    content: '';
    display: inline-block;
    width: 0.6em;
    height: 1.2em;
    background-color: #00ff00;
    margin-left: 0.15em;
    vertical-align: middle;
    animation: blink 1s step-end infinite;
}
/* ENCELADUS */
/* ============================================
   POPOUT / POPUP PARA ENCELADUS
   ============================================ */

.popout {
    position: relative;
    border: 1px solid rgba(201, 168, 76, 0.3);
    box-shadow: 15px 15px 15px rgba(128, 128, 128, 0.6);
    background: var( --bg-card);
    border-radius: 4px;
    display: inline-block;
    text-align: center;
    margin: 1.5rem 0;
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    max-width: 90%;
}

.popout p {
    margin: 0 0 1rem 0;
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.6;
}

.popout p em {
    color: var(--gold, #c9a84c);
    font-style: italic;
}

/* Botón de cerrar (X) */
.popout-close {
    position: absolute;
    top: 6px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--muted, #9a9488);
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    font-family: Arial, sans-serif;
}

.popout-close:hover {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
}

/* Botón GO dentro del popout - VERDE */
.popout button:not(.popout-close) {
    background: #00cc44;
    color: #0a1a0a;
    border: none;
    padding: 0.5rem 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-family: 'Inter', Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    box-shadow: 0 0 20px rgba(0, 204, 68, 0.2);
}

.popout button:not(.popout-close):hover {
    background: #00ee44;
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 238, 68, 0.3);
}

.popout button:not(.popout-close):active {
    transform: translateY(0px);
    box-shadow: 0 0 20px rgba(0, 204, 68, 0.2);
}

/* Popout con borde dorado (opcional) */
.popout.gold {
    border-color: var(--gold, #c9a84c);
    box-shadow: 
        0 0 40px rgba(255, 255, 255, 0.12),
        0 0 80px rgba(255, 255, 255, 0.06),
        0 0 120px rgba(255, 255, 255, 0.03),
        0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Popout con borde verde (para temas de terminal) */
.popout.terminal-popout {
    border-color: #1a3a1a;
    background: #0a1a0a;
    box-shadow: 
        0 0 40px rgba(255, 255, 255, 0.12),
        0 0 80px rgba(255, 255, 255, 0.06),
        0 0 120px rgba(255, 255, 255, 0.03),
        0 0 40px rgba(0, 20, 0, 0.5);
}

.popout.terminal-popout p {
    color: #00cc44;
    text-shadow: 0 0 8px rgba(0, 220, 60, 0.2);
}

.popout.terminal-popout p em {
    color: #00ee44;
}

.popout.terminal-popout button:not(.popout-close) {
    background: #00cc44;
    color: #0a1a0a;
}

.popout.terminal-popout button:not(.popout-close):hover {
    background: #00ee44;
}

/* Responsive */
@media (max-width: 768px) {
    .popout {
        padding: 1.5rem 1rem 1rem 1rem;
        margin: 1rem 0;
    }
    .popout p {
        font-size: 0.9rem;
    }
    .popout button:not(.popout-close) {
        font-size: 0.8rem;
        padding: 0.4rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .popout {
        padding: 1.2rem 0.8rem 0.8rem 0.8rem;
        max-width: 100%;
    }
    .popout p {
        font-size: 0.85rem;
    }
    .popout button:not(.popout-close) {
        font-size: 0.7rem;
        padding: 0.3rem 1.2rem;
    }
}


/* Animación de parpadeo */
@keyframes blink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

/* --- LISTAS --- */
.story-container ul,
.story-container ol {
    margin: 0.8rem 0 1.2rem 2rem;
    text-align: justify;
}

.story-container li {
    margin-bottom: 0.4rem;
}

/* --- TABLAS --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.8rem 0;
    font-size: 0.93rem;
    color: var(--text-color);
    background-color: var(--bg-content);
}

td,
th {
    border: 1px solid #bbb;
    padding: 0.6rem;
    vertical-align: top;
    background-color: var(--bg-content);
    color: var(--text-color);
}

th {
    background-color: var(--bg-card);
    font-weight: bold;
}

/* --- PIE DE PÁGINA --- */
.autor-footer {
    margin-top: 3rem;
    padding-top: 1.3rem;
    text-align: center;
    font-size: 0.85rem;
    border-top: 1px solid #ddd;
    color: #4a4a4a;
    font-family: 'Segoe UI', system-ui;
    background: #ffffff;
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .story-container {
        max-width: 90%;
        padding: 1.8rem;
    }
    .top-menu {
        gap: 1rem;
        padding: 0.7rem 1rem;
    }
    .float-img,
    .float-img-right {
        max-width: 220px;
    }
}

@media (max-width: 640px) {
    .story-container {
        padding: 1.2rem;
        max-width: 95%;
    }
    .top-menu a {
        font-size: 0.95rem;
    }
    .story-container h1 {
        font-size: 1.8rem;
    }
    .story-container h2 {
        font-size: 1.4rem;
    }
    .float-img,
    .float-img-right {
        float: none;
        display: block;
        margin: 1rem auto;
        max-width: 90%;
    }
    .hero-enceladus .wide {
        width: 100%;
        max-width: 100%;
        height: auto;
    }
}