:root {
    --primary-bg-color: #f5f5f0;
    --primary-text-color: #333;
    --accent-color: #4a6b41;
    --nav-bg-color: rgba(74, 107, 65, 0.9);
    --nav-text-color: #fff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--primary-bg-color);
    color: var(--primary-text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    position: relative;
}

header {
    background-color: var(--nav-bg-color);
    color: var(--nav-text-color);
    padding: 1rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    font-size: 1.2rem;
    font-weight: bold;
}

.page-navigation {
    display: flex;
    align-items: center;
}

.page-info {
    margin: 0 1rem;
}

.nav-button {
    background-color: transparent;
    border: none;
    color: var(--nav-text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.2s;
}

.nav-button:hover {
    transform: scale(1.1);
}

.nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.content {
    margin-top: 4rem;
    padding-bottom: 4rem;
}

.pdf-page {
    display: none;
    text-align: center;
    margin: 0 auto;
}

.pdf-page.active {
    display: block;
}

.pdf-page img {
    max-width: 100%;
    height: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.page-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--nav-bg-color);
    color: var(--nav-text-color);
    padding: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.page-slider {
    width: 60%;
    margin: 0 1rem;
}

.fullscreen-toggle {
    position: fixed;
    top: 5rem;
    right: 1rem;
    background-color: var(--nav-bg-color);
    color: var(--nav-text-color);
    border: none;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s;
}

.fullscreen-toggle:hover {
    transform: scale(1.1);
}

.sidebar-toggle {
    background-color: transparent;
    border: none;
    color: var(--nav-text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background-color: var(--nav-bg-color);
    color: var(--nav-text-color);
    padding-top: 4rem;
    transition: left 0.3s ease;
    overflow-y: auto;
    z-index: 999;
}

.sidebar.active {
    left: 0;
}

.sidebar-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: transparent;
    border: none;
    color: var(--nav-text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

.page-list {
    list-style: none;
    padding: 1rem;
}

.page-list-item {
    padding: 0.5rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s;
}

.page-list-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.page-list-item.active {
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: bold;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 998;
}

.overlay.active {
    display: block;
}

/* Responsividade */
@media (max-width: 768px) {
    .header-title {
        font-size: 1rem;
    }
    
    .page-slider {
        width: 50%;
    }
    
    .fullscreen-toggle {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .header-title {
        font-size: 0.9rem;
    }
    
    .page-info {
        margin: 0 0.5rem;
    }
    
    .page-slider {
        width: 40%;
    }
    
    .fullscreen-toggle {
        width: 2rem;
        height: 2rem;
        font-size: 0.8rem;
        top: 4.5rem;
    }
}

/* Modo tela cheia */
.fullscreen-mode .header,
.fullscreen-mode .page-controls,
.fullscreen-mode .fullscreen-toggle {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.fullscreen-mode:hover .header,
.fullscreen-mode:hover .page-controls,
.fullscreen-mode:hover .fullscreen-toggle {
    opacity: 1;
    pointer-events: auto;
}

.fullscreen-mode .content {
    margin-top: 0;
    padding-bottom: 0;
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.pdf-page.active {
    animation: fadeIn 0.3s ease;
}
