/* public/style.css (Stili DEFINITIVI e NORMALI per Fisica) */

:root {
    --site-bg: #f8f8f8;
    --top-bar-bg: #333; 
    --top-bar-text: #fff;
    --calc-bg: #fff; 
    --display-bg: #fff;
    --display-text: #333; 
    --btn-primary-bg: #007bff; 
    --btn-primary-hover: #0056b3;
    --btn-simple-bg: #f4f4f4; 
    --btn-simple-hover: #e0e0e0;
    --border-color: #ccc;
    --border-radius: 4px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--site-bg);
    margin: 0;
    padding-top: 60px;
}

/* --- Top Bar (Header Finto) --- */
.top-bar {
    position: fixed; top: 0; left: 0; width: 100%; height: 60px;
    background-color: var(--top-bar-bg); color: var(--top-bar-text);
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 30px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); z-index: 1000;
}
.logo { font-size: 1.5em; font-weight: bold; color: #fff; }
.fake-nav a, .fake-nav i { color: var(--top-bar-text); text-decoration: none; margin-left: 20px; font-size: 1em; }
.fake-nav a:hover { color: #aaa; }


/* --- Layout Generale Contenuto --- */
.content-wrapper {
    display: flex;
    width: 95%;
    max-width: 1400px;
    margin: 30px auto;
    gap: 30px;
}

.sidebar-left, .sidebar-right {
    width: 250px;
    padding: 10px 0;
    align-self: flex-start; 
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-left {
    padding-right: 20px;
    border-right: 1px solid var(--border-color);
}

.sidebar-right {
    padding-left: 20px;
    border-left: 1px solid var(--border-color);
}

.sidebar-left h3 {
    margin-top: 0; font-size: 1.1em; color: #333; border-bottom: 1px solid #eee; padding-bottom: 10px;
}
.sidebar-left ul { list-style: none; padding: 0; }
.sidebar-left li a { 
    display: block; 
    padding: 6px 0; 
    color: #007bff; 
    text-decoration: none; 
    transition: all 0.2s;
}
.sidebar-left li a:hover {
    color: #0056b3; /* Effetto hover normale */
}
.sidebar-left li a.active { font-weight: bold; color: #333; }


/* --- Stile per la voce sidebar che funge da pulsante di copia furtivo ("Fisica") --- */
/* NESSUN STILE AGGIUNTIVO. La voce usa lo stile generico .sidebar-left li a */
#copy-ai-button-sidebar {
    /* MANTIENI SOLO GLI STILI GENERALI PER UN LINK NORMALE */
    background-color: transparent !important;
    border: none;
    cursor: pointer;
    display: block;
}

/* --- NON CI SONO PIÙ REGOLE CSS PER I COLORI O LE ICONE SULLA VOCE "FISICA" --- */


.main-content {
    flex-grow: 1;
    max-width: 800px;
    padding: 0 20px;
}

h2 {
    color: #333;
    font-size: 1.8em;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    margin-top: 0;
}

.intro-text {
    color: #666;
    margin-bottom: 25px;
}


/* --- Calcolatrice (Form Utility Look) --- */
.calculator-container {
    background: var(--calc-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.calc-section h3 {
    color: #007bff;
    font-size: 1.3em;
    margin-top: 0;
    margin-bottom: 5px;
}
.description-text {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
}


.display {
    min-height: 40px;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    background-color: var(--display-bg);
    color: var(--display-text);
    font-size: 1.4em; 
    border: 1px solid #ccc;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    transition: all 0.3s ease;
}

.display.arithmetic {
    background-color: #eaf3ff;
    color: #0056b3; 
    font-weight: bold;
}

.display.error { background-color: #ffeaea; color: #d32f2f; }
.display.loading { background-color: #fffde7; color: #ffc107; animation: pulse 1.5s infinite; }


/* --- Input Area e Pulsante Calcola --- */
.input-area {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#input-field {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-size: 1em;
}

#calculate-button {
    padding: 10px 20px;
    background-color: var(--btn-primary-bg);
    color: var(--top-bar-text);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background-color 0.2s;
}
#calculate-button:hover { background-color: var(--btn-primary-hover); }
#calculate-button:disabled { background-color: #ccc; cursor: not-allowed; }


/* --- Pulsanti Scientifici Semplici --- */
.buttons-grid-simple {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 0;
    border-top: 1px dashed #eee;
}

.btn-scientific-simple {
    padding: 8px 12px;
    background-color: var(--btn-simple-bg);
    color: #333;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 0.2s;
}
.btn-scientific-simple:hover { background-color: var(--btn-simple-hover); }

.btn-ai-hint {
    background-color: #e0f2f1;
    color: #00897b;
    border-color: #b2dfdb;
}
.btn-ai-hint:hover { background-color: #c0f2f1; }


/* --- Finti HUD/ADS --- */
.fake-ad-container {
    background-color: #fff;
    border: 1px solid #ffcc00;
    padding: 15px;
    text-align: center;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.fake-ad-container p { font-size: 0.7em; color: #ffcc00; margin-bottom: 5px; }
.fake-ad-container strong, h4 { color: #333; margin: 5px 0; }
.fake-ad-container a { display: block; margin-top: 10px; color: #007bff; text-decoration: none; font-size: 0.9em; }

.ad-large img { max-width: 100%; height: auto; margin-bottom: 10px; }

/* Stili Aggiuntivi per Sezioni di Supporto */
.support-content {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.support-content h3 {
    color: #333;
    font-size: 1.4em;
    margin-bottom: 20px;
}

.fake-article {
    background-color: #fff;
    border: 1px solid #eee;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: var(--border-radius);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.fake-article h4 {
    color: #007bff;
    margin-top: 0;
    font-size: 1.1em;
}

.fake-article p {
    color: #555;
    font-size: 0.9em;
    line-height: 1.5;
}

.fake-article a {
    display: block;
    margin-top: 10px;
    font-size: 0.9em;
    color: #007bff;
    text-decoration: none;
}


/* --- Footer Finto --- */
.fake-footer {
    text-align: center;
    padding: 20px;
    border-top: 1px solid #eee;
    margin-top: 30px;
    font-size: 0.8em;
    color: #888;
}

.info-text {
    text-align: center;
    font-size: 0.8em;
    color: #888;
    margin-top: 10px;
    border-top: 1px dashed #eee; 
    padding-top: 10px;
}

/* Chiaveframe per l'effetto Loading */
@keyframes pulse {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}