.gec-flipbook-wrapper,
.gec-flipbook-wrapper * {
    box-sizing: border-box !important;
    line-height: normal !important;
}

.gec-flipbook-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    margin: 20px 0 !important;
    padding: 0 !important;
    position: relative !important;
    z-index: 10 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.gec-flipbook-meta {
    margin-bottom: 8px !important;
    font-size: 14px !important;
    color: #222 !important;
}

/* Stage Desktop */
.gec-flipbook-stage {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    position: relative !important;
    background-color: #1a1a1a !important;
    padding: 15px !important;
    width: 100% !important;
    height: 70vh !important;
    max-height: 750px !important;
    border-radius: 6px 6px 0 0 !important;
    overflow: hidden !important;
    perspective: 1200px !important;
}

.gec-page-container {
    height: 100% !important;
    width: 50% !important;
    max-width: 50% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: relative !important;
    transition: transform 0.25s ease-in-out, opacity 0.25s ease-in-out !important;
}

.gec-page-left {
    justify-content: flex-end !important;
}

.gec-page-right {
    justify-content: flex-start !important;
}

/* Canvas vincolato in proporzione per evitare tagli verticali */
.gec-flipbook-wrapper canvas {
    max-height: 100% !important;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4) !important;
    display: block !important;
}

/* Animazione di Sfoglia */
.gec-anim-flipping-next .gec-page-right {
    transform: rotateY(-30deg) scale(0.96) !important;
    opacity: 0.7 !important;
}

.gec-anim-flipping-prev .gec-page-left {
    transform: rotateY(30deg) scale(0.96) !important;
    opacity: 0.7 !important;
}

/* Controlli Inferiori */
.gec-flipbook-controls {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 15px !important;
    background: #111111 !important;
    color: #ffffff !important;
    border-radius: 0 0 6px 6px !important;
}

.gec-flipbook-controls button {
    padding: 7px 14px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    background: #ffffff !important;
    color: #111111 !important;
    border: none !important;
    border-radius: 4px !important;
}

.gec-flipbook-controls button:hover {
    background: #dddddd !important;
}

.gec-page-info {
    font-size: 13px !important;
    color: #ffffff !important;
}

/* MODALITÀ MOBILE / SMARTPHONE (< 768px) */
@media (max-width: 768px) {
    .gec-flipbook-stage {
        height: 65vh !important;
        padding: 8px !important;
    }

    .gec-page-container {
        width: 100% !important;
        max-width: 100% !important;
        justify-content: center !important;
    }

    .gec-page-right {
        display: none !important;
    }
}

/* SCHERMO INTERO (FULLSCREEN REALE & FALLBACK) */
.gec-flipbook-wrapper.gec-fullscreen-active,
.gec-flipbook-wrapper:fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    background: #0a0a0a !important;
    z-index: 999999 !important;
    margin: 0 !important;
    padding: 10px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

.gec-flipbook-wrapper.gec-fullscreen-active .gec-flipbook-meta,
.gec-flipbook-wrapper:fullscreen .gec-flipbook-meta {
    display: none !important;
}

.gec-flipbook-wrapper.gec-fullscreen-active .gec-flipbook-stage,
.gec-flipbook-wrapper:fullscreen .gec-flipbook-stage {
    flex: 1 !important;
    height: calc(100vh - 70px) !important;
    max-height: none !important;
    background: transparent !important;
}

.gec-flipbook-wrapper.gec-fullscreen-active .gec-flipbook-controls,
.gec-flipbook-wrapper:fullscreen .gec-flipbook-controls {
    background: #1a1a1a !important;
    border-radius: 6px !important;
}