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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Removed header and controls styles since we're displaying PDF directly */

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.pdf-container {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8f9fa;
    min-height: 500px;
    overflow: auto;
}

#pdfCanvas {
    max-width: 100%;
    height: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    color: #7f8c8d;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    color: #e74c3c;
    text-align: center;
    padding: 20px;
}

.hidden {
    display: none !important;
}

.navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 15px;
    background: #ecf0f1;
    border-top: 1px solid #bdc3c7;
}

.navigation button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    background: #34495e;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.navigation button:hover:not(:disabled) {
    background: #2c3e50;
    transform: translateY(-1px);
}

.navigation button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

#pageInfo {
    font-weight: 500;
    color: #2c3e50;
    min-width: 120px;
    text-align: center;
}

.zoom-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #ecf0f1;
    border-top: 1px solid #bdc3c7;
}

.zoom-controls button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    background: #95a5a6;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.zoom-controls button:hover {
    background: #7f8c8d;
    transform: translateY(-1px);
}

#zoomLevel {
    font-weight: 500;
    color: #2c3e50;
    min-width: 50px;
    text-align: center;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .pdf-container {
        min-height: 400px;
    }
    
    .navigation {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px;
    }
    
    .navigation button {
        flex: 1;
        min-width: 80px;
    }
    
    .zoom-controls {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px;
    }
    
    .zoom-controls button {
        flex: 1;
        min-width: 60px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 5px;
    }
    
    .navigation {
        gap: 5px;
    }
    
    .navigation button {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .zoom-controls button {
        padding: 5px 10px;
        font-size: 13px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .navigation button,
    .zoom-controls button {
        min-height: 44px;
        padding: 12px 16px;
    }
}
