/* ==========================================================================
   1. STILE GLOBALE (Sfondo, Stelle, Font)
   ========================================================================== */
:root {
    --bg-dark: #050b14;
    --bg-sea: #2c4a6d;
    --glass: rgba(255, 255, 255, 0.08);
    --text-main: #e0e0e0;
    --accent-gold: #f4d03f;
    --border-light: rgba(255, 255, 255, 0.15);
}

body {
    background: linear-gradient(to bottom, var(--bg-dark), var(--bg-sea));
    background-attachment: fixed;
    color: var(--text-main);
    font-family: 'Georgia', serif;
    margin: 0;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(white, rgba(255,255,255,.2) 1px, transparent 2px);
    background-size: 60px 60px;
    opacity: 0.2;
    z-index: -1;
}

/* ==========================================================================
   2. STILE PUBBLICO (Index e Luogo - NIENTE FORZATURE!)
   ========================================================================== */
header, #search-box, #results {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

article {
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
}

/* ==========================================================================
   3. STILE ADMIN (Solo ciò che inizia con .admin-)
   ========================================================================== */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { 
    width: 260px; 
    background: var(--glass); 
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-light); 
    padding: 20px; 
}
.admin-content { flex-grow: 1; padding: 40px; }
.admin-content article { /* Solo gli articoli nell'admin */
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-light);
    padding: 20px;
}

/* Stile Tabella Voyager */
.voyager-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    border-radius: 15px; /* Angoli arrotondati */
    overflow: hidden; /* Fondamentale per arrotondare gli angoli */
    margin: 20px 0;
    color: var(--text-main);
}

.voyager-table th, 
.voyager-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.voyager-table th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-gold);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.voyager-table tr:last-child td {
    border-bottom: none;
}

.voyager-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Migliora la leggibilità del racconto */
.testo-narrativo {
    font-size: 1.15rem;
    color: #d1d1d1;
    margin-bottom: 40px;
    text-align: justify; /* Dà un aspetto da libro stampato */
}

.highlight {
    background: rgba(244, 208, 63, 0.2);
    color: var(--accent-gold);
    font-weight: bold;
    padding: 0 2px;
    border-radius: 3px;
}

.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.site-logo {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    line-height: 1;
}

.logo-main {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(244, 208, 63, 0.3);
}

.logo-sub {
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--accent-gold);
    margin-top: 5px;
}

/* ==========================================================================
   STILE LINK
   ========================================================================== */

/* Link generici nel testo */
a {
    color: #ffffff;             /* Colore bianco */
    text-decoration: underline; /* Sottolineato per renderlo visibile come link */
    transition: color 0.3s ease; /* Effetto fluido al passaggio */
}

/* Effetto al passaggio del mouse (Hover) */
a:hover {
    color: #2ecc71;             /* Verde smeraldo */
    text-decoration: none;      /* Rimuove sottolineatura opzionale */
}

/* Se vuoi che i bottoni o i link "Leggi esperienza" non siano sottolineati, 
   puoi aggiungere una classe specifica o usare questo selettore */
.content-public a:not(.site-logo a) {
    color: #ffffff;
}

.content-public a:hover {
    color: #2ecc71;
}

.share-container {
    max-width: 900px;
    margin: 60px auto;
    text-align: center;
    padding: 30px;
}

.share-container h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

.share-container p {
    opacity: 0.8;
    margin-bottom: 30px;
}

.share-grid {
    display: grid;
    /* Ridotto minmax da 180px a 140px per permettere più pulsanti per riga se necessario */
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.share-card {
    border: none;
    border-radius: 15px; /* Leggermente meno arrotondato */
    padding: 15px 10px;  /* MODIFICA: ridotto il padding per rimpicciolire il pulsante */
    cursor: pointer;
    transition: 0.3s;
    font-size: 15px;     /* MODIFICA: ridotto font-size */
    font-weight: bold;
    color: white;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;            /* MODIFICA: ridotto gap tra icona e testo */

    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.share-card:hover {
    transform: translateY(-5px) scale(1.02);
}

.share-card .icon {
    font-size: 20px;     /* MODIFICA: icona leggermente più piccola */
}

/* Colori invariati */
.whatsapp { background: linear-gradient(135deg,#25D366,#128C7E); }
.facebook { background: linear-gradient(135deg,#1877F2,#0d5fd4); }
.twitter { background: linear-gradient(135deg,#222,#000); }
.copy { background: linear-gradient(135deg,#d4af37,#b8860b); color: #111; }
.save { background: linear-gradient(135deg,#6c757d,#495057); }