/* --- RESET E LAYOUT DI BASE --- */
* {
    box-sizing: border-box !important;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    background-color: #f0f2f5; 
    padding-top: 80px; 
    color: #333; 
    display: flex;
    flex-direction: column;
    align-items: center; /* Centro assoluto per il body */
    min-height: 100vh;
}

/* --- WRAPPER PER CONTENUTO E ADS --- */
/* Uso .wrapper perché è la classe che hai nel tuo HTML */
.wrapper {
    display: grid;
    grid-template-columns: 1fr minmax(auto, 650px) 1fr; 
    gap: 20px; 
    width: 100%; 
    max-width: 1200px;
    margin: 0 auto; 
    align-items: start;
    justify-content: center;
}

/* --- CONTAINER CENTRALE DEI PULSANTI --- */
.container { 
    grid-column: 2; /* Forza il contenuto nella colonna centrale */
    display: flex; 
    flex-direction: column; 
    align-items: center; /* Centra i pulsanti internamente */
    width: 100%;
    padding: 10px 15px;
    box-sizing: border-box;
}

/* --- HEADER FISSO --- */
header { 
    position: fixed; top: 0; left: 0; right: 0; height: 60px; 
    display: flex; align-items: center; justify-content: space-between; 
    padding: 0 10px; z-index: 10000; 
    background: #1a73e8; color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

header h1 { 
    flex-grow: 1; 
    text-align: center; 
    font-size: 18px; 
    margin: 0; 
    text-transform: uppercase;
}

.nav-fissa { 
    background: rgba(255, 255, 255, 0.2); 
    color: white; padding: 6px 12px; border-radius: 8px; 
    font-weight: bold; font-size: 12px; text-decoration: none; 
    min-width: 75px; text-align: center;
}

/* --- PULSANTI (Centratura e Stile) --- */
.main-btn { 
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 450px; /* Larghezza ottimale su PC */
    min-height: 60px;
    margin: 10px auto !important; /* Auto centra il blocco stesso */
    padding: 15px !important; 
    
    font-size: 18px !important; 
    font-weight: 800 !important; 
    text-align: center !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    
    background-color: white !important;
    color: #1a73e8 !important;
    border: 3px solid #1a73e8 !important;
    border-radius: 15px !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease;
}

.main-btn:active {
    transform: scale(0.96);
}

/* --- LATERALE ADS --- */
.ads-side { 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
    width: 100%;
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 30px 15px;
    font-size: 13px;
    color: #666;
    margin-top: auto;
}

/* --- OTTIMIZZAZIONE MOBILE --- */
@media (max-width: 1100px) {
    .wrapper { 
        display: flex; 
        flex-direction: column; 
        align-items: center;
        width: 100%; 
    }
    
    .container {
        padding: 10px 20px;
        width: 100%;
    }

    .main-btn {
        max-width: 100%; /* I pulsanti usano tutto lo spazio disponibile sul telefono */
        font-size: 16px !important;
    }

    .ads-side { 
        display: none; /* Nasconde le ads laterali per non rompere la centratura */
    }
}
