/* Reset e Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000000;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader {
    text-align: center;
    color: white;
}

.loader i {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

.loader p {
    font-size: 1.2rem;
    opacity: 0.8;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}


.main-content{
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Flipbook container */
#flipbook {
    position: relative;
    margin: 60px auto;
    overflow: visible !important;
}

/* Ensure turn.js pages don't get clipped */
.flipbook {
    overflow: visible !important;
}

.flipbook .page {
    overflow: visible !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.flipbook .page img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Controls panel */
#panel-menu {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    z-index: 1000;
}

/* #panel-menu > div {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 25px;
    backdrop-filter: blur(10px);
} */

/* #panel-menu button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    transition: all 0.3s ease;
}

#panel-menu button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
} */

/* Desktop optimizations */
@media (min-width: 769px) {
    #flipbook {
        margin: 40px auto;
        max-width: calc(100vw - 80px);
        max-height: calc(100vh - 120px);
    }
    
    .flipbook .page {
        overflow: visible !important;
    }
    
    .flipbook .page img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        max-width: none;
        max-height: none;
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    /* #flipbook {
        margin: 0 !important;
        padding: 0 !important;
    } */
    
    #panel-menu {
        bottom: 10px;
    }
    
    #panel-menu button {
        width: 45px;
        height: 45px;
    }
    
    /* Ensure pages fit properly */
    /* .flipbook .page {
        display: flex;
        align-items: center;
        justify-content: center;
    } */
    
    .flipbook .page img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }
}

/* Language switcher styles */
#language-switcher {
    z-index: 100;
}

#language-switcher a {
    display: inline-block;
    padding: 2px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

#language-switcher a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

#language-switcher a.active-language {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#language-switcher img {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}
.turn-page{
    /* background: white; */
}

/* Estilos para pan/zoom */
.flipbook .page img {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: all;
}

.flipbook .page img.draggable {
    cursor: grab !important;
}

.flipbook .page img.dragging {
    cursor: grabbing !important;
}

/* Melhora visual para imagens com zoom */
.flipbook .page {
    overflow: hidden;
}

/* Melhorias para interação por toque */
.flipbook .page img {
    touch-action: none; /* Desabilita zoom nativo do browser */
}

/* Estilos para fullscreen */
:fullscreen,
:-webkit-full-screen,
:-moz-full-screen,
:-ms-fullscreen {
    background: #000 !important;
    overflow: hidden;
}

/* Estilos quando em fullscreen */
:fullscreen #language-switcher,
:-webkit-full-screen #language-switcher,
:-moz-full-screen #language-switcher,
:-ms-fullscreen #language-switcher {
    position: fixed !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 10000 !important;
    width: auto !important;
}

:fullscreen #panel-menu,
:-webkit-full-screen #panel-menu,
:-moz-full-screen #panel-menu,
:-ms-fullscreen #panel-menu {
    position: fixed !important;
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 10000 !important;
    background: rgba(0, 0, 0, 0.8) !important;
    border-radius: 25px !important;
    backdrop-filter: blur(10px) !important;
    padding: 10px 20px !important;
}

:fullscreen #flipbook,
:-webkit-full-screen #flipbook,
:-moz-full-screen #flipbook,
:-ms-fullscreen #flipbook {
    margin: 0 !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
}

/* Estilo para o botão fullscreen */
#fullscreen {
    position: relative;
    /* background: rgba(255, 255, 255, 0.1); */
    /* border: 1px solid rgba(255, 255, 255, 0.2); */
    /* border-radius: 8px; */
    transition: all 0.3s ease;
}

#fullscreen:hover {
    /* background: rgba(255, 255, 255, 0.2); */
    transform: scale(1.1);
}

#fullscreen i {
    transition: transform 0.3s ease;
    font-size: 16px;
}

/* Animação para transições de fullscreen */
.flipbook {
    transition: all 0.3s ease;
}

/* Esconder scrollbars em fullscreen */
:fullscreen::-webkit-scrollbar,
:-webkit-full-screen::-webkit-scrollbar,
:-moz-full-screen::-webkit-scrollbar {
    display: none;
}

