body {
    overflow: hidden;
    background-color: #2c2c2c !important;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#canvas {
    width: 100%;
    height: 100vh;
    background-color: #2c2c2c;
    position: relative;
    display: none;
}

/* Contenedor responsivo de Turn.js */
.magazine-viewport {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.magazine-viewport .container {
    position: absolute;
    top: 50%;
    left: 50%;
    /* El tamaño real se calcula con JS según la pantalla */
    transform: translate(-50%, -50%);
}

.magazine-viewport .magazine {
    /* Tamaño base para escritorio; en móvil se sobreescribe con JS */
    width: 922px;
    height: 652px;
}

.magazine-viewport .page {
    background-color: #2c2c2c;
}

.page-content {
    width: 100%;
    height: 100%;
    position: relative;
    background: #ffffff;
}

/* Efecto sombra provisto por Turn.js */
.magazine-viewport .gradient {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.2);
    z-index: 2;
    pointer-events: none;
}

.magazine-viewport .loader {
    background-image: url(../pics/loader.gif);
    width: 24px; height: 24px;
    position: absolute;
    top: 50%; left: 50%;
    margin-left: -12px; margin-top: -12px;
}

/* Botón volver */
.btn-volver-inicio {
    position: fixed;
    top: 15px; right: 15px;
    width: 44px; height: 44px;
    background-color: rgba(0,0,0,0.6);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    backdrop-filter: blur(5px);
    z-index: 10000;
    transition: all 0.2s ease;
}
.btn-volver-inicio:hover {
    background-color: #c8923a;
    transform: scale(1.1) rotate(90deg);
}

/* Barra inferior */
.bottom-controls {
    position: absolute;
    bottom: 15px; left: 0;
    width: 100%;
    text-align: center;
    z-index: 1000;
}
#page-info {
    color: white;
    font-size: 13px;
    font-weight: bold;
    background: rgba(0,0,0,0.6);
    padding: 6px 16px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
    display: inline-block;
}

/* Botones de navegación laterales */
.magazine-viewport .next-button,
.magazine-viewport .previous-button {
    width: 40px;
    height: 100%;
    position: absolute;
    top: 0;
    z-index: 999;
    cursor: pointer;
}
.magazine-viewport .next-button     { right: 0; }
.magazine-viewport .previous-button { left: 0; }

/* ============================================================
   ALERTA DE ROTACIÓN (portrait en móvil)
   ============================================================ */
#landscape-alert {
    display: none; /* JS lo muestra/oculta */
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
}

.alert-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.alert-content i {
    font-size: 72px;
    color: #c8923a;
}

.alert-content p {
    color: #ffffff;
    font-size: 18px;
    line-height: 1.5;
    max-width: 280px;
    margin: 0;
}

/* Animación de rotación del ícono */
@keyframes rotate-device {
    0%   { transform: rotate(0deg); }
    30%  { transform: rotate(-90deg); }
    70%  { transform: rotate(-90deg); }
    100% { transform: rotate(0deg); }
}
.rotation-animation {
    animation: rotate-device 2.5s ease-in-out infinite;
    display: inline-block;
}
