body {
    margin: 0;
    background: #2D2523; /* Fondo oscuro café */
    font-family: Arial, sans-serif;
    overflow-x: hidden;
}

/* ⭐ Fullscreen imágenes */
:fullscreen #flipbook .page img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ⭐ Toolbar moderna */
.toolbar {
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    padding: 14px 28px;
    background: rgba(45, 37, 35, 0.75); /* Transparencia café oscuro */
    backdrop-filter: blur(14px);
    border-radius: 18px;
    display: flex;
    gap: 14px;
    z-index: 9999;
    box-shadow: 0 0 18px rgba(0,0,0,0.45);
    border: 1px solid rgba(255,255,255,0.1);
}

.toolbar button,
.toolbar a {
    background: #A72A2A; /* Rojo vino */
    color: white;
    padding: 9px 18px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    text-decoration: none;
    transition: 0.25s ease;
    box-shadow: 0 0 6px rgba(0,0,0,0.3);
}

.toolbar button:hover,
.toolbar a:hover {
    background: #8C1E1E; /* Rojo vino más oscuro */
    transform: translateY(-2px);
}

/* ⭐ Flipbook */
#flipbook {
    width: 750px;
    height: 500px;
    margin: 110px auto 40px auto;
    opacity: 0;
    transition: opacity 1s;
    transform-origin: center top;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 0 28px rgba(0,0,0,0.55);
    position: relative;
}

/* ⭐ Páginas */
.page {
    background: white;
    border: 1px solid #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.page img {
    width: 100%;
    height: auto;
    display: block;
}

/* ⭐ Loader */
.loader {
    color: white;
    text-align: center;
    margin-top: 25px;
    font-size: 18px;
}

/* ⭐ Zonas clic para pasar páginas */
.click-zone {
    position: absolute;
    top: 0;
    width: 40%;
    height: 100%;
    z-index: 9999;
    cursor: pointer;
}

.left-zone { left: 0; }
.right-zone { right: 0; }

/* ⭐ Fullscreen */
:fullscreen #flipbook {
    width: 100vw !important;
    height: 100vh !important;
}

/* ⭐ Móvil */
@media (max-width: 768px) {

    #flipbook {
        width: 100% !important;
        height: calc(100vh - 160px) !important;
        margin: 100px auto 0 auto;
        box-shadow: none;
        border-radius: 0;
    }

    .toolbar {
        padding: 8px 12px;
        gap: 8px;
        top: 5px;
    }

    .toolbar button,
    .toolbar a {
        padding: 6px 10px;
        font-size: 12px;
    }

    .page img {
        object-fit: contain;
    }
}
