/* Layout principale */
main {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.content-layout {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem;
}

/* Riduzione Padding Mobile */
@media (max-width: 768px) {
    main, .content-layout, main.chat-wrap {
        padding: 1.25rem;
    }
}

/* CHAT LAYOUT - VERSIONE PULITA */
main.chat-wrap {
    max-width: 900px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.chat-wrap h1 {
    text-align: center;
    margin: 1.5rem 0 2rem;
    font-size: 2.2rem;
}

/* CONTENITORE MESSAGGI CHAT CON PADDING */
.chat-entry {
    padding: 1.5rem; /* PADDING INTERNO FINALMENTE AGGIUNTO */
    margin-bottom: 1.5rem;
    border-radius: 6px;
    border-left: 4px solid;
}

.chat-entry.gc {
    background: #303030;
    border-left-color: #f8c350;
}

.chat-entry.ai {
    background: #252525;
    border-left-color: #f90;
}

/* Spazio tra i paragrafi nelle chat */
.chat-entry p {
    margin-bottom: 1rem;
}

.chat-entry p:last-child {
    margin-bottom: 0;
}

/* Navigazione chat */
.chat-nav-footer {
    margin-top: auto;
    padding-top: 2rem;
}

.chat-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-top: 1px solid #333;
}

.chat-pagination .chat-nav-btn {
    display: inline-block;
    background: #111;
    border: 1px solid #444;
    padding: 0.5rem 0.8rem;
    color: #f8c350;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.chat-pagination .disabled.chat-nav-btn {
    background: #111;
    border-color: #333;
    color: #555;
    cursor: default;
}

/* =========================================== */
/* STILI PER PAGINE 3D (CORE STAR) */
/* =========================================== */

/* L'elemento body è ora star-page, usiamolo per un background coerente */
body.star-page {
    background: #121212; /* Assicurati che sia scuro per la scena 3D */
    overflow: hidden; /* Nasconde scrollbar */
}

/* Contenitore principale a schermo intero */
#sphere-wrapper {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; 
    overflow: hidden; 
}

/* Canvas e Etichette a schermo intero */
#sphere, #labels-container {
    position: absolute;
    width: 100%;
    height: 100%;
}

/* Titolo in alto */
.star-title {
    position: fixed; 
    top: 30px; 
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    color: var(--color-text-accent);
    text-shadow: 0 0 10px rgba(248, 195, 80, 0.5);
    font-size: 2.5rem;
    pointer-events: none; /* Non blocca i click sulla sfera */
}

.hidden {
    display: none;
}

.hidden-step {
    display: none !important;
}

