/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Navigation */
.top-nav {
    background-color: #2c3e50;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-nav a {
    color: white;
    text-decoration: none;
    margin-right: 2rem;
    transition: opacity 0.3s;
}

.top-nav a:hover {
    opacity: 0.8;
}

.back-link {
    font-weight: 500;
}

.download-link {
    background-color: #3498db;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    margin-right: 0 !important;
}

.download-link:hover {
    background-color: #2980b9;
}

/* PDF Container */
.pdf-container {
    height: calc(100vh - 180px); /* Account for nav and footer */
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* PDF Header */
.pdf-header {
    background: linear-gradient(135deg, #3498db 0%, #2c3e50 100%);
    color: white;
    padding: 1.5rem 2rem;
    text-align: center;
}

.pdf-header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.pdf-header p {
    opacity: 0.9;
    font-size: 1rem;
}

/* PDF Viewer */
.pdf-viewer {
    flex: 1;
    position: relative;
    background-color: #f8f9fa;
}

.pdf-viewer embed {
    width: 100%;
    height: 100%;
    border: none;
}

/* PDF Fallback */
.pdf-fallback {
    display: none;
    padding: 2rem;
    text-align: center;
    height: 100%;
    overflow-y: auto;
}

.fallback-content h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.fallback-content p {
    margin-bottom: 1.5rem;
    color: #555;
}

.download-btn {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 4px;
    margin-bottom: 2rem;
    transition: background-color 0.3s;
}

.download-btn:hover {
    background-color: #2980b9;
}

/* Quick Overview for Fallback */
.quick-overview {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
    text-align: left;
}

.quick-overview h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
}

.overview-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat {
    text-align: center;
    padding: 1rem;
    background-color: #ecf0f1;
    border-radius: 8px;
}

.stat strong {
    display: block;
    font-size: 1.5rem;
    color: #3498db;
    margin-bottom: 0.5rem;
}

.stat span {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.quick-overview p {
    margin-bottom: 1rem;
    text-align: left;
}

/* Footer */
.pdf-footer {
    background-color: #34495e;
    color: white;
    text-align: center;
    padding: 1.5rem;
}

.pdf-footer nav {
    margin-bottom: 1rem;
}

.pdf-footer a {
    color: white;
    text-decoration: none;
    margin: 0 1rem;
    transition: opacity 0.3s;
}

.pdf-footer a:hover {
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .top-nav {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }
    
    .top-nav a {
        margin-right: 0;
    }
    
    .pdf-container {
        height: calc(100vh - 240px); /* Account for larger nav on mobile */
    }
    
    .pdf-header {
        padding: 1rem;
    }
    
    .pdf-header h1 {
        font-size: 1.5rem;
    }
    
    .pdf-header p {
        font-size: 0.9rem;
    }
    
    .overview-stats {
        grid-template-columns: 1fr;
    }
    
    .pdf-footer a {
        display: block;
        margin: 0.5rem 0;
    }
}

/* Print Styles */
@media print {
    .top-nav,
    .pdf-footer {
        display: none;
    }
    
    .pdf-container {
        height: auto;
        box-shadow: none;
    }
    
    .pdf-viewer {
        height: auto;
    }
}