:root {
    --primary: #2c3e50;
    --accent: #3498db;
    --light: #f8f9fa;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: var(--light);
    color: var(--primary);
    display: flex;
    flex-direction: column;
    align-items: center;
}

header { 
    text-align: center; 
    margin-bottom: 30px;
    width: 100%;
}

header h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.main-container {
    width: 100%;
    max-width: 950px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.actions {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.btn-download {
    background-color: var(--accent);
    color: white;
    padding: 14px 28px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: transform 0.2s, background 0.3s;
    text-align: center;
}

.btn-download:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.pdf-viewer {
    width: 100%;
    height: 75vh;
    min-height: 450px; 
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

footer {
    margin-top: 40px;
    padding: 20px;
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
    border-top: 1px solid #dee2e6;
    width: 100%;
    max-width: 950px;
}

footer a {
    color: var(--accent);
    text-decoration: none;
}

footer a:hover { 
    text-decoration: underline; 
}

.copyright-section {
    margin-top: 10px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.disclaimer {
    margin-top: 15px; 
    font-size: 0.75rem; 
    font-style: italic;
}


/* Contenitore principale del PDF */
#pdf-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #525659; 
    border-radius: 8px;
    padding: 10px;
    overflow-x: hidden; 
}

/* Stile applicato a ogni singola pagina (canvas) */
.pdf-page {
    max-width: 100%;    
    height: auto !important; 
    margin-bottom: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: block;
}

/* Ottimizzazione specifica per Mobile */
@media (max-width: 600px) {
    .main-container {
        padding: 10px; 
    }
    
    #pdf-wrapper {
        padding: 5px;  
        border-radius: 4px;
    }

    .pdf-page {
        margin-bottom: 10px; 
    }

    body {
        padding: 10px;
    }

    header h1 {
        font-size: 1.3rem;
    }

    .main-container {
        padding: 15px;
    }

    .pdf-viewer {
        height: 60vh; 
    }

    .btn-download {
        width: 100%; 
    }
}
