/*
 * MODERN & CLEAN STYLESHEET
 * Ispirato all'estetica di Tailwind CSS
 * Font: Inter (from Google Fonts)
 * Author: MissingDrift
 */

/* 1. Import Font & Definizioni Variabili (stile Tailwind) */


/* 2. Reset & Stili Generali */
/* 2. Reset & Stili Generali */
@import url('https://fonts.googleapis.com/css2?family=Special+Elite&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --font-sans: 'Inter', sans-serif;

    --bg-primary: #121212; /* Gray 900 */
    --bg-secondary: #030303; /* Gray 800 */
    --bg-tertiary: #303033; /* Gray 700 */
    --border-color: rgba(59, 130, 246, 0.3);
    
    --text-primary: #F9FAFB; /* Gray 50 */
    --text-secondary: #9CA3AF; /* Gray 400 */
    --text-accent: #007AFF; /* Blue 500 */
    
    --accent-color: #007AFF; /* Blue 500 */
    --accent-hover: #3395FF; /* Blue 600 */

    --success-color: #16A34A; /* Green 600 */
    --success-hover: #15803D; /* Green 700 */
    --danger-color: #DC2626; /* Red 600 */
    --danger-hover: #B91C1C; /* Red 700 */
    --warning-color: #FACC15; /* Yellow 400 */

                --bg-color: #121212; --header-bg: rgba(28, 28, 30, 0.75); --component-bg: #1C1C1E;
            --text-color: #F5F5F7; --text-neutral: #8A8A8E; --border-color: rgba(255, 255, 255, 0.12);

                --brand-color: #007AFF; --brand-color-light: #3395FF;

    --soft-shadow: 0px 16px 48px -10px rgba(0, 0, 0, 0.12);
    --header-shadow: 0px 4px 20px -8px rgba(0, 0, 0, 0.1);
    

    --border-radius: 0.5rem; /* 8px */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 2. Reset & Stili Generali */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent; /* Safari / iOS */
    -webkit-tap-highlight-color: rgba(0,0,0,0); /* Android fallback */
}


body {
    text-shadow: 0px 16px 48px -10px rgba(0, 0, 0, 0.12);
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}



.form-group-section {
    margin-bottom: 1.5rem;
}
.role-input {
    margin-bottom: .5rem;
}


.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}


main {
    flex-grow: 1;
}

.changelog-preview {
  max-width: 800px; /* o la larghezza che preferisci */
  margin: 0 auto;   /* centra orizzontalmente */
}

h1, h2, h3 {
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 600;
}
h1 { font-size: 2.25rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

a {

    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    text-decoration: underline;
}



hr {
border: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0) !important;
    margin: 0 0 1.5rem 0 !important;
    top: 1rem;
}

/* 3. Header & Navigazione */




nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

nav .logo {
    font-size: clamp(1.25rem, 5vw, 1.75rem); /* Responsive font size */
    font-weight: 700;

 max-height: 50px;
color: #FFF;


}

nav .logo img {
 max-height: 50px;
    display: block;
    max-width: 100%;
    height: auto;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center; /* opzionale, centra anche orizzontalmente */
    gap: 0.75rem; /* spazio tra immagine e testo */
}

nav .logo:hover {
    color: var(--text-accent);
    text-decoration: none;
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.5rem;

}




.user-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.welcome-msg {
    color: #FFF;


    font-size: 0.9em;
}

/* 4. Pulsanti */
.button, .slot-action-button, .button-secondary, .button-danger {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 0.9em;
    transition: var(--transition);
    text-align: center;
    text-decoration: none !important;
	color: white;
	text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
    user-select: none;
}
.button {
    background-color: var(--accent-color) !important;
    color: var(--text-primary);
}
.button:hover, button:hover {
background-color: var(--brand-color-light); box-shadow: 0 6px 20px -6px var(--brand-color); transform: translateY(-2px);
}
.button-discord {
    background-color: #5865F2;
}
.button-discord:hover {
    background-color: #4752C4;
}
.button-secondary, .button-danger {
    background-color: rgba(0,0,0,0.3); color: var(--text-color) !important;
}
.button-secondary:hover {
    background-color: var(--border-color);
}
.button.admin-button {
    background-color: var(--warning-color);
    color: var(--bg-primary);
}
.button-danger {
    background-color: var(--danger-color) !important;
    color: var(--text-primary);
}
.button.admin-button:hover {
    filter: brightness(1.1);
}

/* 5. Lista Eventi (Homepage) */
.event-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
flex-direction: column-reverse;
}






.event-card {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    border: 1px solid transparent; 
transition: box-shadow 0.3s ease, transform 0.3s ease;
}




.status-upcoming {
  position: relative;
  overflow: hidden;
}

.status-upcoming::before {
  content: "";
  position: absolute;
  top: 0;
  left: -125%;
  width: 60%;
  height: 100%;
  background: rgba(255, 255, 255, 0.4);
  transform: skew(45deg);
  pointer-events: none;
  opacity: 1; /* sempre visibile */
  animation: shine-loop 2s ease infinite;
}

@keyframes shine-loop {
  0% {
    left: -125%;
    opacity: 1;
  }
  50% {
    left: 150%;
    opacity: 0.6;
  }
  100% {
    left: 150%;
    opacity: 0;
  }
}




.event-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.event-card-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.event-card h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}
.event-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

/* 6. Dettagli Evento */
.event-detail .event-image-header {
    max-width: 100%;
	height: auto;
    max-height: 480px;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

p {
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

.event-detail .creator {
    color: var(--text-secondary);
    margin-top: -1rem;
    margin-bottom: 1rem;
}
.event-meta {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}
.event-meta ul {
    list-style: none;
    margin-top: 1rem;
}
.event-meta ul li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
}
.event-meta ul li strong {
    color: var(--text-primary);
}
.modset-button {

    background-color: var(--success-color);
}
.modset-button:hover {
    background-color: var(--success-hover);
}
.info-msg {
    background-color: rgba(59, 130, 246, 0.1);
    color: #93C5FD;
    padding: 1rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--accent-color);
    margin-bottom: 2rem;
}


/* 7. Slotlist */
.slotlist-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(300px, 1fr));
    gap: 1.5rem;
}


.slot-group {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
}
.slot-group h3 {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
}

.slot-group ul {
    list-style: none;
    margin-top: 1rem;
}
.slot-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0.25rem;
    border-bottom: 1px solid var(--bg-tertiary);
}
.slot-item:last-child {
    border-bottom: none;
}
.slot-role {
    font-weight: 500;
    overflow-wrap: break-word;
    white-space: normal;
    word-break: break-word;
    max-width: 100%;
}
.slot-user {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.taken-slot {
    color: var(--text-accent);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}
.login-required, .slot-free {
    font-style: italic;
    font-size: 0.875rem;
    color: var(--text-secondary);
}
.slot-action-button {
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
}
.slot-action-button.leave {
    background-color: var(--danger-color);
}
.slot-action-button.leave:hover {
    background-color: var(--danger-hover);
}
.slot-action-button.take {
    background-color: var(--success-color);
}
.slot-action-button.take:hover {
    background-color: var(--success-hover);
}

/* 8. Form Creazione Evento */
.create-form {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.create-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}
.create-form input,
.create-form textarea {
    width: 100%;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
}
.create-form input:focus,
.create-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}
.create-form input[type="file"] {
    padding: 0.5rem;
    cursor: pointer;
}
input[type="datetime-local"] {
    -webkit-calendar-picker-indicator{
        filter: invert(1);
        cursor: pointer;
    }
}
.time-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}
.form-group-section {
    background-color: var(--bg-primary);
    padding: 1.25rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.group-header, .role-input {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.group-header input, .role-input input {
    flex-grow: 1;
}
.remove-group-btn, .remove-role-btn {
    background: var(--danger-color);
    border: none;
    color: white;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-radius: var(--border-radius);
    line-height: 1;
    transition: var(--transition);
}
.remove-group-btn:hover, .remove-role-btn:hover {
    background-color: var(--danger-hover);
}

/* 9. Footer */


q
/* 10. Media Query per dispositivi più piccoli */
@media (max-width: 768px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.25rem; }
    .container { padding: 0 1rem; }
    
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    .user-area {
        width: 100%;
        justify-content: center;
    }
}
















.event-meta ul {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 0;
    list-style: none;
    margin: 0 auto;
    justify-content: center;
}


.event-meta li {
    display: flex;
    flex-direction: column;
    font-size: 0.95rem;
    min-width: 200px;
    white-space: normal;
}



@media (max-width: 600px) {
    .logo-container img.logo {
        display: none;
    }
	    .logo-container{
        display: none;
    }
}
@media (max-width: 600px) {
    .slotlist-container {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 600px) {
    .slotlist-container {
        grid-template-columns: 1fr;
    }
}









.dropdown.a svg,  #preloader svg {
 width: 3.25em;
 transform-origin: center;
 animation: rotate4 2s linear infinite;

}

circle {
 fill: none;
 stroke: #3B82F6;
 stroke-width: 2;
 stroke-dasharray: 1, 200;
 stroke-dashoffset: 0;
 stroke-linecap: round;
 animation: dash4 1.5s ease-in-out infinite;
}

@keyframes rotate4 {
 100% {
  transform: rotate(360deg);
 }
}

@keyframes dash4 {
 0% {
  stroke-dasharray: 1, 200;
  stroke-dashoffset: 0;
 }

 50% {
  stroke-dasharray: 90, 200;
  stroke-dashoffset: -35px;
 }

 100% {
  stroke-dashoffset: -125px;
 }
}

  #preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #121212; /* o altro colore di sfondo */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
 transition: opacity 0.5s ease; /* ← fade-out */
  }

  #preloader.hidden {
    opacity: 0;
    pointer-events: none;
  }
.slot-user {
    display: flex; /* Già presente, ma fondamentale */
    align-items: center; /* Allinea verticalmente gli elementi */

}

.slot-user .user-avatar, .members-panel .user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;


}


.event-card-header {
    position: relative;
}

/* Lo stile del badge stesso */
.status-badge {
color: #FFF;
text-shadow: 0 0 5px rgba(255, 255, 255, 0.4);

    /* Posizionamento */
    position: absolute;
    top: 12px;
    right: 12px;
    
    /* =================== MODIFICA CHIAVE QUI =================== */
    opacity: 1 !important;
    /* =========================================================== */

    /* Stile e Dimensioni */
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;

    /* Colori e Effetti */

    border: 1px solid rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Colori specifici per ogni stato */
.status-open { 
background-color: rgba(22, 163, 74, 0.7); }
.status-live { 
background-color: rgba(220, 38, 38, 0.7); }
.status-upcoming { 
    padding: 0.4rem 0.9rem !important;
    border-radius: 999px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;

    /* Effetto Vetro */
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    text-shadow: none !important;

background-color: rgba(0, 0, 246, 0.05) !important; }
.status-finished { 
    padding: 0.4rem 0.9rem !important;
    border-radius: 999px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;

    /* Effetto Vetro */
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    text-shadow: none !important;

 }


/*
 * 2. Contatore Slot e Barra di Progresso
 * (Es: Posti: 15 / 40)
*/

.slot-counter {
    margin: 0.5rem 0 1rem 0;
}

.event-card .slot-counter span {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    
    /* Ridotto il margine (buona pratica, ma non era la causa) */
    margin-bottom: 0.25rem;
    
    /* =================== MODIFICA CHIAVE QUI =================== */
    /* Collassa lo spazio verticale extra attorno al testo */
    line-height: 1; 
    /* =========================================================== */
}


/* Stili per la barra di progresso (invariati ma inclusi per completezza) */
.slot-counter progress {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border: none;
    border-radius: 4px;
    overflow: hidden;
}

.slot-counter progress::-webkit-progress-bar {
    background-color: var(--bg-primary);
    border-radius: 4px;
}

.slot-counter progress::-webkit-progress-value {
    background-color: var(--accent-color);
    border-radius: 4px;
    transition: width 0.3s ease-in-out;
}

.slot-counter progress::-moz-progress-bar {
    background-color: var(--accent-color);
    border-radius: 4px;
    transition: width 0.3s ease-in-out;
}

.homepage-header {
    display: flex;
    justify-content: center;
    align-items: center; /* Allinea verticalmente */
    flex-wrap: wrap; /* Permette al form di andare a capo su schermi piccoli */
    gap: 1.5rem; /* Spazio tra titolo e form quando vanno a capo */
    margin-bottom: 2rem; /* Spazio sotto l'intera sezione */
    padding-bottom: 1.5rem; /* Spazio prima della linea di divisione */

}



/*
 * Stile del form dei filtri
*/
.filter-form {
    display: flex;
    gap: 0.75rem; /* Spazio tra gli input e i pulsanti */
    align-items: center;
    flex-wrap: wrap; /* Permette agli elementi del form di andare a capo */
}

/*
 * Stile per gli input di testo e i menu a tendina
*/
.filter-form input[type="text"],
.filter-form select {

    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans); /* Eredita il font del sito */
    font-size: 0.9rem;
    min-width: 200px; /* Larghezza minima per evitare che siano troppo piccoli */
    transition: var(--transition);
}

/* Effetto al focus: bordo colorato e ombra sottile */
.filter-form input[type="text"]:focus,
.filter-form select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3); /* Simula l'outline di Tailwind */
}

/*
 * Stile per il menu a tendina (select)
 * Aggiunge un'icona a freccia personalizzata per un look più pulito
*/
.filter-form select {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%239CA3AF' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem; /* Spazio extra per non sovrapporre il testo alla freccia */
}

/* Stili per i pulsanti all'interno del form */
.filter-form .button,
.filter-form .button-secondary {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

.filter-form .button,
.filter-form .button-secondary {
    /* Manteniamo il padding verticale che avevamo */
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    
    /* === AGGIUNTE CHIAVE PER UNIFORMARE === */
    
    /* 1. Assicura che si allineino correttamente nel layout flex */
    align-self: stretch;

    /* 2. Assicura che l'altezza del testo sia la stessa */
    line-height: 1.5;

    /* 3. Assicura che ereditino il font in modo identico */
    font-family: inherit;
    font-size: 0.9em; /* Deve corrispondere alla dimensione del font degli input */
}

.slot-user-wrapper {
    /* 1. Attiva Flexbox */
    display: flex;

    /* 2. Allinea TUTTO verticalmente al centro (la soluzione!) */
    align-items: center;

    /* 3. Spazio tra gli elementi (avatar, nome, pulsante) */
    gap: 0.75rem;

    /* 4. Spinge questo gruppo tutto a destra del suo contenitore */
    margin-left: auto;
}




.slot-action-button.leave {
    /* Puoi aggiungere stili specifici se necessario */
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: none !important;
}

.profile-info h1 {
    margin-bottom: 0.5rem;
}
.profile-info p {
    color: var(--text-secondary);
    max-width: 60ch;
}

.profile-stats h2 {
    margin-bottom: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    text-align: center;
}

.stat-card h3 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.stat-card .stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1;
}

.stat-card .stat-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.profile-events-list h2 {
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Va a capo su schermi piccoli */
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.admin-header h1 {
    margin-bottom: 0; /* Rimuove il margine di default per un migliore allineamento */
}

/*
 * Contenitore della tabella, necessario per permettere lo scrolling orizzontale
 * su schermi molto piccoli, evitando che la tabella "rompa" il layout.
*/
.admin-table-container {
    overflow-x: auto;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

/*
 * Stile della tabella principale
*/
.admin-table {
    width: 100%;
    border-collapse: collapse; /* Rimuove gli spazi tra le celle */
    min-width: 600px; /* Larghezza minima prima che appaia lo scroll orizzontale */
}

/* Stile per le celle header (th) e le celle dati (td) */
.admin-table th,
.admin-table td {
    padding: 1rem 1.25rem;
    text-align: left;
    vertical-align: middle; /* Allinea il contenuto verticalmente al centro */
    border-bottom: 1px solid var(--border-color);
}

/* Stile specifico per l'header della tabella */
.admin-table thead {
    background-color: var(--bg-tertiary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

/* Stile per le righe del corpo della tabella */
.admin-table tbody tr {
    transition: background-color 0.2s ease-in-out;
}
.admin-table tbody tr:hover {
    background-color: var(--bg-tertiary); /* Effetto hover per evidenziare la riga */
}
.admin-table tbody tr:last-child td {
    border-bottom: none; /* Rimuove il bordo dall'ultima riga */
}

/*
 * Stile per la colonna delle azioni, per allineare i pulsanti
*/
.admin-table .action-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Stile specifico per i pulsanti dentro la tabella */
.admin-table .button-secondary,
.admin-table .button-danger {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

/* Stile per il pulsante di eliminazione */
.button-danger {
    background-color: var(--danger-color);
    color: white;
}
.button-danger:hover {
    background-color: var(--danger-hover);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--border-color);
    box-shadow: var(--shadow);
}

.profile-info h1 {
    margin-bottom: 0.5rem;
}

.profile-info p {
    color: var(--text-secondary);
    max-width: 60ch;
}

.profile-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.profile-badges .badge {
    background-color: var(--bg-tertiary);
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
}

.profile-visits {
    font-size: 0.9rem;
    color: var(--text-secondary);
}




/*
 * 2. Stili Pagina Calendario
*/

/* Assicura che il contenitore del calendario abbia uno sfondo */
#calendar {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

/* Stile dei pulsanti del calendario (es. "Mese", "Settimana") */
.fc-button {
    background-color: var(--accent-color) !important;
    border: none !important;
    text-transform: capitalize !important;
}
.fc-button:hover {
    background-color: var(--accent-hover) !important;
}
.fc-button-primary:focus {
    box-shadow: none !important;
}

/* Rende gli eventi cliccabili con un cursore a puntatore */
.fc-event {
    cursor: pointer;
}

/* Colore del testo per i giorni e i titoli */
.fc-col-header-cell-cushion, .fc-daygrid-day-number {
    color: var(--text-secondary);
    text-decoration: none;
}
.fc-day-today {
    background-color: rgba(59, 130, 246, 0.1) !important;
}

/*
 * 3. Stili Pagina Changelogs
*/

.changelog-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.changelog-entry {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--accent-color);
}

.changelog-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;

}

.changelog-header h2 {
    margin: 0;
}

.changelog-date {
    color: var(--text-secondary);
    font-style: italic;
}

.changelog-content ul {
    list-style-type: none;
    padding-left: 0;
}

.changelog-content li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.changelog-content li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-size: contain;
    background-repeat: no-repeat;
}

.changelog-content li.added::before {
    content: '[+]';
    color: var(--success-color);
    font-weight: bold;
}

.changelog-content li.removed::before {
    content: '[-]';
    color: var(--danger-color);
    font-weight: bold;
}

.changelog-preview {
    max-width: 600px;
    background-color: var(--bg-secondary);

    padding: 1.5rem;
    border-radius: var(--border-radius);
    color: white; /* per contrasto */
    box-shadow: 0 0 8px rgba(255, 0, 255, 0.5);
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 8px rgba(255, 0, 255, 0.5);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
        transform: scale(1.02);
    }
}



.changelog-actions {
    margin-top: 1.5rem;
}


/*
 * 4. Stili Sistema di Report Bug
*/

/* Form di report */
.report-form textarea {
    min-height: 120px;
    font-family: 'Courier New', Courier, monospace; /* Font monospace per i passaggi */
}

/* Lista dei report nel pannello admin */
.report-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.report-item {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left-width: 4px;
    border-left-style: solid;
}

/* Colori dei bordi in base allo stato */
.report-item.status-da-risolvere { border-color: var(--danger-color); }
.report-item.status-in-lavorazione { border-color: var(--warning-color); }
.report-item.status-risolto { border-color: var(--success-color); }
.report-item.status-false-positive { border-color: var(--text-secondary); }

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.report-header h3 {
    margin: 0;
}

.report-status {
    padding: 0.4rem 0.9rem !important;
    border-radius: 999px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;

    /* Effetto Vetro */
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    text-shadow: none !important;
}

.report-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0.5rem 0 1.5rem 0;
}
.report-meta span + span::before {
    content: '•';
    margin: 0 0.5rem;
}

.report-details h4 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.report-details pre {
    background-color: var(--bg-primary);
    padding: 1rem;
    border-radius: var(--border-radius);
    white-space: pre-wrap; /* Va a capo se il testo è lungo */
    font-family: 'Courier New', Courier, monospace;
}

.report-comments {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}
.report-comments ul {
    list-style: none;
    padding: 0;
}
.report-comments li {
    padding: 0.5rem 0;
}

.report-actions {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--border-color);
}
.report-actions form {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}
.report-actions form input[type="text"] {
    flex-grow: 1;
}

.superadmin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.superadmin-card {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.superadmin-card h2 {
    font-size: 1.25rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.superadmin-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    flex-grow: 1; /* Spinge i pulsanti in fondo alla card */
    margin-bottom: 1.5rem;
}

.superadmin-card .button,
.superadmin-card .button-secondary,
.superadmin-card .button-danger {
    width: 100%;
    margin-top: 0.5rem;
}

.superadmin-card ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1rem;
}

.superadmin-card li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--bg-tertiary);
    font-family: 'Courier New', Courier, monospace;
}
.superadmin-card li:last-child {
    border-bottom: none;
}

.superadmin-card form {
    margin-top: auto; /* Allinea i form in fondo */
}


/*
 * 2. Stili Pagina Changelogs
*/
.changelog-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.changelog-entry {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--accent-color);
}

.changelog-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.changelog-header h2 { margin: 0; }

.changelog-date {
    color: var(--text-secondary);
    font-style: italic;
}

.changelog-content ul {
    list-style-type: none;
    padding-left: 0;
    margin-top: 1rem;
}

.changelog-content li {
    padding: 0.5rem 0;
    padding-left: 2rem;
    position: relative;
    font-size: 1rem;
}

.changelog-content li::before {
    position: absolute;
    left: 0;
    top: 0.6rem;
    font-weight: bold;
    font-size: 1.1rem;
}

.changelog-content li.added::before { content: '[+]'; color: var(--success-color); }
.changelog-content li.removed::before { content: '[-]'; color: var(--danger-color); }
.changelog-content li.fixed::before { content: '[*]'; color: var(--warning-color); }
.changelog-content li.changed::before { content: '[~]'; color: var(--accent-color); }


/*
 * 3. Stili Pagina Report Bug (Vista e Gestione)
*/
.reports-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.report-form {
    border: 1px dashed var(--border-color);
}

.report-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.report-item {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left-width: 4px;
    border-left-style: solid;
    transition: box-shadow 0.2s;
}
.report-item:hover {
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
}

/* Colori dei bordi in base allo stato */
.report-item.status-da-risolvere { border-color: var(--danger-color); }
.report-item.status-in-lavorazione { border-color: #FACC15; } /* var(--warning-color) */
.report-item.status-risolto { border-color: var(--success-color); }
.report-item.status-false-positive { border-color: var(--text-secondary); }

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}
.report-header h3 { margin: 0; }

.report-status {
    background-color: var(--bg-tertiary);
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.report-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0.5rem 0 1.5rem 0;
}
.report-meta span + span::before { content: '•'; margin: 0 0.5rem; }
.report-meta a { color: var(--text-secondary); }
.report-meta a:hover { color: var(--text-accent); }

.report-details h4 { margin-top: 1rem; margin-bottom: 0.5rem; color: var(--text-secondary); }

.report-details pre {
    background-color: var(--bg-primary);
    padding: 1rem;
    border-radius: var(--border-radius);
    white-space: pre-wrap;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
}

.report-comments {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}
.report-comments h4 { margin-top: 0; }
.report-comments ul { list-style: none; padding: 0; }
.report-comments li { padding: 0.5rem 0; border-bottom: 1px solid var(--bg-tertiary); }
.report-comments li:last-child { border-bottom: none; }
.report-comments .comment-date { font-size: 0.8em; color: var(--text-secondary); }

.report-actions {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--border-color);
}
.report-actions form {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}
.report-actions form input[type="text"] { flex-grow: 1; }

.button:disabled {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.6;
}
.button:disabled:hover {
    transform: none; /* Rimuove l'effetto hover */
}

.profile-events-list h2 {
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

/* Contenitore per lo scroll su mobile */
.profile-table-container {
    overflow-x: auto;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.profile-events-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px; /* Larghezza minima prima dello scroll */
}

.profile-events-table th,
.profile-events-table td {
    padding: 1rem 1.25rem;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.profile-events-table thead {
    background-color: var(--bg-tertiary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.profile-events-table tbody tr:last-child td {
    border-bottom: none;
}
.profile-events-table tbody tr:hover {
    background-color: var(--bg-tertiary);
}

/* Stile per il badge di stato all'interno della tabella */
.status-badge-table {
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap; /* Evita che vada a capo */
}

/* Colori specifici (usiamo gli stessi di prima) */
.status-badge-table.status-open { background-color: var(--success-color); }
.status-badge-table.status-live { background-color: var(--danger-color); }
.status-badge-table.status-finished { background-color: var(--bg-tertiary); color: var(--text-secondary); }

/* Stile per il pulsante 'Dettagli' */
.small-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

.admin-list-container {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.admin-list-container h4 {
    margin-top: 0;
    color: var(--text-secondary);
}

/* ==================================================== */
/*      MENU HEADER, DROPDOWN E MOBILE (FIX DEFINITIVO) */
/* ==================================================== */

/* --- 1. Stili Generali della Navbar --- */

/* La lista principale dei link. È un contenitore flex. */
#nav-links {


    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

/* Ogni elemento della lista principale */
#nav-links > li {
color: rgba(0, 123, 255, 0.9) !important;
    display: flex;
    align-items: center;
}


/* --- 2. Stili Dropdown (VISUALIZZAZIONE DESKTOP) --- */

.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
}

.dropdown-toggle .arrow-down {
    font-size: 0.7em;
    margin-left: 0.3rem;
    transition: transform 0.2s;
}

/* Il sottomenu a tendina */
.dropdown-menu {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 0.5rem; /* 👈 Spazio verticale tra i <li> */
    top: 100%;
    left: 0;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    list-style: none;
    min-width: 200px;
    z-index: 1000;
    box-shadow: var(--shadow);

    /* Logica di visibilità basata su JS */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s 0.2s;
}

.dropdown-menu li {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 0.5rem 1rem;
    color: rgba(102, 178, 255, 0.9); /* #66B2FF con opacità 90% */
    text-decoration: none;
    width: 100%;
}

.dropdown-menu li a:hover {


}


/* Quando la classe .open è presente, il menu appare */
.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0s;
}

.dropdown.open .arrow-down {
    transform: rotate(180deg);
}

/* I link DENTRO il dropdown */
.dropdown-menu li {
    /* **LA CHIAVE PER IL VERTICALE SU DESKTOP** */
    /* Ogni <li> occupa tutta la larghezza del dropdown, forzando l'andata a capo */
    width: 100%;
}

.dropdown-menu li a {
    display: block; /* Occupa tutto lo spazio del suo <li> */
    padding: 0.75rem 1.25rem;
color: rgba(102, 178, 255, 0.9); /* #66B2FF con opacità 90% */
    white-space: nowrap;
    text-decoration: none;
}
.dropdown-menu li a:hover {
text-decoration: underline;
}
.dropdown-menu li a.super-admin-button {
    color: var(--warning-color);
}


/* --- 3. Stili per la Visualizzazione Mobile --- */

@media (max-width: 768px) {
  /* ... resto del CSS ... */

  /* Nascondi tutto il dropdown (li che contiene il menu) */
  .notification-bell, .home-btn {
    display: none !important;
  }
}





/* ==================================================== */
/*      STILI BADGE DI STATO - EFFETTO LIQUID GLASS V2.0  */
/* ==================================================== */

/*
 * Stile base per tutti i badge (invariato)
*/
.status-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 1 !important;

}

/* 
 * Colori per gli stati ATTIVI (rimangono solidi e vividi)
*/
.status-open,
.status-badge-table.status-open { 
    background-color: var(--success-color); 
    color: white;
    box-shadow: 0 2px 10px rgba(22, 163, 74, 0.4); /* Ombra colorata per un effetto "glow" */

}
.status-live,
.status-badge-table.status-live { 
    background-color: var(--danger-color);
    color: white;
    box-shadow: 0 2px 10px rgba(220, 38, 38, 0.4); /* Ombra colorata */

}


/* 
 * ============================================================
 * Stili "LIQUID GLASS" per "Prossimamente" e "Concluso"
 * ============================================================
*/
/* 
 * ============================================================
 * Stili "LIQUID GLASS" realistici per "Prossimamente" e "Concluso"
 * ============================================================
*/
.status-upcoming,
.status-finished,
.status-badge-table.status-upcoming,
.status-badge-table.status-finished {
    backdrop-filter: blur(10px) saturate(160%);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow:
        inset 0 0 0.5px rgba(255, 255, 255, 0.3),
        0 4px 20px rgba(0, 0, 0, 0.2);
    border-radius: 999px;
    color: #f1f5f9;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
}

/* Colore specifico per "Prossimamente" */
.status-upcoming,
.status-badge-table.status-upcoming {
    background: linear-gradient(
        135deg,
        rgba(59, 130, 246, 0.3),
        rgba(59, 130, 246, 0.1)
    );
    color: #e0f2fe;
}

/* Colore specifico per "Concluso" */
.status-finished,
.status-badge-table.status-finished {
    background: linear-gradient(
        135deg,
        rgba(107, 114, 128, 0.3),
        rgba(107, 114, 128, 0.1)
    );
    color: #d1d5db;
}
.button { background: rgba(var(--accent-color-base), 0.25); outline: white;}
.button:hover { background: rgba(var(--accent-color-base), 0.4); }
.button.discord { background: rgba(88, 101, 242, 0.3); border-color: rgba(88, 101, 242, 0.5); }
.button.discord:hover { background: rgba(88, 101, 242, 0.5); }

.button-danger { background: rgba(var(--danger-color-base), 0.25); }
.button-danger:hover { background: rgba(var(--danger-color-base), 0.4); }
.slot-action-button.take { background: rgba(var(--success-color-base), 0.25); }
.slot-action-button.take:hover { background: rgba(var(--success-color-base), 0.4); }
.slot-action-button.leave { background: rgba(var(--danger-color-base), 0.25); }
.slot-action-button.leave:hover { background: rgba(var(--danger-color-base), 0.4); }

/* --- Pulsanti con Bordo Luminoso Realistico --- */
.button, .button-secondary, .button-danger, .slot-action-button {
    padding: 0.6rem 1.25rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);

    /* Proprietà Glassmorphism Base */
    
    /* ============== MODIFICHE CHIAVE QUI ============== */
    
    /* 1. Bordo Esterno Sottile e Trasparente */
    border: 1px solid rgba(255, 255, 255, 0.18);
    

}

/* ========================================================== */
/*      STILE "LIQUID GLASS" FORZATO PER COMPONENTI CHIAVE    */
/* ========================================================== */

/*
 * Selettore unico per tutti i componenti che devono avere l'effetto "vetro".
 * L'uso di !important garantisce che queste regole vincano su qualsiasi altra.
*/

footer {
  width: 100%;
  margin: 0 auto;               /* centra il contenitore */
  justify-content: center;      /* centra il contenuto orizzontalmente */
}

textarea, input {
color: var(--text-primary) !important;
}


.changelog-entry,

pre,

.card,
.swal2-popup,
input,
textarea:not(#chat-input),
.step-card,
.faq-item,
.event-card,
.changelog-preview,
.stat-card,
.profile-table-container, /* Applicato al contenitore della tabella */
.event-meta,
.slot-group,
.create-form,
.admin-table-container,
.superadmin-card,
.report-item {
    /* 1. Sfondo a gradiente traslucido */
    background: #1C1C1E !important;



    /* 3. Bordo luminoso per realismo */
    border: 1px solid rgba(255, 255, 255, 0.12) !important;

    /* 4. Ombra per dare profondità */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37) !important;
    
    /* 5. Angoli arrotondati */


    border-radius: 20px;
    
}

#chat-input {
    border-radius: 0px !important;
}

#send-chat-btn:hover {
    box-shadow: none !important;
    text-shadow: none !important;
}

.header-avatar-icon {
    background-color: #1c1c1e !important;
}


.nav-link:hover {
    text-decoration: none !important;
    cursor: pointer !important;
}




/*
 * Stile specifico per i BADGE (richiesto nella lista)
 * Leggermente diverso per adattarsi alle dimensioni ridotte.
*/
.status-badge,
.status-badge-table,
.profile-badges .badge {
    /* Effetto vetro più leggero */
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    
    /* Manteniamo i colori di sfondo specifici per lo stato */
}

/*
 * Colori specifici per i badge (devono sovrascrivere lo sfondo generico)
*/
.status-open, .status-badge-table.status-open { background: rgba(var(--success-color-base), 0.3) !important; color: #fff !important; }
.status-live, .status-badge-table.status-live { background: rgba(var(--danger-color-base), 0.3) !important; color: #fff !important; }

.status-badge-table.status-finished { background: rgba(255, 255, 255, 0.1) !important; color: var(--text-secondary) !important; }

/*
 * Per la tabella del profilo, lo stile va applicato al contenitore
 * e poi dobbiamo resettare gli sfondi interni per coerenza.
*/
.profile-events-table {
    background: transparent !important;
}
.profile-events-table thead {
    background-color: rgba(255, 255, 255, 0.05) !important;
}
.profile-events-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
}
.profile-events-table td,
.profile-events-table th {
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

/*
 * Pulizia finale per coerenza
 * Rimuoviamo eventuali sfondi solidi rimasti dai componenti
*/


/*
 * Stile specifico per il dropdown-menu per migliorare la leggibilità
*/
.dropdown-menu {
    /* Sfondo un po' più opaco rispetto agli altri elementi "vetro" */
    background: #242424;
    /* 2. Sfocatura dello sfondo (Glassmorphism) */
    -webkit-backdrop-filter: blur(12px) !important;
    backdrop-filter: blur(12px) !important;

    /* 3. Bordo luminoso per realismo */
    border: 1px solid rgba(255, 255, 255, 0.18) !important;

    /* 4. Ombra per dare profondità */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37) !important;
	
}

/* ========================================================== */
/*      STILE "LIQUID GLASS" FORZATO PER CALENDARIO           */
/* ========================================================== */

/*
 * 1. Contenitore Principale del Calendario
*/
#calendar {
    /* Applichiamo lo stile "vetro" di base */

    background-color: #1C1C1E;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37) !important;
    border-radius: var(--border-radius) !important;
    
    /* Aggiustamenti specifici per il calendario */
    padding: 1.5rem !important;
}

/*
 * 2. Pulsanti del Calendario (Mese, Settimana, Prev, Next)
*/
.fc-button {
    /* Stile "vetro colorato" per i pulsanti */
    background: rgba(var(--accent-color-base), 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    backdrop-filter: blur(5px) !important;
    color: var(--text-primary) !important;
    
    /* Rimuoviamo stili di default che interferiscono */
    text-shadow: none !important;
    opacity: 1 !important;
}
.fc-button:hover {
    background: rgba(var(--accent-color-base), 0.4) !important;
}
.fc-button-primary:focus {
    box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important; /* Rimuove l'outline al focus */
}
.fc .fc-button-primary:disabled {
    opacity: 0.5 !important;
    background: rgba(255, 255, 255, 0.1) !important;
}


/*
 * 3. Sfondo e Bordi Interni
*/
/* Rimuoviamo gli sfondi di default per far vedere il "vetro" sottostante */
.fc-theme-standard td, .fc-theme-standard th {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Evidenziamo il giorno corrente con un "vetro" leggermente diverso */
.fc .fc-daygrid-day.fc-day-today {
    background-color: rgba(var(--accent-color-base), 0.15) !important;
}


/*
 * 4. Testo e Eventi
*/
/* Colore del testo (titolo, giorni della settimana, numeri) */
.fc .fc-toolbar-title {
    color: var(--text-primary) !important;
}
.fc-col-header-cell-cushion, .fc-daygrid-day-number {
    color: var(--text-secondary) !important;
    text-decoration: none !important;
}

/* Stile "vetro" anche per gli eventi stessi */
.fc-daygrid-event {
    background: rgba(var(--accent-color-base), 0.5) !important;
    border: 1px solid rgba(var(--accent-color-base), 0.8) !important;
    border-radius: 4px !important;
}
.fc-event-main {
    color: var(--text-primary) !important;
}

/* ========================================================== */
/*      STILE "LIQUID GLASS" FORZATO PER TUTTI I BADGE      */
/* ========================================================== */

/*
 * Selettore unico per tutti i tipi di badge.
 * Applichiamo lo stile "vetro" di base.
*/
.status-badge,
.status-badge-table,
.profile-badges .badge {
    /* Proprietà di base */
    padding: 0.4rem 0.9rem !important;
    border-radius: 999px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;

    /* Effetto Vetro */
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    text-shadow: none !important;
}
.profile-badges .badge {
    background: rgba(255, 255, 255, 0.1) !important; /* Colore di default per Recluta, etc. */
}

/* Badge Zeus */
.badge-zeus {
    padding: 0.4rem 0.9rem !important;
    border-radius: 999px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;

    /* Effetto Vetro */
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    text-shadow: none !important;
background: rgba(0, 255, 0, 0.2) !important;

}

.badge-admin {
    padding: 0.4rem 0.9rem !important;
    border-radius: 999px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;

    /* Effetto Vetro */
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    text-shadow: none !important;
background: rgba(255, 0, 0, 0.2) !important;

}

.badge-staff {
    padding: 0.4rem 0.9rem !important;
    border-radius: 999px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;

    /* Effetto Vetro */
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    text-shadow: none !important;
background: rgba(0, 123, 255, 0.2) !important;

}
/* ========================================================== */
/*      STILE "SIMULATED LIQUID GLASS" PER SCROLLBAR          */
/* ========================================================== */

/* Per Browser basati su WebKit (Chrome, Edge, Safari) */

/* 1. La larghezza della scrollbar */
::-webkit-scrollbar {
    width: 14px !important;
    height: 14px !important;
}

/* 2. La "traccia" (lo sfondo) */
::-webkit-scrollbar-track {
    /* Usiamo uno sfondo quasi trasparente per dare l'illusione
       che la scrollbar sia sopra il contenuto */
    background: transparent !important; 
}

/* 3. Il "pollice" (la parte mobile che si trascina) */
::-webkit-scrollbar-thumb {
    border-radius: 10px !important;
    
    /* Bordo luminoso che simula il bordo del vetro */
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    
    /* Il corpo del pollice: un gradiente traslucido */
    background-color: rgba(255, 255, 255, 0.15) !important;
    
    /* Trucco per far sì che il bordo sia visibile all'interno del background */
    background-clip: padding-box !important;
    
    /* Ombra interna per dare profondità */
    box-shadow: inset 0 0 5px rgba(0,0,0,0.3) !important;
}

/* 4. Effetto al passaggio del mouse sul pollice */
::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* 5. (Opzionale) Pulsanti freccia alle estremità (li nascondiamo per un look minimale) */
::-webkit-scrollbar-button {
    display: none !important;
}


/* Per Browser Firefox */
html {
    scrollbar-width: thin !important;
    /* Colore pollice (grigio traslucido) e traccia (completamente trasparente) */
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent !important;
}





.report-falsep {

    padding: 0.4rem 0.9rem !important;
    border-radius: 999px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;

    /* Effetto Vetro */
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    text-shadow: none !important;

background-color: rgba(255, 255, 255, 0.2) !important;
}

.report-toresolve {

    padding: 0.4rem 0.9rem !important;
    border-radius: 999px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;

    /* Effetto Vetro */
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    text-shadow: none !important;

background-color: rgba(255, 0, 0, 0.2) !important;
}

.report-resolved {

    padding: 0.4rem 0.9rem !important;
    border-radius: 999px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;

    /* Effetto Vetro */
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    text-shadow: none !important;

background-color: rgba(0, 255, 0, 0.2) !important;
}

.report-working {

    padding: 0.4rem 0.9rem !important;
    border-radius: 999px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;

    /* Effetto Vetro */
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    text-shadow: none !important;

background-color: rgba(255, 167, 0, 0.2) !important;
}
.prw-version-glow {
  font-weight: bold;
  font-size: 2rem;
  position: relative;
  display: inline-block;
  color: transparent; /* testo "trasparente" */
  background: linear-gradient(270deg, #00aaff, #00d4ff, #0077cc, #00aaff);
  background-size: 600% 600%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: movingGlow 5s ease infinite;
  filter: drop-shadow(0 0 5px #00aaff);
}

@keyframes movingGlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}














.button-logout {
padding: 0.6rem 1.25rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);

    /* Proprietà Glassmorphism Base */
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    
    /* ============== MODIFICHE CHIAVE QUI ============== */
    
    /* 1. Bordo Esterno Sottile e Trasparente */
    border: 1px solid rgba(255, 255, 255, 0.18);
    
    /* 2. Ombra Esterna per la profondità + Ombra Interna per il bordo luminoso */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), /* Ombra esterna (scura) */
                inset 0 0 0 1px rgba(255, 255, 255, 0.1); /* Ombra interna (chiara, simula il bordo) */
background-color: rgba(185, 28, 28, .7) !important;

}




.status-live {
    padding: 0.4rem 0.9rem !important;
    border-radius: 999px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;

    /* Effetto Vetro */
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    text-shadow: none !important;

background-color: rgba(0, 255, 0, 0.2) !important;
}


/* ========================================================== */
/*          STILI DASHBOARD SUPER ADMIN                       */
/* ========================================================== */

.stats-grid.main-stats {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.chart-container {
    padding: 1.5rem !important;
}

.chart-container h2 {
    text-align: center;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

/* ========================================================== */
/*          STILI PAGINA "LA NOSTRA MISSIONE"                 */
/* ========================================================== */

.mission-page .mission-header {
    text-align: center;
    margin-bottom: 3rem;
}

.mission-page .mission-header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.mission-page .subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-style: italic;
}

.mission-content {
    padding: 2rem 2.5rem !important; /* Aggiunge più padding interno */
}

.mission-content h2 {
    font-size: 1.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.mission-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-secondary) !important;
}

.pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.pillar-card {
    padding: 1.5rem !important;
    text-align: center;
}

.pillar-card h3 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    font-size: 1.25rem;
    color: var(--text-primary) !important;
}

.pillar-icon > i {
    padding-bottom: 5px;
}

h1 {
     font-weight: 800; line-height: 1.1; max-width: 900px; letter-spacing: -0.04em; 
}

.pillar-icon > i, .pillar-icon {
    font-size: 40px;
    display: block;
    color: var(--accent-color)
}

/* ========================================================== */
/*          STILI NUOVO LAYOUT PAGINA REPORT                  */
/* ========================================================== */

/* Lista di Card */
.report-card-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.report-card {
    /* Stile "card" generico */
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    border-left-width: 4px;
    border-left-style: solid;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s;
    
    /* Applichiamo lo stile Liquid Glass */

    -webkit-backdrop-filter: blur(12px) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37) !important;
    border-radius: var(--border-radius) !important;
}

.report-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45) !important;
}

/* Colori dei bordi in base allo stato */
.report-card.status-da-risolvere { border-color: var(--danger-color); }
.report-card.status-in-lavorazione { border-color: #FACC15; }
.report-card.status-risolto { border-color: var(--success-color); }
.report-card.status-false-positive { border-color: var(--text-secondary); }

.report-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}
.report-card .card-header h3 { margin: 0; font-size: 1.2rem; }

.report-card .card-description {
    flex-grow: 1;
    color: var(--text-secondary) !important;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.report-card .card-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);

    padding-top: 1rem;
}


/* Pagina di Dettaglio Report */
.report-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.back-link {
    color: var(--text-secondary);
    text-decoration: none;
}
.back-link:hover {
    color: var(--text-primary);
}
.report-detail-content {
    padding: 2rem !important;
    margin-top: 2rem;
}


/* ========================================================== */
/*          STILI SISTEMA DI ENCOMI                           */
/* ========================================================== */

/* Pannello per dare encomi (pagina evento) */
.encomium-panel {
    padding: 2rem !important;
    margin-top: 2rem;
}
.encomium-panel h2 {
    margin-top: 0;
}
.encomium-form .form-row {
    display: flex;
    gap: 1.5rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}
.encomium-form .form-group {
    flex: 1;
    min-width: 250px;
}
.encomium-form label {
    display: block;
    margin-bottom: 0.5rem;
}
.encomium-form select {
    padding: 0.6rem 0.8rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans); /* Eredita il font del sito */
    font-size: 0.9rem;
    min-width: 200px; /* Larghezza minima per evitare che siano troppo piccoli */
    transition: var(--transition);
}

/* Visualizzazione encomi ricevuti (pagina profilo) */
.encomiums-received {
    margin-top: 2rem;
}

.encomium-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.encomium-card {
    background: rgba(var(--accent-color-base), 0.2);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgba(var(--accent-color-base), 0.4);
}

.encomium-icon {
    font-size: 1.5rem;
}

.encomium-name {
    font-weight: 600;
}

.encomium-count {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--text-primary);
    background-color: var(--accent-color);
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    margin-left: auto;
}




/* ========================================================== */
/*          STILI PER IL SISTEMA DI GRUPPI                    */
/* ========================================================== */

/*
 * 1. Stili per la Pagina Elenco Gruppi (/groups)
*/

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.group-card-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.group-card {
    /* Eredita lo stile .card, ma lo rendiamo un link */
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s;
    padding: 1.5rem;
}
.group-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45) !important;
}

.group-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}
.group-card .card-header h3 { margin: 0; font-size: 1.3rem; }
.group-card .card-header span {
    background: rgba(var(--accent-color-base), 0.2);
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    white-space: nowrap;
}

.group-card .card-description {
    flex-grow: 1;
    color: var(--text-secondary) !important;
}

.group-card .card-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;

    color: var(--text-accent);
    font-weight: 600;
}

/*
 * 2. Stili per la Pagina di Dettaglio Gruppo (/group/:id)
*/

.group-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.group-detail-header h1 {
    margin: 0;
}
.group-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    max-width: 75ch;
}

.group-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.group-main-content h2 {
    margin-top: 0;
}

@media (max-width: 768px) {
  .group-layout {
    display: flex;
    flex-direction: column;
  }
}


.group-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.members-panel, .zeus-panel {
    padding: 1.5rem !important;
}

.members-panel h3, .zeus-panel h3 {
    margin-top: 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.members-panel ul {
    list-style: none;
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
}

.members-panel li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.members-panel li:last-child {
    border-bottom: none;
}
.members-panel li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    text-decoration: none;
}
.members-panel li a:hover span {
    text-decoration: underline;
}

.zeus-panel form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.zeus-panel select {
    padding: 0.6rem 0.8rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans); /* Eredita il font del sito */
    font-size: 0.9rem;
    min-width: 200px; /* Larghezza minima per evitare che siano troppo piccoli */
    transition: var(--transition);
}
.zeus-actions {
    display: flex;
    gap: 0.5rem;
}
.zeus-actions button {
    flex-grow: 1;
}

/* Stile per il badge Zeus nella lista membri */
.badge.badge-zeus {
    font-size: 0.8rem !important;
    padding: 0.3rem 0.6rem !important;
}


/*
 * 3. Aggiustamenti per Integrazione in altre pagine
*/

/* Prefisso nella slotlist */
.taken-slot a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Nome gruppo organizzatore sulla card evento */
.event-organizer {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-accent);
    margin-bottom: 0.5rem;
}

/*
 * 4. Stili per Dispositivi Mobili
*/
@media (max-width: 992px) {
    .group-layout {
        grid-template-columns: 1fr; /* Stack verticale */
    }
}

select {
    padding: 0.6rem 0.8rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans); /* Eredita il font del sito */
    font-size: 0.9rem;
    min-width: 200px; /* Larghezza minima per evitare che siano troppo piccoli */
    transition: var(--transition);
}



/* ========================================================== */
/*          STILI PAGINA INVITO / LANDING PAGE                */
/* ========================================================== */

.landing-page .landing-hero {
    text-align: center;
    padding: 4rem 2rem !important;
    margin-bottom: 4rem;
}

.landing-hero h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary) !important;
}

.landing-hero .subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary) !important;
    max-width: 65ch;
    margin: 0 auto 2rem auto;
}

.hero-button {
    font-size: 1.1rem !important;
    padding: 0.8rem 2rem !important;
}

.landing-section {
    margin-bottom: 4rem;
}

.landing-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.landing-section .section-intro {
    text-align: center;
    max-width: 70ch;
    margin: 0 auto 3rem auto;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    padding: 2rem !important;

}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.step-card {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    background: rgba(0,0,0,0.1);
    padding: 1.5rem;
    border-radius: var(--border-radius);
}

.step-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    background: rgba(var(--accent-color-base), 0.15);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-content h3 {
    margin-top: 0;
}

.faq-container {

    margin: 3rem auto 0 auto;
    display: flex;
    flex-wrap: wrap; /* permette più righe */
    gap: 1rem;
}

.faq-container > * {
    flex: 0 1 calc(50% - 0.5rem); /* due elementi per riga */
    box-sizing: border-box; /* assicura che padding e border non sforino */
}

.faq-item {
    background: rgba(0,0,0,0.1);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 3px solid var(--accent-color);
}

.faq-item h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .faq-container > * {
        flex: 1 1 100%; /* 1 elemento per riga su mobile */
    }
}









.legal-page h1 { font-size: 2.5rem; text-align: center; }
.legal-page > p { text-align: center; color: var(--text-secondary); margin-top: -1rem; margin-bottom: 3rem; }
.legal-content { padding: 2rem 2.5rem !important; }
.legal-content h3 { font-size: 1.5rem; margin-top: 2rem; margin-bottom: 1rem; color: var(--text-primary) !important; }
.legal-content p, .legal-content li { font-size: 1rem; line-height: 1.7; color: var(--text-secondary) !important; }
.legal-content ul { padding-left: 20px; }

/* ========================================================== */
/*          STILI PAGINA 404 (NOT FOUND)                      */
/* ========================================================== */

.error-page-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh; /* Occupa buona parte della pagina */
    text-align: center;
}

.error-content {
    padding: 3rem 4rem !important;
    max-width: 600px;
}

.error-code {
    font-size: 6rem;
    font-weight: 800;
    line-height: 1;
    color: var(--accent-color);
    text-shadow: 0 4px 15px rgba(var(--accent-color-base), 0.3);
}

.error-content h1 {
    font-size: 2.5rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary) !important;
}

.error-content p {
    color: var(--text-secondary) !important;
    font-size: 1.1rem;
}

.error-actions {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.error-actions a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.changelog-tags-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    background: rgba(0,0,0,0.2);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}
.changelog-tags-selector label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    cursor: pointer;
}

/* Stile per le etichette visualizzate */
.changelog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.changelog-tag {
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}





/* Colori delle etichette */
.tag-feature {
    padding: 0.4rem 0.9rem !important;
    border-radius: 999px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;

    /* Effetto Vetro */
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    text-shadow: none !important;
    background: rgba(0, 123, 255, 0.6) !important; /* blu acceso */
    background: rgba(40, 167, 69, 0.6) !important; /* verde */
}

.tag-improvement {
    padding: 0.4rem 0.9rem !important;
    border-radius: 999px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;

    /* Effetto Vetro */
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    text-shadow: none !important;

    background: rgba(0, 123, 255, 0.6) !important; /* blu acceso */

}

.tag-fix {
    padding: 0.4rem 0.9rem !important;
    border-radius: 999px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;

    /* Effetto Vetro */
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    text-shadow: none !important;
    background: rgba(255, 193, 7, 0.6) !important; /* giallo/arancio */

}

.tag-security {
    padding: 0.4rem 0.9rem !important;
    border-radius: 999px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;

    /* Effetto Vetro */
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    text-shadow: none !important;
    background: rgba(220, 53, 69, 0.6) !important; /* rosso */
}

.tag-style {
    padding: 0.4rem 0.9rem !important;
    border-radius: 999px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;

    /* Effetto Vetro */
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    text-shadow: none !important;
    background: rgba(139, 92, 246, 0.6) !important; /* viola/indaco */

}


.tag-important {
    padding: 0.4rem 0.9rem !important;
    border-radius: 999px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;

    /* Effetto Vetro */
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    text-shadow: none !important;
    background-color: rgba(236, 72, 153, 0.7); /* Rosa/Magenta vibrante */
    animation: pulse-glow 2.5s infinite ease-in-out;
}

.version-tag {
  display: flex;
  align-items: center; /* centra verticalmente il contenuto */
  gap: 0.5rem;
}

header {
top: 1rem;
}





/* ========================================================== */
/*      GRAFICO CONTRIBUTIONS v2 (FIX + TOOLTIP + BLU)      */
/* ========================================================== */

#contribution-graph {
    overflow-x: hidden;
    padding: 1.5rem !important;
}

.graph-months {
    display: flex; /* Mette i mesi in linea */
    padding-left: 30px; /* Spazio per le etichette dei giorni */
    margin-bottom: 5px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.graph-month {
    /* Ogni mese occupa circa 4.3 settimane (19px * 4.3) */
    width: calc(19px * 4.33); 
    text-align: left;
}
.graph-month:first-child {
    width: auto; /* Il primo mese potrebbe essere parziale */
}

.graph-body {
    display: flex;
}

.graph-weekdays {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding-right: 0.5rem;
    flex-shrink: 0;
}
.graph-weekdays span {
    height: 16px;
    display: flex;
    align-items: center;
}
/* Nascondiamo di nuovo le etichette alternate per un look pulito */
.graph-weekdays span:nth-child(even) { visibility: hidden; }

.graph-grid {
    display: grid;
    grid-template-rows: repeat(7, 16px);
    grid-auto-flow: column;
    grid-auto-columns: 16px;
    gap: 3px;
}

.graph-day {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    position: relative;
}
.graph-day:not(.empty) {
    border: 1px solid rgba(255, 255, 255, 0.03);
}

/* ============== NUOVA PALETTE COLORI (BLU) ============== */
.graph-day.level-0 { background-color: rgba(255, 255, 255, 0.05); }
.graph-day.level-1 { background-color: rgba(0, 123, 255, 0.2); }
.graph-day.level-2 { background-color: rgba(0, 123, 255, 0.5); }
.graph-day.level-3 { background-color: rgba(0, 123, 255, 0.8); }
.graph-day.level-4 { background-color: rgb(0, 123, 255); }
/* ======================================================== */


/* ============== NUOVO TOOLTIP CSS ISTANTANEO ============== */
.graph-day::after {
    content: attr(data-tooltip); /* Legge il testo dal nuovo attributo 'data-tooltip' */
    position: absolute;
    bottom: 125%; /* Posizionato sopra il quadratino */
    left: 50%;
    transform: translateX(-50%);
    
    background-color: #111827;
    color: var(--text-primary);
    padding: 0.4rem 0.8rem;
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    white-space: nowrap;
    z-index: 10;
    
    /* Nascosto di default */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease; /* Transizione veloce */
}
.graph-day:hover::after {
    opacity: 1;
    visibility: visible;
}
/* ========================================================== */

.graph-legend {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.graph-legend .graph-day {
    margin: 0 2px;
}






@media (max-width: 768px) {

#contribution-graph {
    display: none;
  }
}



.version-tag {
  display: flex;
  flex-wrap: wrap;
}

.filter-container {
    padding: 1.5rem !important;
    margin-bottom: 2rem;
}

.changelog-filter-form {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.changelog-filter-form input[type="text"] {
    flex-grow: 1; /* Fa sì che la barra di ricerca occupi lo spazio disponibile */
    min-width: 250px;
}

/* ========================================================== */
/*          STILI FILTRI PAGINA REPORT                        */
/* ========================================================== */

/* Usiamo gli stili già definiti per .filter-container e .filter-form */
/* Possiamo aggiungere una variante se serve più spazio */
.report-filter-form input[type="text"] {
    flex-grow: 1; /* Fa sì che la barra di ricerca occupi lo spazio disponibile */
    min-width: 250px;
}



/* ========================================================== */
/*          STILE REQUEST/KICK DAL GRUPPO                     */
/* ========================================================== */



.pending-requests-panel {
    padding: 1.5rem !important;
    border: 1px solid rgba(var(--warning-color-base), 0.5) !important;
}
.pending-requests-panel h3 {
    margin-top: 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.pending-requests-panel ul {
    list-style: none;
    padding: 0;
}
.pending-requests-panel li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;

}
.request-actions {
    display: flex;
    gap: 0.5rem;
}
.request-actions .small-btn {
    font-size: 1.2rem;
    line-height: 1;
    padding: 0.3rem 0.6rem;
}


/* Azioni nella lista membri (badge + pulsante espelli) */
.member-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}


/* ========================================================== */
/*          STILI DEL PROFILO PERSONALIZZ                     */
/* ========================================================== */
.personalize-form {
    margin-top: 1rem;
}
.personalize-form h4 {
    margin-bottom: 0.5rem;
}

/* Layout per input + pulsante sulla stessa riga */
.nickname-input-group {
    display: flex;
    gap: 0.5rem;
}
.nickname-input-group input {
    flex-grow: 1; /* L'input occupa lo spazio disponibile */
}
.nickname-input-group button {
    flex-shrink: 0; /* Il pulsante non si restringe */
}

/* Stile per il pulsante di reset */
.personalize-form .small-btn {
    margin-top: 0.5rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

/* Stile per il form del tema */
#theme-form {
    display: flex;
    align-items: center;
    gap: 1rem;
}
#theme-form select {
    flex-grow: 1;
}

/* in public/css/style.css */

/* Stile di base per il contenitore del profilo */
.profile-page-wrapper {
    /* Eredita lo sfondo di default per coerenza */
    background: linear-gradient(-45deg, #111827, #1F2937, #111827, #374151);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    padding-top: 1px; /* Fix per margini collassati */
    padding-bottom: 1px;
}
.profile-page-wrapper.theme-default {
    /* Non serve nulla, eredita già da body */
}

/* Tema CSAT applicato al wrapper */
.profile-page-wrapper.theme-csat {
    --accent-color-base: 239, 68, 68;
    background: linear-gradient(-45deg, #100a0a, #1E1E1E, #000000, #2d1a1a);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

/* Tema NATO applicato al wrapper */
.profile-page-wrapper.theme-nato {
    --accent-color-base: 74, 222, 128;
    background: linear-gradient(-45deg, #1A202C, #2D3748, #161c27, #2f3e53);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

/* Tema Chiaro applicato al wrapper */
.profile-page-wrapper.theme-light {
    --bg-primary: #F3F4F6;
    --bg-secondary: #FFFFFF;
    --text-primary: #111827;
    --text-secondary: #4B5563;
    --border-color: #D1D5DB;
    background: #e2e8f0;
    animation: none; /* Rimuove l'animazione per il tema chiaro */
}

/* Assicurati che gli elementi 'glass' nel profilo usino le nuove variabili */
.profile-page-wrapper.theme-light .glass-effect {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.3)) !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
}

/* Stile per username originale nel profilo */
.original-username {
    font-style: italic;
    color: var(--text-secondary) !important;
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Stile per la pagina di modifica */
.form-help-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: -0.5rem 0 1.5rem 0;
}

/* TEMI --------------------------------------------------------*/

/* ========================================================== */
/*      STILE MIGLIORATO PER SELETTORE TEMI                   */
/* ========================================================== */

.theme-selector-container { 
    padding: 2rem !important; 
    border-top: 1px solid rgba(255,255,255,0.1);
}

.theme-selector { 
    display: grid;
    /* Crea una griglia reattiva per le opzioni dei temi */
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem; 
}

.theme-option {
    /* Rimuoviamo gli stili di default del pulsante */
    background: none;
    border: none;
    padding: 0;
    height: 10rem;
    /* Stile base della card */
    position: relative;
    border-radius: var(--border-radius);
    cursor: pointer;
    overflow: hidden; /* Nasconde le parti del gradiente che escono */
    transition: transform 0.2s ease, box-shadow 0.2s;
    
    /* Bordo di base */
    border: 2px solid transparent; 
}

.theme-option:hover {
    transform: translateY(-5px);
}

.theme-option.active {
    /* Bordo luminoso per l'opzione selezionata */
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(var(--accent-color-base), 0.5);
}

/* 
 * L'anteprima del tema ora è lo sfondo della card 
*/
.theme-preview {
    width: 100%;
    height: 10rem; /* Altezza aumentata per una migliore visuale */
    transition: transform 0.3s ease;
}

.theme-option:hover .theme-preview {
    transform: scale(1.1); /* Leggero zoom sull'anteprima all'hover */
}

/* 
 * Il nome del tema, posizionato sopra l'anteprima 
*/
.theme-option span {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    
    background: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    
    color: var(--text-primary);
    padding: 0.5rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    
    width: 100%;
    box-sizing: border-box;
}

/*
 * Anteprime dei temi (le regole dei gradienti rimangono le stesse)
*/
.theme-preview.default { background: linear-gradient(135deg, #111827, #374151); }
.theme-preview.theme-night-ops { background: linear-gradient(135deg, #0d1b2a, #1b263b); }
.theme-preview.theme-desert-storm { background: linear-gradient(135deg, #a68a64, #7f5539); }
.theme-preview.theme-cyberpunk { background: linear-gradient(135deg, #240046, #5a189a); }
.theme-preview.theme-jungle { background: linear-gradient(135deg, #2d3a33, #1e2a22); }
.theme-preview.theme-arctic { background: linear-gradient(135deg, #e0e0e0, #f5f5f5); }
.theme-preview.theme-volcanic { background: linear-gradient(135deg, #1a1a1a, #000000); }
.theme-preview.theme-oceanic { background: linear-gradient(135deg, #004d7a, #0077b6); }
.theme-preview.theme-outrun { background: linear-gradient(135deg, #2c003e, #ff007f); }
.theme-preview.theme-stalker { background: linear-gradient(135deg, #3d403a, #52554e); }
.theme-preview.theme-terminal { background: linear-gradient(135deg, #020, #010); }
.theme-preview.theme-crimson { background: linear-gradient(135deg, #4d0000, #1a0000); }
.theme-preview.theme-golden { background: linear-gradient(135deg, #382c0e, #1c1606); }
.theme-preview.theme-light { background: linear-gradient(135deg, #e9ecef, #f8f9fa); }





.profile-theme-wrapper {
    /* Il tema di default eredita le variabili globali */
}

/* --- Tema "Night Ops" (Blu Scuro) --- */
.profile-theme-wrapper.theme-night-ops {
    --profile-bg-gradient: linear-gradient(135deg, #0d1b2a, #1b263b);
    --profile-glass-bg: rgba(65, 90, 119, 0.2);
    --profile-glass-border: rgba(189, 212, 231, 0.2);
    --profile-accent-color: #778da9;
    --profile-text-primary: #e0e1dd;
    --profile-text-secondary: #adb5bd;
}

/* --- Tema "Desert Storm" (Sabbia/Marrone) --- */
.profile-theme-wrapper.theme-desert-storm {
    --profile-bg-gradient: linear-gradient(135deg, #a68a64, #7f5539);
    --profile-glass-bg: rgba(255, 253, 247, 0.1);
    --profile-glass-border: rgba(255, 253, 247, 0.2);
    --profile-accent-color: #e6ccb2;
    --profile-text-primary: #fdfcdc;
    --profile-text-secondary: #ddb892;
}

/* --- Tema "Cyberpunk" (Viola/Ciano) --- */
.profile-theme-wrapper.theme-cyberpunk {
    --profile-bg-gradient: linear-gradient(135deg, #240046, #5a189a);
    --profile-glass-bg: rgba(224, 191, 255, 0.1);
    --profile-glass-border: rgba(224, 191, 255, 0.2);
    --profile-accent-color: #3a86ff;
    --profile-text-primary: #f1f7ee;
    --profile-text-secondary: #c7c6c4;
}

/* Applichiamo le variabili ai componenti del profilo */
.profile-theme-wrapper {
    background: var(--profile-bg-gradient, var(--bg-primary)); /* Fallback al tema globale */
    padding: 2rem;
    margin: -2rem -1.5rem; /* Compensa il padding del container per un effetto a tutto schermo */
    border-radius: var(--border-radius);
}

.profile-theme-wrapper .glass-effect {
    background: var(--profile-glass-bg) !important;
    border-color: var(--profile-glass-border) !important;
}

.profile-theme-wrapper h1, .profile-theme-wrapper h2, .profile-theme-wrapper h3, .profile-theme-wrapper strong {
    color: var(--profile-text-primary, var(--text-primary)) !important;
}

.profile-theme-wrapper p, .profile-theme-wrapper .profile-visits, .profile-theme-wrapper .original-username {
    color: var(--profile-text-secondary, var(--text-secondary)) !important;
}

.profile-theme-wrapper .stat-number {
    color: var(--profile-accent-color, var(--accent-color)) !important;
}

.theme-option span {
    color: white;
}

/* ========================================================== */
/*          NUOVI TEMI AGGIUNTIVI PER PAGINA PROFILO          */
/* ========================================================== */

/* --- Tema "Jungle Warfare" (Verde Militare) --- */
.profile-theme-wrapper.theme-jungle {
    --profile-bg-gradient: linear-gradient(135deg, #2d3a33, #1e2a22);
    --profile-glass-bg: rgba(76, 175, 80, 0.1);
    --profile-glass-border: rgba(165, 214, 167, 0.2);
    --profile-accent-color: #81c784;
    --profile-text-primary: #e8f5e9;
    --profile-text-secondary: #c8e6c9;
}

/* --- Tema "Arctic Ops" (Bianco/Ghiaccio) --- */
.profile-theme-wrapper.theme-arctic {
    --profile-bg-gradient: linear-gradient(135deg, #e0e0e0, #f5f5f5);
    --profile-glass-bg: rgba(0, 0, 0, 0.05);
    --profile-glass-border: rgba(0, 0, 0, 0.2);
    --profile-accent-color: #0d47a1;
    --profile-text-primary: #212121;
    --profile-text-secondary: #424242;
}

/* --- Tema "Volcanic Ash" (Rosso/Nero) --- */
.profile-theme-wrapper.theme-volcanic {
    --profile-bg-gradient: linear-gradient(135deg, #1a1a1a, #000000);
    --profile-glass-bg: rgba(229, 57, 53, 0.1);
    --profile-glass-border: rgba(239, 83, 80, 0.25);
    --profile-accent-color: #ef5350;
    --profile-text-primary: #ffebee;
    --profile-text-secondary: #ffcdd2;
}

/* --- Tema "Oceanic Deep" (Blu Profondo/Acqua) --- */
.profile-theme-wrapper.theme-oceanic {
    --profile-bg-gradient: linear-gradient(135deg, #004d7a, #0077b6);
    --profile-glass-bg: rgba(173, 216, 230, 0.1);
    --profile-glass-border: rgba(173, 216, 230, 0.2);
    --profile-accent-color: #90e0ef;
    --profile-text-primary: #caf0f8;
    --profile-text-secondary: #ade8f4;
}

/* --- Tema "Outrun Sunset" (Retrowave/Synthwave) --- */
.profile-theme-wrapper.theme-outrun {
    --profile-bg-gradient: linear-gradient(135deg, #2c003e, #ff007f);
    --profile-glass-bg: rgba(255, 110, 199, 0.1);
    --profile-glass-border: rgba(255, 110, 199, 0.2);
    --profile-accent-color: #00f6ff;
    --profile-text-primary: #ffffff;
    --profile-text-secondary: #f0caff;
}

/* --- Tema "Stalker Anomaly" (Grigio/Verde post-apocalittico) --- */
.profile-theme-wrapper.theme-stalker {
    --profile-bg-gradient: linear-gradient(135deg, #3d403a, #52554e);
    --profile-glass-bg: rgba(100, 100, 100, 0.15);
    --profile-glass-border: rgba(150, 150, 150, 0.2);
    --profile-accent-color: #ffcc00; /* Giallo acceso per contrasto */
    --profile-text-primary: #dcdccc;
    --profile-text-secondary: #b8b8aa;
}

/* --- Tema "Terminal Green" (Hacker/Matrix) --- */
.profile-theme-wrapper.theme-terminal {
    --profile-bg-gradient: linear-gradient(135deg, #020, #010);
    --profile-glass-bg: rgba(0, 255, 71, 0.05);
    --profile-glass-border: rgba(0, 255, 71, 0.2);
    --profile-accent-color: #00ff47;
    --profile-text-primary: #00ff47;
    --profile-text-secondary: #00c237;
}

/* --- Tema "Crimson" (Rosso Elegante) --- */
.profile-theme-wrapper.theme-crimson {
    --profile-bg-gradient: linear-gradient(135deg, #4d0000, #1a0000);
    --profile-glass-bg: rgba(255, 255, 255, 0.08);
    --profile-glass-border: rgba(255, 255, 255, 0.15);
    --profile-accent-color: #e53935;
    --profile-text-primary: #ffeaeb;
    --profile-text-secondary: #ffcdd2;
}

/* --- Tema "Golden" (Oro/Lusso) --- */
.profile-theme-wrapper.theme-golden {
    --profile-bg-gradient: linear-gradient(135deg, #382c0e, #1c1606);
    --profile-glass-bg: rgba(255, 215, 0, 0.1);
    --profile-glass-border: rgba(255, 215, 0, 0.2);
    --profile-accent-color: #ffd700;
    --profile-text-primary: #fff8e1;
    --profile-text-secondary: #ffecb3;
}

/* --- Tema "Minimalist Light" (Chiaro e Pulito) --- */
.profile-theme-wrapper.theme-light {
    --profile-bg-gradient: linear-gradient(135deg, #e9ecef, #f8f9fa);
    --profile-glass-bg: rgba(255, 255, 255, 0.4);
    --profile-glass-border: rgba(0, 0, 0, 0.1);
    --profile-accent-color: #0077b6;
    --profile-text-primary: #212529;
    --profile-text-secondary: #495057;
}

/* Aggiungiamo anche le anteprime per questi nuovi temi */
.theme-preview.theme-jungle { background: linear-gradient(135deg, #2d3a33, #1e2a22); }
.theme-preview.theme-arctic { background: linear-gradient(135deg, #e0e0e0, #f5f5f5); }
.theme-preview.theme-volcanic { background: linear-gradient(135deg, #1a1a1a, #000000); }
.theme-preview.theme-oceanic { background: linear-gradient(135deg, #004d7a, #0077b6); }
.theme-preview.theme-outrun { background: linear-gradient(135deg, #2c003e, #ff007f); }
.theme-preview.theme-stalker { background: linear-gradient(135deg, #3d403a, #52554e); }
.theme-preview.theme-terminal { background: linear-gradient(135deg, #020, #010); }
.theme-preview.theme-crimson { background: linear-gradient(135deg, #4d0000, #1a0000); }
.theme-preview.theme-golden { background: linear-gradient(135deg, #382c0e, #1c1606); }
.theme-preview.theme-light { background: linear-gradient(135deg, #e9ecef, #f8f9fa); }

/* ========================================================== */
/*          NUOVI TEMI AGGIUNTIVI PER PAGINA PROFILO2         */
/* ========================================================== */

/* --- Tema "Hologram Terminal" --- */
/* Ispirato a interfacce futuristiche, con linee animate e testo "glitch" */
.profile-theme-wrapper.theme-hologram {
    --profile-bg-gradient: radial-gradient(circle at 50% 100%, rgba(13, 37, 56, 0.8), #020c13 80%);
    --profile-glass-bg: rgba(0, 191, 255, 0.05);
    --profile-glass-border: rgba(0, 191, 255, 0.3);
    --profile-accent-color: #00bfff; /* Deep Sky Blue */
    --profile-text-primary: #e0ffff; /* Light Cyan */
    --profile-text-secondary: #afeeee; /* Pale Turquoise */

    position: relative;
    overflow: hidden; /* Nasconde le linee che escono */
}

/* Linee animate che scorrono in background */
.profile-theme-wrapper.theme-hologram::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(0, 191, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 191, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: scanlines 20s linear infinite;
    z-index: 0;
}
@keyframes scanlines {
    from { background-position: 0 0; }
    to { background-position: 60px 0; }
}

/* Diamo ai contenuti una posizione relativa per stare sopra le linee */
.profile-theme-wrapper.theme-hologram > * {
    position: relative;
    z-index: 1;
}

/* Effetto "glitch" sul nome utente */
.profile-theme-wrapper.theme-hologram .profile-info h1 {
    animation: glitch 3s infinite steps(4);
}
@keyframes glitch {
  0% { text-shadow: 1px 0 0 #ff00c1, -1px 0 0 #00f6ff; }
  25% { text-shadow: -1px 0 0 #ff00c1, 1px 0 0 #00f6ff; }
  50% { text-shadow: 1px 0 0 #ff00c1, 1px 0 0 #00f6ff; }
  75% { text-shadow: -1px 0 0 #ff00c1, -1px 0 0 #00f6ff; }
  100% { text-shadow: 1px 0 0 #ff00c1, -1px 0 0 #00f6ff; }
}


/* --- Tema "Cosmic Nebula" --- */
/* Sfondo animato a nebulosa, elementi che "fluttuano" */
.profile-theme-wrapper.theme-nebula {
    --profile-bg-gradient: linear-gradient(315deg, #0f0c29, #302b63, #24243e);
    --profile-glass-bg: rgba(138, 43, 226, 0.1);
    --profile-glass-border: rgba(191, 178, 230, 0.25);
    --profile-accent-color: #9370db; /* Medium Purple */
    --profile-text-primary: #f0e6ff;
    --profile-text-secondary: #dcd6f7;
    background-size: 400% 400%;
    animation: gradientBG 20s ease infinite; /* Riusiamo l'animazione di sfondo */
}

/* Effetto di fluttuazione per le card */
.profile-theme-wrapper.theme-nebula .stat-card,
.profile-theme-wrapper.theme-nebula .encomium-card {
    animation: float 6s ease-in-out infinite;
}
/* Diamo un ritardo diverso a ogni card per un effetto più naturale */
.profile-theme-wrapper.theme-nebula .stat-card:nth-child(2) { animation-delay: -2s; }
.profile-theme-wrapper.theme-nebula .stat-card:nth-child(3) { animation-delay: -4s; }

@keyframes float {
	0% { transform: translatey(0px); }
	50% { transform: translatey(-10px); }
	100% { transform: translatey(0px); }
}


/* --- Tema "Damocles Protocol" --- */
/* Layout riorganizzato, stile pulito, da "dossier militare" */
.profile-theme-wrapper.theme-protocol {
    --profile-bg-gradient: linear-gradient(135deg, #2d3436, #000000);
    --profile-glass-bg: rgba(255, 255, 255, 0.03);
    --profile-glass-border: rgba(255, 255, 255, 0.1);
    --profile-accent-color: #ff3f3f; /* Rosso acceso per gli elementi importanti */
    --profile-text-primary: #dfe6e9;
    --profile-text-secondary: #b2bec3;
    font-family: 'Courier New', Courier, monospace; /* Font da terminale */
}

/* RIORGANIZZAZIONE LAYOUT */
.profile-theme-wrapper.theme-protocol .profile-header {
    flex-direction: row-reverse; /* Inverte l'avatar e le info */
    text-align: right;
}
.profile-theme-wrapper.theme-protocol .profile-meta {
    justify-content: flex-end; /* Allinea a destra i badge */
}
.profile-theme-wrapper.theme-protocol .profile-stats {
    border: 1px solid var(--profile-glass-border);
    padding: 1.5rem;
    margin-top: 2rem;
}
.profile-theme-wrapper.theme-protocol .stat-card {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}
.profile-theme-wrapper.theme-protocol .profile-events-list {
    margin-top: 2rem;
}


/* --- Tema "Aperture Science" (Ispirato a Portal) --- */
/* Stile ultra-pulito, bianco, con accenti arancioni e blu */
.profile-theme-wrapper.theme-aperture {
    --profile-bg-gradient: linear-gradient(135deg, #ffffff, #f0f0f0);
    --profile-glass-bg: rgba(255, 255, 255, 0.6);
    --profile-glass-border: rgba(0, 0, 0, 0.1);
    --profile-accent-color: #ff6f00; /* Arancione */
    --profile-text-primary: #000000;
    --profile-text-secondary: #333333;
    -webkit-backdrop-filter: none;
    backdrop-filter: none; /* Rimuoviamo il blur per un look più netto */
}
.profile-theme-wrapper.theme-aperture .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
}
/* Colore blu per alcuni elementi, come nel gioco */
.profile-theme-wrapper.theme-aperture .stat-card:nth-child(2) .stat-number {
    color: #0077c2 !important; /* Blu Portal */
}

/* Anteprime per la pagina di modifica */
.theme-preview.theme-hologram { background: radial-gradient(circle, #0d1b2a, #020c13); }
.theme-preview.theme-nebula { background: linear-gradient(315deg, #0f0c29, #302b63, #24243e); }
.theme-preview.theme-protocol { background: linear-gradient(135deg, #2d3436, #000000); }
.theme-preview.theme-aperture { background: linear-gradient(135deg, #ffffff, #f0f0f0); }

/* ========================================================== */
/*          STILI PER BADGE TEMI SPECIALI                     */
/* ========================================================== */

/* Posizionamento del badge sulla card del tema */
.theme-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    
    /* Effetto vetro per integrarsi */
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    
    z-index: 2; /* Deve stare sopra l'anteprima */
}

/* Colore per il tag "Speciale" o "Layout Unico" */
.theme-tag.tag-special {
    background: rgba(var(--accent-color-base), 0.5);
}

/* Colore e animazione per il tag "Animato" */
.theme-tag.tag-animated {
    /* Gradiente animato per un effetto "glow" */
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientBG 5s ease infinite; /* Riusiamo l'animazione di sfondo ma più veloce */
    border: none;
}

/* ========================================================== */
/*          12 NUOVI TEMI AVANZATI PER PAGINA PROFILO         */
/* ========================================================== */

/* --- Tema "Glacial Core" --- */
/* Un nucleo di ghiaccio pulsante, con frammenti animati */
@keyframes ice-shard {
  0% { transform: translateY(20px) rotate(0deg); opacity: 0; }
  50% { opacity: 0.1; }
  100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}
.profile-theme-wrapper.theme-glacial {
    --profile-bg-gradient: radial-gradient(ellipse at bottom, #003973, #001a33);
    --profile-glass-bg: rgba(173, 216, 230, 0.08);
    --profile-glass-border: rgba(173, 216, 230, 0.2);
    --profile-accent-color: #87ceeb;
    --profile-text-primary: #e0f7fa;
    --profile-text-secondary: #b2ebf2;
    overflow: hidden;
}
.profile-theme-wrapper.theme-glacial::before { /* Frammenti di ghiaccio */
    content: ''; width: 200%; height: 200%; position: absolute; top: 50%; left: 50%;
    background-image: url('data:image/svg+xml;utf8,<svg width="10" height="10" xmlns="http://www.w3.org/2000/svg"><path d="M5 0 L0 10 L10 10 Z" fill="%2387ceeb"/></svg>');
    background-size: 50px 50px;
    transform: translate(-50%, -50%);
    animation: ice-shard 25s linear infinite;
    opacity: 0;
}


/* === Tema "Blacksite" === */
/* Ispirato a documenti top-secret declassificati e sistemi militari */
/* Include glitch, flicker, scanlines, accenti pulsanti e font old-school */


/* Animazione flicker testo */
@keyframes text-flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Glitch verticale leggero */
@keyframes glitch {
  0% { transform: translateY(0); }
  20% { transform: translateY(-1px); }
  40% { transform: translateY(1px); }
  60% { transform: translateY(-0.5px); }
  80% { transform: translateY(0.5px); }
  100% { transform: translateY(0); }
}

/* Accento lampeggiante stile allerta */
@keyframes pulse-accent {
  0%, 100% { box-shadow: 0 0 0 0 var(--profile-accent-color); }
  50% { box-shadow: 0 0 15px 2px var(--profile-accent-color); }
}

/* Linee CRT animate */
@keyframes scanlines {
  0% { background-position: 0 0; }
  100% { background-position: 0 100%; }
}

/* Tema base */
.profile-theme-wrapper.theme-blacksite {
  --profile-bg-gradient: linear-gradient(135deg, #111, #000);
  --profile-glass-bg: rgba(255, 255, 255, 0.03);
  --profile-glass-border: rgba(255, 255, 255, 0.1);
  --profile-accent-color: #f44336;
  --profile-text-primary: #f5f5f5;
  --profile-text-secondary: #9e9e9e;

  font-family: 'Special Elite', monospace;
  position: relative;
  overflow: hidden;
}

/* Effetto CRT scanlines sovrapposte */
.profile-theme-wrapper.theme-blacksite::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.015),
    rgba(255, 255, 255, 0.015) 1px,
    transparent 1px,
    transparent 3px
  );
  animation: scanlines 3s linear infinite;
  z-index: 1;
}

/* Glitch e flicker su numeri e nomi */
.profile-theme-wrapper.theme-blacksite .stat-number,
.profile-theme-wrapper.theme-blacksite .original-username {
  animation: text-flicker 2s infinite, glitch 3s infinite;
  position: relative;
  z-index: 2;
}

/* Pulsanti, badge o elementi accentati con effetto pulse */
.profile-theme-wrapper.theme-blacksite .badge,
.profile-theme-wrapper.theme-blacksite .profile-actions button {
  animation: pulse-accent 2.5s infinite;
  background-color: var(--profile-accent-color);
  color: black;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  cursor: pointer;
}

/* Bordi effetto laser rosso */
.profile-theme-wrapper.theme-blacksite .profile-card,
.profile-theme-wrapper.theme-blacksite .stat-card {
  border: 1px solid var(--profile-accent-color);
  background-color: var(--profile-glass-bg);
  box-shadow: 0 0 8px rgba(244, 67, 54, 0.3);
  z-index: 2;
  position: relative;
}

/* Colori del testo */
.profile-theme-wrapper.theme-blacksite .profile-header,
.profile-theme-wrapper.theme-blacksite .profile-events-list {
  color: var(--profile-text-primary);
  z-index: 2;
}

/* Disattiva effetti dove serve (per evitare eccessi) */
.profile-theme-wrapper.theme-blacksite .profile-description {
  animation: none;
  font-style: italic;
  color: var(--profile-text-secondary);
}



/* === Tema "Aetherium" === */
/* Contrasto tra ombra profonda e luce dorata */
/* Layout invertito: statistiche a sinistra, info profilo ed eventi a destra */

@keyframes flowAetherium {
  to {
    background-position: 200% center;
  }
}

/* Colori e variabili principali */
.profile-theme-wrapper.theme-aetherium {
  --profile-bg-gradient: #0b0b0b; /* Sfondo molto scuro */
  --profile-glass-bg: rgba(255, 215, 100, 0.06); /* Vetro dorato tenue */
  --profile-glass-border: rgba(255, 215, 100, 0.18);
  --profile-accent-color: #ffd764; /* Oro caldo */
  --profile-text-primary: #fff8e1; /* Bianco avorio */
  --profile-text-secondary: #f0e6c0; /* Dorato pallido */
}

/* Layout invertito nel profilo */
.profile-theme-wrapper.theme-aetherium .profile-header {
  flex-direction: row-reverse; /* Sposta avatar a destra */
  text-align: right;
}

/* Posizionamento: statistiche a sinistra */
.profile-theme-wrapper.theme-aetherium .profile-stats {
  order: 1;
  flex: 1;
}

/* Profilo ed eventi a destra */
.profile-theme-wrapper.theme-aetherium .profile-header,
.profile-theme-wrapper.theme-aetherium .profile-events-list {
  order: 2;
  flex: 2;
}

/* Stile delle card statistiche con animazione */
.profile-theme-wrapper.theme-aetherium .stat-card {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 215, 100, 0.2),
    transparent
  ) !important;
  background-size: 200% auto;
  animation: flowAetherium 3s linear infinite;
}



/* --- Tema "Solar Flare" --- */
/* Un sole ardente, con un'animazione di bagliore */
@keyframes solar-flare {
  0%, 100% { box-shadow: 0 0 60px 20px rgba(255, 100, 0, 0.3); }
  50% { box-shadow: 0 0 80px 30px rgba(255, 150, 0, 0.5); }
}
.profile-theme-wrapper.theme-solarflare {
    --profile-bg-gradient: radial-gradient(ellipse at center, #4d2c00, #000);
    --profile-glass-bg: rgba(255, 165, 0, 0.1);
    --profile-glass-border: rgba(255, 165, 0, 0.2);
    --profile-accent-color: #ffa500;
    --profile-text-primary: #fff3e0;
    --profile-text-secondary: #ffe0b2;
}
.profile-theme-wrapper.theme-solarflare .profile-avatar {
    border-radius: 50%;
    animation: solar-flare 5s infinite ease-in-out;
}


/* --- Tema "Woodland Ghillie" --- */
/* Mimetico, con pattern di sfondo e testo "nascosto" */
.profile-theme-wrapper.theme-ghillie {
    --profile-bg-gradient: #1c251f;
    --profile-glass-bg: rgba(60, 99, 60, 0.15);
    --profile-glass-border: rgba(140, 178, 141, 0.2);
    --profile-accent-color: #8cb28d;
    --profile-text-primary: #d4e3d5;
    --profile-text-secondary: #a4c4a5;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 40" width="80" height="40"><path fill="%232e4033" d="M0 40h40L0 0v40zM80 0h-40L80 40V0z"/></svg>');
    background-size: 20px;
}
.profile-theme-wrapper.theme-ghillie .encomium-card {
    opacity: 0.8;
}


/* --- Tema "Retro Arcade" --- */
/* Stile cabinato arcade, con animazione scanlines e font pixelato */
@keyframes scanlines-vertical {
    from { background-position: 0 0; }
    to { background-position: 0 30px; }
}
.profile-theme-wrapper.theme-arcade {
    --profile-bg-gradient: #000;
    --profile-glass-bg: rgba(255, 255, 255, 0.05);
    --profile-glass-border: rgba(80, 80, 80, 0.5);
    --profile-accent-color: #ff00ff; /* Magenta */
    --profile-text-primary: #00ffff; /* Ciano */
    --profile-text-secondary: #ffff00; /* Giallo */
    font-family: 'Press Start 2P', cursive; /* Aggiungi da Google Fonts */
    position: relative;
}
.profile-theme-wrapper.theme-arcade::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(0,0,0,0.3) 50%, transparent 50%);
    background-size: 100% 4px;
    opacity: 0.3;
    pointer-events: none;
    animation: scanlines-vertical 0.2s linear infinite;
}


/* ... E ALTRI 6 TEMI ... */
/* Aggiungerò le anteprime alla fine */

/* --- Tema "Bloodborne" --- */
.profile-theme-wrapper.theme-bloodborne {
    --profile-bg-gradient: linear-gradient(135deg, #1e2124, #282c30);
    --profile-glass-bg: rgba(100, 100, 100, 0.1);
    --profile-glass-border: rgba(150, 150, 150, 0.2);
    --profile-accent-color: #b92a2a; /* Rosso sangue */
    --profile-text-primary: #c5c8c6;
    --profile-text-secondary: #969896;
    font-family: 'Goudy Bookletter 1911', serif; /* Aggiungi da Google Fonts */
}

/* --- Tema "Ghost Recon Elite HUD" --- */
.profile-theme-wrapper.theme-ghostrecon {
    /* Variabili base */
    --profile-bg-gradient: radial-gradient(circle at 20% 30%, #0b1321 0%, #09101a 35%, #05090f 100%);
    --profile-glass-bg: rgba(10, 15, 25, 0.55);
    --profile-glass-border: rgba(77, 255, 138, 0.25);
    --profile-accent-color: #4ade80; /* Verde neon HUD */
    --profile-text-primary: #d8f7ff;
    --profile-text-secondary: #7ca3b8;

    background: var(--profile-bg-gradient);
    color: var(--profile-text-primary);
    font-family: 'Orbitron', 'Segoe UI', sans-serif;
    position: relative;
    overflow: hidden;
}

/* Effetto griglia radar sullo sfondo */
.profile-theme-wrapper.theme-ghostrecon::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(77, 255, 138, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(77, 255, 138, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: gridMove 20s linear infinite;
    pointer-events: none;
}
@keyframes gridMove {
    0% { background-position: 0 0, 0 0; }
    100% { background-position: 40px 40px, 40px 40px; }
}




/* --- Tema "Deep Space" --- */
.profile-theme-wrapper.theme-deepspace {
    --profile-bg-gradient: #00000c;
    --profile-glass-bg: rgba(255, 255, 255, 0.05);
    --profile-glass-border: rgba(255, 255, 255, 0.1);
    --profile-accent-color: #fff;
    --profile-text-primary: #fff;
    --profile-text-secondary: #aaa;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="10" cy="10" r="1" fill="white" opacity="0.5"/><circle cx="50" cy="30" r="0.5" fill="white" opacity="0.3"/><circle cx="80" cy="70" r="1.5" fill="white" opacity="0.6"/><circle cx="30" cy="90" r="1" fill="white" opacity="0.4"/></svg>');
    animation: space-travel 150s linear infinite;
}
@keyframes space-travel { from { background-position: 0 0; } to { background-position: -2000px 1000px; } }

/* --- Tema "Biohazard" --- */
.profile-theme-wrapper.theme-biohazard {
    --profile-bg-gradient: linear-gradient(135deg, #2b3d39, #0f1815);
    --profile-glass-bg: rgba(255, 235, 59, 0.1);
    --profile-glass-border: rgba(255, 235, 59, 0.2);
    --profile-accent-color: #ffeb3b; /* Giallo acceso */
    --profile-text-primary: #f1f8e9;
    --profile-text-secondary: #dcedc8;
}

/* --- Tema "Royal" --- */
.profile-theme-wrapper.theme-royal {
    --profile-bg-gradient: linear-gradient(135deg, #4a148c, #311b92);
    --profile-glass-bg: rgba(255, 215, 0, 0.1);
    --profile-glass-border: rgba(255, 215, 0, 0.2);
    --profile-accent-color: #ffd700; /* Oro */
    --profile-text-primary: #ede7f6;
    --profile-text-secondary: #d1c4e9;
}

/* === Tema "Sunset" === */
/* Ispirato al tramonto tropicale: calore, luce dorata, vibrazioni vaporwave */
/* Animazioni glow, gradienti dinamici, transizioni fluide */

@keyframes gradientSunsetFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes textGlowPulse {
  0%, 100% { text-shadow: 0 0 4px #fff5f0, 0 0 10px #ff80bf; }
  50% { text-shadow: 0 0 6px #ffd2b3, 0 0 14px #ff4fa1; }
}

@keyframes cardGlow {
  0%, 100% { box-shadow: 0 0 6px rgba(255, 128, 192, 0.3); }
  50% { box-shadow: 0 0 16px rgba(255, 128, 192, 0.5); }
}

/* Tema base */
.profile-theme-wrapper.theme-sunset {
  --profile-bg-gradient: linear-gradient(135deg, #ff8c00, #ff0080);
  --profile-glass-bg: rgba(255, 255, 255, 0.1);
  --profile-glass-border: rgba(255, 255, 255, 0.2);
  --profile-accent-color: #ffffff;
  --profile-text-primary: #ffffff;
  --profile-text-secondary: #ffebf5;

  background: var(--profile-bg-gradient);
  background-size: 400% 400%;
  animation: gradientSunsetFlow 15s ease infinite;
  font-family: 'Segoe UI', 'Roboto', sans-serif;
  color: var(--profile-text-primary);
}

/* Glow animato sui titoli/statistiche */
.profile-theme-wrapper.theme-sunset .stat-number,
.profile-theme-wrapper.theme-sunset .original-username,
.profile-theme-wrapper.theme-sunset .profile-name {
  animation: textGlowPulse 2.5s ease-in-out infinite;
}

/* Card animate con bagliore */
.profile-theme-wrapper.theme-sunset .stat-card,
.profile-theme-wrapper.theme-sunset .profile-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.08));
  border: 1px solid var(--profile-glass-border);
  backdrop-filter: blur(6px);
  border-radius: 8px;
  animation: cardGlow 4s ease-in-out infinite;
  transition: transform 0.3s ease;
}

.profile-theme-wrapper.theme-sunset .stat-card:hover,
.profile-theme-wrapper.theme-sunset .profile-card:hover {
  transform: scale(1.02);
}

/* Pulsanti o elementi accentati */
.profile-theme-wrapper.theme-sunset .profile-actions button,
.profile-theme-wrapper.theme-sunset .badge {
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--profile-text-primary);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  padding: 6px 12px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.profile-theme-wrapper.theme-sunset .profile-actions button:hover,
.profile-theme-wrapper.theme-sunset .badge:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

/* Extra lucentezza sui titoli eventi */
.profile-theme-wrapper.theme-sunset .event-title {
  color: var(--profile-accent-color);
  text-shadow: 0 0 4px #fff0e0, 0 0 12px #ffaadd;
  transition: text-shadow 0.3s ease;
}

/* Descrizione profilo opacizzata e morbida */
.profile-theme-wrapper.theme-sunset .profile-description {
  color: var(--profile-text-secondary);
  font-style: italic;
  opacity: 0.9;
}



/* === ANTEPRIME PER LA PAGINA DI MODIFICA === */
.theme-preview.theme-glacial { background: radial-gradient(ellipse at bottom, #003973, #001a33); }
.theme-preview.theme-blacksite { background: linear-gradient(135deg, #212121, #000); }
.theme-preview.theme-aetherium { background: rgba(255, 215, 100, 0.06) }
.theme-preview.theme-solarflare { background: radial-gradient(ellipse at center, #4d2c00, #000); }
.theme-preview.theme-ghillie { background-color: #1c251f; background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 40" width="80" height="40"><path fill="%232e4033" d="M0 40h40L0 0v40zM80 0h-40L80 40V0z"/></svg>'); background-size: 10px; }
.theme-preview.theme-arcade { background: #000; color: #00ffff !important; }
.theme-preview.theme-bloodborne { background: linear-gradient(135deg, #1e2124, #282c30); }
.theme-preview.theme-ghostrecon { background: linear-gradient(135deg, #0f172a, #1e293b); }
.theme-preview.theme-deepspace { background: #00000c; }
.theme-preview.theme-biohazard { background: linear-gradient(135deg, #2b3d39, #0f1815); }
.theme-preview.theme-royal { background: linear-gradient(135deg, #4a148c, #311b92); }
.theme-preview.theme-sunset { background: linear-gradient(135deg, #ff8c00, #ff0080); }

/* ========================================================== */
/*          5 NUOVI TEMI ANIMATI "ARTISTIC"                   */
/* ========================================================== */

/* ===== THEME: AURORA ===== */
.profile-theme-wrapper.theme-aurora {
    --profile-accent-color: #7ef9ff; /* Azzurro ghiaccio */
    background: radial-gradient(circle at top, rgba(10, 25, 47, 0.9), rgba(2, 10, 20, 0.95)),
                url('https://cdn.compagniadamocles.it/img/ds/aurora-boreale.jpg') center/cover no-repeat;
    animation: aurora-move 20s ease-in-out infinite alternate;
    color: #e0f7ff;
}

/* Animazione aurora */
@keyframes aurora-move {
    0% { background-position: center top; }
    50% { background-position: center 20%; }
    100% { background-position: center bottom; }
}

/* HEADER */
.profile-theme-wrapper.theme-aurora .profile-header {

}

.profile-theme-wrapper.theme-aurora .profile-avatar {
    border: 3px solid rgba(126, 249, 255, 0.8);
    box-shadow: 0 0 20px rgba(126, 249, 255, 0.7);
    border-radius: 50%;
}



.profile-theme-wrapper.theme-aurora .user-prefix-header {
    color: #a0ffd6;
}

.profile-theme-wrapper.theme-aurora .original-username {
    opacity: 0.8;
}

/* BADGES */
.profile-theme-wrapper.theme-aurora .profile-badges .badge {
    background: rgba(0,255,170,0.2);
    border: 1px solid rgba(0,255,170,0.4);
    box-shadow: 0 0 8px rgba(0,255,170,0.3);
}

.profile-theme-wrapper.theme-aurora .profile-visits {
    color: #9dfcff;
}

/* STATS */
.profile-theme-wrapper.theme-aurora .stat-card {
    background: linear-gradient(160deg, rgba(0,50,80,0.5), rgba(0,30,50,0.6));
    border: 1px solid rgba(126,249,255,0.2);
    backdrop-filter: blur(8px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.profile-theme-wrapper.theme-aurora .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 15px rgba(126, 249, 255, 0.5);
}

.profile-theme-wrapper.theme-aurora .stat-card h3 {
    color: #a0ffd6;
}

.profile-theme-wrapper.theme-aurora .stat-number {
    color: #7ef9ff;
    text-shadow: 0 0 5px #00ffaa;
}

/* ENCOMI */
.profile-theme-wrapper.theme-aurora .encomium-card {
    background: rgba(0, 40, 60, 0.6);
    border: 1px solid rgba(126,249,255,0.2);
    box-shadow: inset 0 0 10px rgba(0,255,200,0.2);
}
.profile-theme-wrapper.theme-aurora .encomium-icon {
    filter: drop-shadow(0 0 5px #7ef9ff);
}
.profile-theme-wrapper.theme-aurora .encomium-name {
    color: #9dfcff;
}
.profile-theme-wrapper.theme-aurora .encomium-count {
    color: #7ef9ff;
}

/* EVENTI */
.profile-theme-wrapper.theme-aurora .profile-events-table thead {
    background: rgba(0, 80, 120, 0.4);
}
.profile-theme-wrapper.theme-aurora .profile-events-table tbody tr:hover {
    background: rgba(0,255,200,0.05);
}
.profile-theme-wrapper.theme-aurora .status-badge-table {
    background: rgba(0,255,170,0.15);
    border: 1px solid rgba(0,255,170,0.3);
}

/* Effetto "luce danzante" sopra tutto */




/* --- 2. Tema "Rainy Night" --- */
/* Simula la pioggia che cade con un'animazione di gradiente */
@keyframes rain {
  0% { background-position: 0% 0%; }
  100% { background-position: 20% 100%; }
}
.profile-theme-wrapper.theme-rain {
    --profile-bg-gradient: #161b22;
    --profile-glass-bg: rgba(139, 92, 246, 0.1);
    --profile-glass-border: rgba(139, 92, 246, 0.25);
    --profile-accent-color: #8b5cf6; /* Viola */
    --profile-text-primary: #e5e7eb;
    --profile-text-secondary: #9ca3af;
    overflow: hidden;
    position: relative;
}
.profile-theme-wrapper.theme-rain::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: linear-gradient(160deg, rgba(139, 92, 246, 0.2) 2px, transparent 2px);
    background-size: 8px 80px;
    animation: rain 0.5s linear infinite;
    pointer-events: none;
    z-index: 0;
}
.profile-theme-wrapper.theme-rain > * { position: relative; z-index: 1; }


/* --- 3. Tema "Circuit Board" --- */
/* Un circuito stampato con impulsi di energia che lo percorrono */
@keyframes pulse-circuit {
  from { box-shadow: 0 0 0 0 rgba(0, 255, 170, 0.4); }
  to { box-shadow: 0 0 0 15px rgba(0, 255, 170, 0); }
}
.profile-theme-wrapper.theme-circuit {
    --profile-bg-gradient: #0a192f;
    --profile-glass-bg: rgba(100, 255, 218, 0.05);
    --profile-glass-border: rgba(100, 255, 218, 0.2);
    --profile-accent-color: #64ffda; /* Ciano-verde */
    --profile-text-primary: #ccd6f6;
    --profile-text-secondary: #8892b0;
    background-image: 
        linear-gradient(rgba(100, 255, 218, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(100, 255, 218, 0.1) 1px, transparent 1px),
        linear-gradient(rgba(100, 255, 218, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(100, 255, 218, 0.05) 1px, transparent 1px);
    background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
    background-position: -1px -1px, -1px -1px, -1px -1px, -1px -1px;
}
.profile-theme-wrapper.theme-circuit .profile-avatar {
    border: 3px solid var(--profile-accent-color);
    animation: pulse-circuit 1.5s infinite;
}


/* --- 4. Tema "War Map" --- */
/* Mappa topografica con cerchi sonar animati */
@keyframes sonar-ping {
  0% { transform: scale(0); opacity: 0.8; }
  90% { opacity: 0.1; }
  100% { transform: scale(1); opacity: 0; }
}
.profile-theme-wrapper.theme-warmap {
    --profile-bg-gradient: #2d332a;
    --profile-glass-bg: rgba(255, 248, 225, 0.05);
    --profile-glass-border: rgba(255, 248, 225, 0.15);
    --profile-accent-color: #f5f5dc; /* Beige */
    --profile-text-primary: #f5f5dc;
    --profile-text-secondary: #cdc7a5;
    background-image: 
        radial-gradient(circle at 1px 1px, rgba(245,245,220, 0.1) 1px, transparent 0), 
        radial-gradient(circle at 10px 10px, rgba(245,245,220, 0.05) 1px, transparent 0);
    background-size: 20px 20px;
    position: relative;
    overflow: hidden;
}
.profile-theme-wrapper.theme-warmap::before {
    content: '';
    position: absolute;
    width: 200px; height: 200px;
    border: 2px solid var(--profile-accent-color);
    border-radius: 50%;
    top: 20%; left: 30%;
    animation: sonar-ping 4s infinite ease-out;
}
.profile-theme-wrapper.theme-warmap::after {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    border: 2px solid var(--profile-accent-color);
    border-radius: 50%;
    bottom: 10%; right: 15%;
    animation: sonar-ping 4s infinite ease-out;
    animation-delay: -2s;
}
.profile-theme-wrapper.theme-warmap > * { position: relative; z-index: 1; }


/* --- 5. Tema "The Void" --- */
/* Sfondo nero profondo con particelle animate che si muovono lentamente */
@keyframes void-drift {
  from { transform: translateY(0); }
  to { transform: translateY(-1000px); }
}
.profile-theme-wrapper.theme-void {
    --profile-bg-gradient: #000;
    --profile-glass-bg: rgba(255, 255, 255, 0.03);
    --profile-glass-border: rgba(255, 255, 255, 0.1);
    --profile-accent-color: #ffffff;
    --profile-text-primary: #ffffff;
    --profile-text-secondary: #bbbbbb;
    position: relative;
    overflow: hidden;
}
.void-particles {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 2000px; /* Altezza doppia per il loop */
    background-image: 
        radial-gradient(1px 1px at 20% 30%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 50% 70%, white, transparent),
        radial-gradient(1px 1px at 90% 90%, white, transparent),
        radial-gradient(1px 1px at 10% 80%, white, transparent);
    animation: void-drift 120s linear infinite;
}
.profile-theme-wrapper.theme-void > * { position: relative; z-index: 1; }


/* === ANTEPRIME PER LA PAGINA DI MODIFICA === */
.theme-preview.theme-aurora { background: radial-gradient(circle at top, rgba(10, 25, 47, 0.9), rgba(2, 10, 20, 0.95)),
                url('https://cdn.compagniadamocles.it/img/ds/aurora-boreale.jpg') center/cover no-repeat; }
.theme-preview.theme-rain { background: #161b22; }
.theme-preview.theme-circuit { background: #0a192f; }
.theme-preview.theme-warmap { background: #2d332a; }
.theme-preview.theme-void { background: #000; }

.notification-bell { position: relative; }
.notification-count { position: absolute; top: -5px; right: -5px; background: red; ... }
.notification-dropdown { display: none; position: absolute; top: 120%; right: 0; width: 350px; ... }
.notification-dropdown.open { display: block; }
/* ========================================================== */
/*          STILI PER DROPDOWN NOTIFICHE                      */
/* ========================================================== */

/* --- Contenitore della Campanella --- */
.notification-bell {
    position: relative;
    display: flex;
    align-items: center;
}
.notification-bell > a {
    padding: 0.5rem; /* Aumenta l'area cliccabile */
}
.notification-bell svg {
    width: 24px;
    height: 24px;
    stroke: var(--text-primary);
}

/* --- Badge Contatore Notifiche --- */
.notification-count {
    position: absolute;
    top: 0px;
    right: 0px;
    background-color: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-secondary); /* Crea un contorno pulito */
    box-shadow: 0 0 10px rgba(var(--danger-color-base), 0.5);
}

/* --- Contenitore Dropdown --- */
.notification-dropdown {
    display: none; /* Nascosto di default */
    position: absolute;
    top: calc(100% + 10px); /* Posizionato sotto la campanella con un po' di spazio */
    right: 0;
    width: 380px;
    max-height: 450px;
    overflow-y: auto;
    z-index: 1001;

    /* Stile Liquid Glass */
    background: #242424;
    -webkit-backdrop-filter: blur(15px) !important;
    backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37) !important;
    border-radius: var(--border-radius) !important;
}
.notification-dropdown.open {
    display: block; /* Mostra il dropdown quando ha la classe 'open' */
}

/* --- Header del Dropdown --- */
.notification-header {
    padding: 0.75rem 1rem;
    font-weight: 600;

}

/* --- Singolo Elemento Notifica --- */
.notification-item {
    display: block;
    padding: 1rem;

    text-decoration: none;
    transition: background-color 0.2s;
}
.notification-item:last-child {
    border-bottom: none;
}
.notification-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Stile per le notifiche non lette */
.notification-item.unread {
    background-color: rgba(var(--accent-color-base), 0.1);
}
.notification-item.unread:hover {
    background-color: rgba(var(--accent-color-base), 0.2);
}

.notification-item p {
    margin: 0 0 0.25rem 0;
    color: var(--text-primary) !important;
    font-size: 0.9rem;
}
.notification-item small {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* --- Footer del Dropdown --- */
.notification-footer {
    padding: 0.75rem 1rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0,0,0,0.2);


}
.notification-footer a {
    font-weight: 600;
}

/* Spinner di caricamento */
.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Stile per la pagina /notifications/all */
.notification-list-page .notification-item {
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
/* ========================================================== */
/*          STILI GENERATORE DI BRIEFING AVANZATO             */
/* ========================================================== */

/* --- Pagina Lista Briefing --- */
.briefing-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 2rem;
}
.briefing-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem !important;
}
.briefing-card h3 { margin: 0; }
.briefing-card p { margin: 0; color: var(--text-secondary) !important; }
.briefing-actions { display: flex; gap: 0.5rem; }


/* --- Pagina Editor Briefing --- */
.briefing-editor-page #editor {
    height: 400px;
    background: #fff;
    color: #000;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}
.briefing-editor-page .ql-toolbar {
    background: #f0f0f0;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}
.editor-controls {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    align-items: center;
}
.editor-controls input, .editor-controls select {
    flex-grow: 1;
}


/* --- Modale Visualizzazione Briefing --- */
.briefing-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    
    background-color: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.briefing-content {
    width: 90%;
    max-width: 900px;
    height: 85vh;
    border-radius: var(--border-radius);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.briefing-content .close-btn {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 2rem;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    z-index: 10;
}

.briefing-content h1 {
    padding: 1rem 2rem;
    margin: 0;
    font-size: 1.5rem;
}
.briefing-content .ql-editor {
    height: 100%; /* Occupa tutta l'altezza data da .ql-snow */
    overflow-y: auto; /* MOSTRA LA SCROLLBAR VERTICALE SOLO QUANDO SERVE */
    padding: 0 2rem 2rem 2rem;
}

.briefing-content .ql-snow {
    border: none !important;
    flex-grow: 1; /* Fa espandere il contenitore Quill */
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Aggiunto per sicurezza */
}
.briefing-content .ql-snow { border: none !important; }

/* Temi per il Briefing */
.briefing-content.theme-dark { background: #1a1a1a; color: #f0f0f0; }
.briefing-content.theme-dark h1 { border-bottom: 1px solid #444; }
.briefing-content.theme-light { background: #ffffff; color: #212121; }
.briefing-content.theme-light h1 { border-bottom: 1px solid #ddd; }
.briefing-content.theme-blue { background: #0a192f; color: #ccd6f6; }
.briefing-content.theme-blue h1 { border-bottom: 1px solid #64ffda; color: #64ffda; }

.editor-metadata { padding: 1.5rem !important; display: flex; gap: 1.5rem; flex-wrap: wrap; }
.editor-metadata .form-group { flex: 1; min-width: 250px; }
.editor-metadata label { display: block; margin-bottom: 0.5rem; }
.editor-metadata input, .editor-metadata select { width: 100%; }

#editor-container .ql-editor { font-size: 1rem; line-height: 1.6; }

/* in public/css/style.css */

/* Stile per i "pulsanti" generati da Quill nel briefing */
.ql-editor a[style*="background-color"] {
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    display: inline-block;
    margin: 0.25rem 0;
    transition: transform 0.2s;
}
.ql-editor a[style*="background-color"]:hover {
    transform: scale(1.05);
}
/* ========================================================== */
/*          STILI SEZIONE ESPORTA EVENTO                      */
/* ========================================================== */

.export-container {
    padding: 1.5rem !important;
    margin: 2rem 0;
}

.export-container h3 {
    margin-top: 0;
}

.export-container p {
    color: var(--text-secondary) !important;
    max-width: 70ch;
    margin-bottom: 1.5rem;
}

.export-form {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.export-form select {
    flex-grow: 1; /* Occupa lo spazio disponibile */
    min-width: 300px;
    /* Eredita lo stile degli altri select */
}









































/*
===============================================================
--- 2. STILI SPECIFICI PER L'HEADER ---
===============================================================
*/


:root {

    --bg-surface-glass: rgba(28, 28, 30, 0.75);
    --bg-dropdown: #1C1C1E;
    --text-primary: #F5F5F7;
    --text-secondary:#8A8A8E;
    --border-color: rgba(255, 255, 255, 0.1);
    --primary-accent: #007AFF;
    --hover-bg: #3a4049;
}


/* --- 2. STILI DELL'HEADER E DESKTOP --- */
.floating-header { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); width: calc(100% - 32px); max-width: 1024px; z-index: 1000; }
.navbar { max-height: 64px; display: flex; justify-content: space-between; align-items: center; padding: 0.8rem 1.5rem; background-color: var(--bg-surface-glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-radius: 999px; border: 1px solid var(--border-color); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2); }
.logo a { font-size: 0.9rem; font-weight: bold; color: var(--text-primary); flex-shrink: 0; text-decoration: none; }
.nav-menu { list-style: none; display: flex; gap: 1.5rem; margin: 0; padding: 0; }
.nav-item { position: relative; }
.nav-link { text-decoration: none !important; color: var(--text-secondary); font-weight: 500; display: flex; align-items: center; gap: 0.3rem; padding: 8px 16px; transition: color 0.2s ease, background-color 0.2s ease; border-radius: 12px; }
.nav-link:hover, .nav-item:hover > .nav-link { color: var(--text-primary); }
.nav-link i.bi-chevron-down { font-size: 12px; transition: transform 0.2s ease; }
.nav-item:hover > .nav-link i.bi-chevron-down { transform: rotate(180deg); }
.admin-link { color: var(--primary-accent); font-weight: 600; }
.mega-dropdown { display: block; position: absolute; top: calc(100% + 12px); opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s; background-color: var(--bg-dropdown); border-radius: 16px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25); padding: 1.5rem; width: max-content; border: 1px solid var(--border-color); }
.nav-item:hover > .mega-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.mega-dropdown.centered { left: 50%; transform: translateX(-50%) translateY(10px); }
.nav-item:hover > .mega-dropdown.centered { transform: translateX(-50%) translateY(0); }
.mega-dropdown.right-aligned { left: auto; right: 0; transform: translateY(10px); }
.nav-item:hover > .mega-dropdown.right-aligned { transform: translateY(0); }
.dropdown-content { display: flex; gap: 2.5rem; }
.dropdown-section h3 { font-size: 0.85rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin: 0 0 1rem; font-weight: 600; }
.dropdown-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.dropdown-links a { display: flex; align-items: center; gap: 0.8rem; padding: 0.7rem 1rem; border-radius: 12px; text-decoration: none; color: var(--text-primary); min-width: 220px; font-weight: 500; transition: background-color 0.2s ease; }
.nav-link:hover { background-color: rgba(255,255,255,0.05); }
.dropdown-links a i { font-size: 1.1rem; color: var(--text-secondary); }
.dropdownlinks > a { border-radius: 12px; }
.dropdown-section > ul > li:hover { background-color: rgba(255,255,255,0.05);}
.dropdown-section > ul > li { border-radius: 12px; }
.admin-link:hover { color: var(--primary-accent) !important; font-weight: 600;  }
.nav-actions { display: flex; align-items: center; gap: 0.75rem; }
.logged-in-state { display: flex; align-items: center; gap: 1.2rem; }
.notification-bell { color: var(--text-secondary); cursor: pointer; position: relative; }
.notification-bell .badge { position: absolute; top: -2px; right: -4px; width: 8px; height: 8px; background-color: var(--notification-badge); border-radius: 50%; border: 2px solid var(--bg-dropdown); }

/* --- FIX PER OVERFLOW NOME UTENTE --- */


/* --- 3. STILI DEL FOOTER --- */
.site-footer { background-color: var(--bg-primary); padding: 4rem 2rem 2rem 2rem; border-top: 1px solid var(--border-color); }
.footer-container { max-width: 1024px; margin: 0 auto; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; padding-bottom: 2rem; margin-bottom: 2rem; border-bottom: 1px solid var(--border-color); }
.footer-brand { max-width: 250px; }
.footer-brand .logo { margin-bottom: 1rem; }
.footer-brand p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.5; }
.footer-links-wrapper { display: flex; flex-wrap: wrap; gap: 10rem; }
@media (max-width: 768px) {
    .footer-links-wrapper {
        gap: 3rem;
    }
}
.footer-column h4 { color: var(--text-primary); font-weight: 600; margin-bottom: 1rem; }
.footer-column ul { list-style: none; padding: 0; margin: 0; }
.footer-column li { margin-bottom: 0.75rem; }
.footer-column a { text-decoration: none; color: var(--text-secondary); transition: color 0.2s ease; }
.footer-column a:hover { color: var(--text-primary); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.copyright { font-size: 0.8rem; color: var(--text-secondary); }
.social-links { display: flex; gap: 1rem; }
.social-links a { color: var(--text-secondary); font-size: 1.2rem; transition: color 0.2s ease; }
.social-links a:hover { color: var(--text-primary); }

/* --- 4. STILI PER IL MENU MOBILE E RESPONSIVE --- */
.mobile-menu-toggle { display: none; }
.mobile-menu.open { display: flex; flex-direction: column; align-items: center; justify-content: center; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--bg-surface-glass); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); z-index: 1001; opacity: 1; }
.mobile-nav { list-style: none; padding: 0; margin: 0; text-align: center; width: 80%; }
.mobile-nav-item .mobile-nav-link, .mobile-nav-item .mobile-accordion-toggle { display: flex; justify-content: center; align-items: center; gap: 0.5rem; padding: 1rem 0; text-decoration: none; color: var(--text-primary); font-size: 1.5rem; font-weight: 600; cursor: pointer; }
.mobile-nav-item .mobile-accordion-toggle i { font-size: 1rem; transition: transform 0.3s ease; }
.mobile-nav-item.active > .mobile-accordion-toggle i { transform: rotate(180deg); }
.mobile-submenu { list-style: none; padding: 0; margin: 0; max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out; }
.mobile-submenu li a { display: block; padding: 0.8rem 0; color: var(--text-secondary); text-decoration: none; font-size: 1.2rem; }
.mobile-submenu li a:hover { color: var(--text-primary); }
.mobile-menu .mobile-actions { margin-top: 3rem; }

@media (max-width: 992px) {
    .nav-menu, .nav-actions { display: none; }
    .mobile-menu-toggle { display: block; font-size: 2rem; color: var(--text-primary); background: none; border: none; cursor: pointer; z-index: 1002; }
    .logo { font-size: 1.2rem; }
    .navbar { padding: 0.8rem 1rem; }
}

/*
===============================================================
--- FIX DEFINITIVO PER OVERFLOW NOME UTENTE (sostituisci questo blocco) ---
===============================================================
*/

.user-avatar { 
    display: flex; 
    align-items: center; 
    gap: 0.7rem; /* Un po' più di spazio */
    font-weight: 600; 
}

.user-avatar img { 
    width: 32px; 
    height: 32px; 
    border-radius: 50%; 
    flex-shrink: 0; /* Fondamentale: impedisce all'avatar di rimpicciolirsi */
}

.user-name {
    /* Proprietà chiave per il troncamento */
    display: block; /* O inline-block */
    max-width: 120px; /* LIMITE EFFETTIVO: imposta una larghezza massima per il nome */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/*
===============================================================
--- FIX PER POSIZIONAMENTO BADGE (Sostituisci la vecchia regola) ---
===============================================================
*/

.notification-bell .badge {
    position: absolute; /* Mantiene il posizionamento assoluto */
    
    /* FIX: Posizionamento più preciso all'angolo dell'icona */
    top: 2px;
    right: 2px;
    
    width: 10px; /* Leggermente più grande per visibilità */
    height: 10px;
    
    background-color: #e53e3e; /* Usiamo un rosso fisso e brillante */
    border-radius: 50%; /* Cerchio perfetto */
    
    /* FIX CHIAVE: Il bordo deve essere del colore dello sfondo principale della pagina,
       per creare l'illusione che il badge sia "sopra" l'header. */
    border: 2px solid var(--bg-primary);
    
    z-index: 1; /* Assicura che sia sempre visibile sopra l'icona */
}

/* Regola aggiuntiva per garantire che il contenitore della campanella 
   non abbia padding che sposti l'icona. */
#notification-bell > .nav-link {
    padding-right: 0.5rem;
    padding-left: 0.5rem;
}

.dropdown-links a {
    display: flex;
    align-items: flex-start; /* Allinea icona e testo in alto */
    gap: 1rem; /* Spazio tra icona e blocco di testo */
    padding: 0.8rem 1rem;
    border-radius: 12px;
    text-decoration: none;
    min-width: 250px; /* Aumenta la larghezza per un look migliore */
    transition: background-color 0.2s ease;
}

/* Effetto hover direttamente sul link */
.dropdown-links a:hover {
    background-color: var(--hover-bg);
}

/* Icona colorata e più grande */
.dropdown-links a i {
    font-size: 1.4rem;
    color: var(--primary-accent); /* Usa il tuo colore primario */
    margin-top: 2px; /* Allineamento fine */
}

/* Contenitore per titolo e descrizione */
.dropdown-link-text {
    display: flex;
    flex-direction: column;
}

/* Titolo del link */
.dropdown-link-text p {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

/* Descrizione del link */
.dropdown-link-text span {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

button:not(.theme-option), .button, .button-secondary {
    border-radius: 9999px !important;
}



.footer-brand .logo {
font-weight: 700;
    font-size: 1.5rem;
    text-decoration: none;
    color: var(--text-color);
    flex-shrink: 0;
}


a {
    color: var(--accent-color);
}

h1 {
    margin-bottom: 1rem;
}


.changelog-preview {
    position: relative;
    padding-top: 2rem !important;

    /* ============== MODIFICA CHIAVE QUI ============== */
    /* Prepariamo il contenitore per l'animazione */
    overflow: hidden; /* Nasconde il contenuto quando l'altezza si riduce */
    transition: 
        opacity 0.3s ease, 
        max-height 0.7s ease, 
        padding 0.7s ease, 
        margin 0.7s ease;
    
    /* Impostiamo un'altezza massima iniziale molto grande */
    max-height: 500px; /* Assicurati che sia più grande dell'altezza massima del box */
}

/* 
 * Nuova classe '.is-hidden' che verrà aggiunta da JavaScript.
 * Questa classe farà collassare il box.
*/
.changelog-preview.is-hidden {
    opacity: 0;
    max-height: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    /* Riduciamo anche il bordo della <hr> precedente se esiste */
    border-top-width: 0; 
}
/* ======================================================= */


/* Stile per il pulsante di chiusura (invariato) */
.changelog-preview .close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.8rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
    transition: color 0.2s;
}

.show-changelog-wrapper {
    display: flex; /* Usiamo flex per centrare facilmente */
    justify-content: center;
    margin: 2rem 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}


#changelog-hr,
.changelog-preview {
    transition: 
        opacity 0.3s ease, 
        max-height 0.7s ease, 
        padding 0.7s ease, 
        margin 0.7s ease,
        border-width 0.7s ease;
}

#changelog-hr.is-hidden {
    opacity: 0;
    margin: 0 !important;
    border-width: 0;
}



.card-wrapper {
    transition: transform .7s; 
}


.card-wrapper:hover {
  transform: scale(1.02);
}



#new-report-form-container {
    overflow: hidden;
    
    /* Stato iniziale (aperto) */
    opacity: 1;
    max-height: 1000px; /* Altezza massima sufficiente a contenere il form */
    margin-top: 2rem !important;
    padding: 2rem !important;
    border-width: 1px;
    
    /* Definizione delle transizioni */
    transition: 
        opacity 0.3s ease, /* Dissolvenza veloce */
        max-height 0.7s ease 0.2s, /* Collasso lento, parte CON RITARDO */
        padding 0.7s ease 0.2s,
        margin-top 0.7s ease 0.2s,
        border-width 0.7s ease 0.2s;
}

/* 
 * Classe '.is-hidden' che fa collassare il form.
 * Questa classe verrà aggiunta/rimossa da JavaScript.
*/
#new-report-form-container.is-hidden {
    /* Stato finale (chiuso) */
    opacity: 0;
    max-height: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    border-width: 0;

    /* Quando si apre, la dissolvenza è più lenta e il collasso è istantaneo */
    transition: 
        opacity 0.5s ease 0.2s, /* Dissolvenza lenta in entrata, parte CON RITARDO */
        max-height 0.4s ease, /* Espansione veloce, parte SUBITO */
        padding 0.4s ease,
        margin-top 0.4s ease,
        border-width 0.4s ease;
}

.settings-section {
    padding: 2rem !important;
    margin-top: 2rem;
}
.settings-section h2 {
    margin-top: 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.settings-section ul {
    list-style-type: '- ';
    padding-left: 20px;
    color: var(--text-secondary);
}

/* ========================================================== */
/*          STILI PAGINA LISTA MEMBRI                         */
/* ========================================================== */
.member-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.member-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem !important;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45) !important;
}

.member-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    flex-shrink: 0;
}

.member-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.member-name {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.member-original-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Paginazione */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
}
.pagination-controls .disabled {
    pointer-events: none;
    opacity: 0.5;
}

.donation-options { margin: 3rem 0; }
.donation-card { padding: 2rem !important; text-align: center; }
.donation-buttons { display: flex; justify-content: center; gap: 1.5rem; margin-top: 2rem; flex-wrap: wrap; }
.rewards-section { padding: 2rem !important; }
/* Aggiungi stili per .paypal-btn e .revolut-btn se vuoi colori specifici */

.group-card-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    margin: -1.5rem -1.5rem 1rem -1.5rem; /* Esce dai padding della card */
}

.group-title-image {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.group-detail-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--border-color);
}

/* ========================================================== */
/*          STILI CARD GRUPPO (LAYOUT AD AVATAR)              */
/* ========================================================== */

.group-card {
    display: flex !important;
    flex-direction: column !important;
    padding: 1.5rem !important;
    text-decoration: none !important;
    color: var(--text-primary) !important;
}

.group-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.group-avatar-wrapper {
    flex-shrink: 0;
}

.group-avatar, .group-avatar-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
}

.group-avatar {
    object-fit: cover;
}

.group-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-secondary);
}

.group-info h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-primary) !important;
}

.group-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary) !important;
}

.group-card-body {
    flex-grow: 1; /* Spinge il footer in fondo */
    margin-bottom: 1.5rem;
}

.card-description {
    font-size: 0.9rem;
    color: var(--text-secondary) !important;
    line-height: 1.6;
}

.card-footer {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-accent);
    margin-top: auto; /* Allinea il footer in fondo */
    padding-top: 1rem;

}

.sqm-import-container {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
}
.sqm-import-container label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}
.sqm-import-container p {
    font-size: 0.9rem;
    color: var(--text-secondary) !important;
    margin-top: 1rem;
}

.import-instructions {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    background: rgba(0,0,0,0.2);
    padding: 0.75rem;
    border-radius: var(--border-radius);
    text-align: left;
}
.import-instructions strong {
    color: var(--warning-color);
}


/* ========================================================== */
/*          STILI MODALI PAGINA INVITO (FIX DEFINITIVO)       */
/* ========================================================== */

.details-link {
    display: block;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--text-accent);
    font-weight: 600;
    text-decoration: none;
}


/* Stile base del modale (overlay) */
.details-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 2000;
    
    /* USA DISPLAY PER MOSTRARE/NASCONDERE */
    display: none; /* Nascosto di default */

    align-items: center;
    justify-content: center;
    padding: 1rem;
    

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Stato visibile (aggiunto da JS) */
.details-modal.is-open {
    display: flex !important;
    animation: modalOpen 0.3s ease forwards;
}

/* Aggiungiamo classe per chiusura */
.details-modal.is-closing {
    animation: modalClose 0.25s ease forwards;
}

/* Contenuto del modale */
.modal-content {
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    /* Eredita lo stile "vetro" dalle classi aggiunte in HTML */
    padding: 2rem 2.5rem !important;
}

/* Stili interni (pulsante chiusura, testi, gif) */
.modal-content .close-btn {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 2rem;
    background: none; border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}
.modal-content .close-btn:hover { color: var(--text-primary); }

.feature-gif {
    width: 100%; margin-top: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255,255,255,0.1);
}

.modal-content h2 { margin-top: 0; color: var(--text-primary) !important; }
.modal-content p { color: var(--text-secondary) !important; line-height: 1.7; }
.modal-content ul { list-style-type: '- '; padding-left: 20px; color: var(--text-secondary); }

@keyframes modalOpen {
    0% { opacity: 0; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes modalClose {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.9); }
}

/* ========================================================== */
/*          STILI PAGINA GUIDE (LAYOUT A CARD)                */
/* ========================================================== */
.guides-header { text-align: center; margin-bottom: 2rem; }
.guide-search-container { 
    position: relative; 
    margin-bottom: 3rem; 
    padding: 0 !important; 
}
.guide-search-container .bi-search {
    position: absolute;
    top: 50%;
    left: 1.5rem;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.2rem;
}
#guide-search-input {
    width: 100%;
    padding: 1.25rem 1.5rem 1.25rem 4rem; /* Spazio per l'icona */
    font-size: 1.1rem;
}
.guide-category { margin-bottom: 3rem; }
.guide-category h2 {
    display: flex; align-items: center; gap: 1rem;
    padding-bottom: 1rem; border-bottom: 1px solid var(--border-color);
}
.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.guide-card {
    background-color: #1C1C1E;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}
.guide-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}
.guide-card h4 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}
.guide-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary) !important;
}

/* ========================================================== */
/*      STILI CHECKBOX E PANNELLO RICHIESTE SLOT              */
/* ========================================================== */

/*
 * 1. Stile Avanzato per i Checkbox
 * Nascondiamo il checkbox di default e creiamo un'interfaccia custom.
*/

.event-options {
    margin: 2rem 0;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: rgba(0,0,0,0.1);
}
.event-options h4 {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    user-select: none; /* Impedisce di selezionare il testo */
}
.checkbox-label:last-child {
    margin-bottom: 0;
}

/* Nasconde il checkbox HTML originale */
.checkbox-label input[type="checkbox"] {
    display: none;
}

/* Crea il box custom */
.checkbox-label .checkbox-custom {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    margin-right: 0.75rem;
    display: inline-block;
    position: relative;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* Crea il segno di spunta (inizialmente nascosto) */
.checkbox-label .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid var(--text-primary);
    border-width: 0 3px 3px 0;
    transform: rotate(45deg) scale(0); /* Nascosto e rimpicciolito */
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Stile quando il checkbox è selezionato */
.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}
.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    transform: rotate(45deg) scale(1); /* Mostra il segno di spunta */
}


/*
 * 2. Stile per il Pannello delle Richieste di Slot in Sospeso
*/
.pending-slots-panel {
    padding: 1.5rem !important;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.pending-slots-panel h3 {
    margin-top: 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: var(--warning-color);
}

.pending-slots-panel ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pending-slots-panel li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0.5rem;
    border-bottom: 1px solid var(--bg-tertiary);
    flex-wrap: wrap; /* Va a capo su schermi piccoli */
    gap: 1rem;
}
.pending-slots-panel li:last-child {
    border-bottom: none;
}

/* Stile per il testo della richiesta */
.pending-slots-panel li > span {
    color: var(--text-secondary);
}
.pending-slots-panel li > span a,
.pending-slots-panel li > span strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ========================================================== */
/*      STILI SUPPORTO E LIVE CHAT (TEMA NUOVO E COMPLETO)    */
/* ========================================================== */

/* --- 1. Pagina Elenco Ticket (/supporto, /superadmin/supporto) --- */

.ticket-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.ticket-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    background-color: var(--bg-dropdown);
    padding: 1.25rem 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: background-color 0.2s, border-color 0.2s;
}

.ticket-card:hover {
    background-color: var(--hover-bg);
    border-color: rgba(255, 255, 255, 0.2);
}

.ticket-info {
    display: flex;
    flex-direction: column;
}
.ticket-info p { margin: 0; }
.ticket-info strong { color: var(--text-primary); }
.ticket-info small { color: var(--text-secondary); font-size: 0.8rem; }

.ticket-status-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.ticket-status {
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
}
.ticket-status.status-aperto { color: #34C759; }
.ticket-status.status-in-lavorazione { color: #FF9500; }
.ticket-status.status-chiuso { color: var(--text-secondary); }

/* --- 2. Widget Chat Fluttuante --- */

@keyframes pulse-bubble {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 122, 255, 0.5); }
    70% { transform: scale(1); box-shadow: 0 0 0 15px rgba(0, 122, 255, 0); }
}

#chat-bubble {
    position: fixed;
    bottom: 1.5rem; right: 1.5rem;
    width: 56px; height: 56px;
    background-color: var(--primary-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    z-index: 1999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    
    /* Animazione di entrata/uscita per la bolla */
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
    transform: scale(0);
    opacity: 0;
}
#chat-bubble.visible {
    transform: scale(1);
    opacity: 1;
}
#chat-bubble:hover {
    transform: scale(1.1);
}
#chat-bubble.new-message-pulse { animation: pulse-bubble 1.5s infinite; }
#chat-bubble svg { width: 28px; height: 28px; }

/* --- 3. Finestra della Chat --- */

#chat-window {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 360px;
    height: 550px;
    max-height: calc(100vh - 3rem);
    display: flex;
    flex-direction: column;
    z-index: 2000;
    
    background-color: var(--bg-dropdown);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    
    /* ============== ANIMAZIONE DI APERTURA/CHIUSURA ============== */
    opacity: 0;
    transform: scale(0.1);
    transform-origin: bottom right; /* Il punto da cui parte l'animazione */
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    /* =========================================================== */
}
#chat-window.open {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}
#chat-window.open { display: flex; opacity: 1; transform: translateY(0); pointer-events: auto; }

@media (max-width: 480px) {
    #chat-window { width: calc(100% - 2rem); height: calc(100% - 2rem); bottom: 1rem; right: 1rem; }
}

.chat-header {
    flex-shrink: 0; padding: 0.75rem 1rem;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--border-color);
}
.chat-header span { font-weight: 600; color: var(--text-primary); }
.chat-header #close-chat-btn { background: none; border: none; color: var(--text-secondary); font-size: 1.8rem; cursor: pointer; }

.chat-messages {
    flex-grow: 1; padding: 1rem;
    overflow-y: auto; display: flex; flex-direction: column; gap: 0.25rem;
}
.chat-welcome-message { margin: auto; text-align: center; color: var(--text-secondary); }

@keyframes new-message-fadein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.chat-message { display: flex; max-width: 85%; margin-bottom: 0.75rem; animation: new-message-fadein 0.3s ease-out; }
.message-bubble { padding: 0.6rem 1rem; border-radius: 18px; line-height: 1.5; }
.message-author { display: none; }
.message-text { word-wrap: break-word; color: var(--text-primary); }
.message-time { font-size: 0.7rem; text-align: right; opacity: 0.6; margin-top: 0.5rem; clear: both; }

.author-message { align-self: flex-end; }
.author-message .message-bubble { background-color: var(--primary-accent); border-bottom-right-radius: 4px; }
.author-message .message-text { color: white; }

.other-message { align-self: flex-start; }
.other-message .message-bubble { background-color: #3A3A3C; border-bottom-left-radius: 4px; }

.chat-input-area {
    flex-shrink: 0; padding: 0.75rem;
    display: flex; gap: 0.5rem; align-items: flex-end;
    border-top: 1px solid var(--border-color);
}
#chat-input {
    flex-grow: 1; resize: none; min-height: 45px; max-height: 120px;
    padding: 0.6rem 0.75rem;
    background-color: #3A3A3C;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 18px; /* Più arrotondato */
}
#send-chat-btn {
    font-size: 1.2rem; flex-shrink: 0; height: 45px; width: 45px;
    background-color: var(--primary-accent);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
#send-chat-btn:disabled { background-color: #3A3A3C; color: var(--text-secondary); cursor: not-allowed; }

.badge, .status-badge, br, img, button, .button-secondary, .status-upcoming, .status-finished, .status-live {
    user-select: none;
}

/* Stili per i campi server nel form */
.server-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.server-info-group {
    background: rgba(0,0,0,0.15);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: rgba(0,0,0,0.1);
}
.server-info-group h4 {
    margin-top: 0;
    display: flex; align-items: center; gap: 0.5rem;
}

/* Stili per i pulsanti di connessione rapida */
.quick-connect-container {
    margin: 2rem 0;
    padding-top: 2rem;
        padding-bottom: 2rem;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.quick-connect-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.quick-connect-buttons a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .server-info-grid { grid-template-columns: 1fr; }
}


.quick-connect-container {
    margin: 2rem 0;
    padding-top: 1.5rem;
}
.quick-connect-container h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.server-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.server-details-card {
    background: rgba(0,0,0,0.2);
    padding: 1.5rem;
    border-radius: var(--border-radius);
}
.server-details-card h5 {
    margin-top: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}
.server-details-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}
.server-details-card li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.server-details-card li span {
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    color: var(--text-primary);
}
.server-details-card a.button, .server-details-card a.button-secondary {
    width: 100%;
    display: flex; /* Centra il testo e l'icona */
    justify-content: center;
}

/* Stile per il campo password */
.password-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.copy-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 5px;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    line-height: 1;
}
.copy-btn:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}
.copy-btn .bi-check-lg {
    color: var(--success-color);
}

.changelog-builder-page .builder-metadata { padding: 1.5rem !important; margin-bottom: 2rem; }
.changelog-builder { display: flex; flex-direction: column; gap: 2rem; }
.builder-category { padding: 1.5rem; border: 1px dashed var(--border-color); border-radius: var(--border-radius); }
.builder-category h3 { margin-top: 0; }
.entry-list { display: flex; flex-direction: column; gap: 1rem; margin: 1rem 0; }
.changelog-entry-editor { display: flex; gap: 1rem; align-items: flex-start; }
.entry-inputs { flex-grow: 1; }
.entry-inputs input, .entry-inputs textarea { width: 100%; margin-bottom: 0.5rem; }

.rsvp-container { margin-top: 2rem; }
.rsvp-actions { padding: 1.5rem !important; text-align: center; margin-bottom: 2rem; }
.rsvp-actions h3 { margin-top: 0; }
.rsvp-actions form { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

.rsvp-lists {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.rsvp-column {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: var(--border-radius);
}
.rsvp-column h4 { margin-top: 0; }
.rsvp-column ul { list-style: none; padding: 0; }
.rsvp-column li {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}
.rsvp-column li:last-child { border-bottom: none; }
.rsvp-column li a { display: flex; align-items: center; gap: 0.75rem; color: var(--text-primary); }

/* ========================================================== */
/*          STILI PAGINA RECENSIONI                           */
/* ========================================================== */

/* --- 1. Form per Lasciare una Recensione --- */

.review-form-container {
    padding: 2rem !important;
    margin-bottom: 3rem;
}
.review-form-container h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

/* Contenitore per le stelle */
.rating-stars {
    display: flex;
    flex-direction: row; /* Fa sì che l'hover funzioni da sinistra a destra */
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Nasconde i radio button originali */
.rating-stars input[type="radio"] {
    display: none;
}

/* Stile per le etichette a forma di stella */
.rating-stars label {
    font-size: 3rem;
    color: var(--border-color); /* Colore stelle spente */
    cursor: pointer;
    transition: transform 0.2s, color 0.2s;
}

/* Effetto hover: illumina tutte le stelle fino a quella su cui sei */
.rating-stars:not(:hover) input[type="radio"]:checked ~ label {
    color: var(--warning-color);
}
.rating-stars:hover label {
    color: var(--warning-color);
}
.rating-stars label:hover ~ label {
    color: var(--border-color); /* Rimette le stelle successive al colore spento */
}

/* Effetto "pop" al click */
.rating-stars input[type="radio"]:checked + label {
    transform: scale(1.2);
}

.review-form textarea {
    min-height: 100px;
    margin-bottom: 1.5rem;
}
.review-form button {
    width: 100%;
}


/* --- 2. Lista delle Recensioni Esistenti --- */

.reviews-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.review-card {
    padding: 1.5rem !important;
    display: flex;
    flex-direction: column;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.review-author div {
    display: flex;
    flex-direction: column;
}
.review-author strong {
    color: var(--text-primary);
}
.review-author small {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.review-rating {
    font-size: 1rem;
    flex-shrink: 0; /* Impedisce che vada a capo */
}
.review-rating .star.filled {
    color: var(--warning-color);
}
.review-rating .star {
    color: var(--border-color);
}

.review-comment {
    font-style: italic;
    color: var(--text-secondary) !important;
    line-height: 1.7;
    padding-left: 1rem;
    border-left: 3px solid var(--border-color);
}

/* ========================================================== */
/*      STILI FORM RECENSIONE (v2.0)                          */
/* ========================================================== */

#review-form-wrapper.is-hidden,
#review-submitted-message.is-hidden {
    display: none;
}

.review-form-container {
    padding: 2rem 2.5rem !important;
    margin-bottom: 3rem;
}

.review-form-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.review-form-header .user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}
.review-form-header h3 {
    margin: 0;
    color: var(--text-primary) !important;
}

.review-form-container > p {
    color: var(--text-secondary) !important;
    text-align: center;
    margin-bottom: 2rem;
}

.review-form .rating-stars {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.review-form .rating-stars input[type="radio"] {
    display: none;
}
.review-form .rating-stars label {
    font-size: 3rem;
    color: var(--border-color);
    cursor: pointer;
    transition: transform 0.2s, color 0.2s;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.review-form .rating-stars:not(:hover) input[type="radio"]:checked ~ label {
    color: var(--warning-color);
}
.review-form .rating-stars:hover label {
    color: var(--warning-color);
    transform: scale(1.1);
}
.review-form .rating-stars label:hover ~ label {
    color: var(--border-color);
    transform: scale(1);
}
.review-form .rating-stars input[type="radio"]:checked + label {
    transform: scale(1.2);
    color: var(--warning-color);
}

.review-form textarea {
    min-height: 120px;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}
.review-form button {
    width: 100%;
    padding: 0.8rem !important;
    font-size: 1.1rem !important;
}

.review-form .rating-stars {
    display: flex;
    flex-direction: row-reverse; /* mantieni 5→1 nell'HTML, visivamente sinistra→destra */
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.review-form .rating-stars input[type="radio"] {
    display: none;
}

.review-form .rating-stars label {
    font-size: 3rem;
    color: var(--border-color);
    cursor: pointer;
    transition: transform 0.2s, color 0.2s;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Reset di tutte le stelle quando sei in hover sul gruppo */
.review-form .rating-stars:hover label {
    color: var(--border-color);
}

/* 🔥 Qui il fix: accendi sia la stella corrente sia quelle a sinistra */
.review-form .rating-stars label:hover {
    color: var(--warning-color); /* <-- la stella attuale */
}
.review-form .rating-stars label:hover ~ label {
    color: var(--warning-color); /* <-- quelle a sinistra */
}

/* Mantieni accese quelle selezionate */
.review-form .rating-stars input[type="radio"]:checked ~ label {
    color: var(--warning-color);
}

/* Effetto pop sulla selezionata */
.review-form .rating-stars input[type="radio"]:checked + label {
    transform: scale(1.2);
}

.badge-creator {
    padding: 0.4rem 0.9rem !important;
    border-radius: 999px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;

    /* Effetto Vetro */
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    text-shadow: none !important;
background: rgba(139, 92, 246, 0.5)  !important;

}

.announcement-banner {
    padding: 0.75rem 1.5rem;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.9rem;
    transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out, opacity 0.3s ease;
    opacity: 1;
    
    border-radius: 20px;
}
.announcement-banner.is-hidden {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    overflow: hidden;
}

/* Icona a sinistra */
.announcement-icon {
    font-size: 2rem; /* Rende l'icona grande */
    line-height: 1;
    flex-shrink: 0; /* Impedisce all'icona di rimpicciolirsi */
}

/* Contenuto testuale */
.announcement-content {
    flex-grow: 1; /* Occupa tutto lo spazio disponibile */
    text-align: left; /* Allinea il testo a sinistra */
}
.announcement-content strong {
    margin-right: 0.5rem;
}

/* Pulsante di chiusura (spostato all'estrema destra) */
.announcement-banner .close-btn {
    background: none;
    border: none;
    color: white;
    opacity: 0.7;
    font-size: 1.8rem;
    cursor: pointer;
    margin-left: auto; /* Spinge il pulsante a destra */
    padding: 0 0.5rem;
    flex-shrink: 0;
}
.announcement-banner .close-btn:hover {
    opacity: 1;
}

//* ========================================================== */
/*          TEMI GLOBALI v2.0 - EFFETTI AVANZATI              */
/* ========================================================== */

/* --- Tema Natale: "Notte Stellata Invernale" --- */
@keyframes snow-fall {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}
body.theme-christmas {
    background: linear-gradient(180deg, #020C3D 0%, #1D2B53 100%);
    position: relative;
}
.snow-flake {
    position: fixed;
    top: -10px;
    color: white;
    font-size: 1.5rem;
    animation: snow-fall linear infinite;
    pointer-events: none;
    z-index: -1;
    opacity: 0.7;
}


/* --- Tema Halloween: "Nebbia Spettrale" --- */
@keyframes fog-drift {
    0% { transform: translateX(-25%); }
    100% { transform: translateX(25%); }
}
body.theme-halloween {
    --primary-accent: #FF6B00; /* Oro */
    --accent-color: #FF6B00; /* Oro */
    --accent-hover: #FF6B00; /* Oro */
    --brand-color:#FF6B00; /* Oro */
    position: relative;
}

body.theme-halloween .announcement-banner.level-info {
    background-color: #FF6B00; 
}

body.theme-halloween::before, body.theme-halloween::after {
    content: '';
    position: fixed;
    bottom: 0;
    left: 50%;
    width: 250vw;
    height: 150vw;
    border-radius: 50%;
    z-index: -1;
    will-change: transform; /* Ottimizzazione per le animazioni */
}

/* body.theme-halloween::before {
    background: radial-gradient(circle, rgba(255, 140, 0, 0.2) 0%, transparent 60%);
    animation: fog-drift 60s alternate infinite ease-in-out;
}

body.theme-halloween::after {
    background: radial-gradient(circle, rgba(255, 107, 0, 0.15) 0%, transparent 50%);
    animation: fog-drift 45s alternate infinite ease-in-out;
} */


/* ========================================================== */
/*                TEMA APRIL FOOLS - GLITCH AVANZATO         */
/* ========================================================== */

/* Animazioni glitch per testo */



/* Tema base */
body.theme-aprilfools {
    --primary-accent: #FF00FF; /* Neon magenta */
    background: #000000;
    color: #FFFFFF;
    overflow-x: hidden;
    position: relative;
    font-family: 'Courier New', monospace;
}

/* Applicare glitch a testi principali */
body.theme-aprilfools .logo,
body.theme-aprilfools h1,
body.theme-aprilfools h2,
body.theme-aprilfools h3 {
    animation: text-glitch 1s infinite linear alternate-reverse;
    color: var(--primary-accent);
    text-shadow:
        2px 0 var(--secondary-accent),
        -2px 0 var(--secondary-accent),
        0 2px var(--primary-accent);
}

/* Applicare glitch a blocchi/card/pulsanti */
body.theme-aprilfools .card,
body.theme-aprilfools .button,
body.theme-aprilfools .panel {
    animation: block-glitch 1.2s infinite linear alternate-reverse;
    border: 2px solid var(--primary-accent);
    box-shadow: 0 0 10px var(--primary-accent), 0 0 20px var(--secondary-accent);
    background: rgba(0,0,0,0.8);
}

/* Pulsanti pazzi */
body.theme-aprilfools .button:hover {
    transform: rotate(calc(-5deg + 10deg * var(--rand)));
    box-shadow: 0 0 15px var(--primary-accent), 0 0 25px var(--secondary-accent);
    color: var(--secondary-accent);
}

/* Glitch del cursore del mouse */
body.theme-aprilfools * {
    cursor: url('https://cdn-icons-png.flaticon.com/512/25/25231.png'), auto;
}


/* --- Tema Anniversario: "Pioggia di Coriandoli Dorati" (Migliorato) --- */
@keyframes confetti-fall {
    0% { transform: translateY(-100%) rotateZ(0deg); }
    100% { transform: translateY(100vh) rotateZ(720deg); }
}
body.theme-anniversary {
    --primary-accent: #d7bc23; /* Oro */
    --accent-color: #d7bc23; /* Oro */
    --accent-hover: #d7bc23; /* Oro */
    --brand-color: #d7bc23; /* Oro */
    position: relative;
}

.confetti {
    position: fixed;
    top: -10%;
    font-size: 2rem; /* grandezza dell'emoji */
    opacity: 0.9;
    animation: confetti-fall linear infinite;
    z-index: -1;
    pointer-events: none;
    display: inline-block;
}

body.theme-newyear {

    background: linear-gradient(180deg, #000022 0%, #000000 100%);
    position: relative;
}

.button-read-briefing {
        line-height: 1.6;
}

[class*="badge"] {
  user-select: none;
}

/* ========================================================== */
/*          STILI MODALE DI LOGIN                             */
/* ========================================================== */


/* Testo descrittivo nel pop-up */
.swal-text {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Testo descrittivo nel pop-up */
.swal-text {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Pulsante di login Discord */
.swal-button {
    display: block !important;
    width: 80%;
    margin: 0 auto 1.5rem auto;
    font-size: 1.1rem !important;
    text-align: center;
    padding: 0.8rem !important;
}
.swal-button.disabled {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-secondary) !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    pointer-events: none; /* Aggiunto per robustezza */
}
.swal-button .bi {
    margin-right: 0.5rem;
    vertical-align: text-bottom;
}


.swal-tos-agreement {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    text-align: left;
    color: var(--text-secondary); /* Colore base del testo */
}
.swal-tos-agreement .checkbox-label {
    display: flex;
    align-items: flex-start; /* Allinea in cima per testi su più righe */
    gap: 0.5rem;
}
.swal-tos-agreement .checkbox-label .checkbox-custom {
    flex-shrink: 0; /* Impedisce al box di rimpicciolirsi */
    margin-top: 2px; /* Allineamento verticale fine */
}
.swal-tos-agreement a {
    color: var(--primary-accent);
    text-decoration: underline;
}

.feedback-popup {
    position: fixed;
    bottom: 1.5rem;
left: 1.5rem; /* <-- MODIFICA CHIAVE QUI */
    z-index: 1998; /* Sotto la bolla della chat ma sopra il resto */
    
    /* Stile Vetro */
    background: linear-gradient(135deg, rgba(28, 28, 30, 0.75), rgba(25,25,27,0.75)) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37) !important;
    border-radius: var(--border-radius) !important;
    
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    
    /* Stato Nascosto */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}

/* Stato Visibile */
.feedback-popup.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.feedback-content {
    display: flex;
    flex-direction: column; /* FORZA IL LAYOUT VERTICALE */
    align-items: center; /* Centra gli elementi orizzontalmente */
    gap: 0.75rem; /* Spazio tra il testo e il pulsante */
    text-align: center; /* Centra il testo se va a capo */
}

.feedback-content p {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary) !important;
}

.close-btn-small {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    line-height: 1;
    padding: 0 0.5rem;
    margin-right: -0.5rem;
    cursor: pointer;
    position: absolute;
    top: 5px;
    right: 5px;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.close-btn-small:hover {
    opacity: 1;
}

/* Stile per l'header del gruppo per fare spazio all'icona */
.form-group-section .group-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Stile per la maniglia di trascinamento (icona) */
.drag-handle {
    cursor: grab;
    color: var(--text-secondary);
    font-size: 1.5rem;
    padding: 0 0.5rem;
}
.drag-handle:active {
    cursor: grabbing;
}

/* Fai in modo che l'input del nome occupi lo spazio rimanente */
.form-group-section .group-header input {
    flex-grow: 1;
}

.sortable-ghost {
    opacity: 0.4;
    background: var(--accent-color);
}

/* Stile per il selettore del gioco */
.game-selector {
    display: flex;
    position: relative;
    background-color: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 4px;
    width: fit-content;
}
.game-selector input[type="radio"] {
    display: none; /* Nascondiamo il radio button */
}
.game-selector label {
    padding: 0.5rem 1.25rem;
    cursor: pointer;
    color: var(--text-secondary);
    font-weight: 600;
    transition: color 0.3s ease;
    z-index: 2;
}
.game-selector input[type="radio"]:checked + label {
    color: var(--text-primary);
}
.glider {
    position: absolute;
    top: 4px;
    height: calc(100% - 8px);
    width: 0; /* JS calcolerà la larghezza */
    background-color: var(--primary-accent);
    border-radius: 6px;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 1;
}

/* Stile per i tag del gioco sulla card */
.game-tag {

    user-select: none;
    margin: 0;
    padding: 0.3rem 0.7rem;
    width: 100%;
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--text-primary) !important;
    backdrop-filter: blur(8px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    text-shadow: none !important;
        display: flex;           /* trasforma il div in flex container */
    justify-content: center; /* centra orizzontalmente il contenuto */
    align-items: center;     /* centra verticalmente il contenuto */
}
.tag-arma3 { background-color: rgba(40, 30, 20, 0.5); } /* Rosso Arma */
.tag-reforger { background-color: rgba(20, 40, 35, 0.5); } /* Blu Reforger */

.event-card-header img {
    display: block; /* rimuove lo spazio bianco sotto l'immagine causato dal default inline-block */
}

/* Stile per lo slot prenotato da altri */
.slot-status-reserved {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 1rem;
}

.reserved-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
    cursor: help; /* Mostra un cursore a punto di domanda */
}

.reserved-info .bi {
    color: var(--text-secondary); /* Icona grigia per non essere troppo invadente */
}

.pending-slots-panel li small {
    color: var(--text-secondary);
    opacity: 0.8;
}

/* Tooltip custom con animazione */
.tooltip {
    position: absolute;
    top: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 0.5rem;
    margin: 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease; /* fade in/out */
    z-index: 9999999;
}

.tooltip.show {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 1024px) {
    .tooltip.show {
        display: none !important;
    }
}

/* =====================================
   Stili Selettore Lingua v2 (con Immagini)
   ===================================== */
.language-switcher-client {
    position: relative;
    margin-right: 1rem;
}

.lang-button-client {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem; /* Riduci padding per un look più compatto */
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.2s;
}

.lang-button-client:hover,
.language-switcher-client:hover .lang-button-client {
    background-color: var(--component-bg-hover);
}

.lang-flag {
    width: 24px;
    height: auto;
    border-radius: 3px;
    object-fit: cover;
}

.lang-button-client i {
    transition: transform 0.2s ease;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.language-switcher-client:hover .lang-button-client i {
    transform: rotate(180deg);
}

/* Dropdown */
.lang-dropdown-client .dropdown-links a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lang-flag-small {
    width: 20px;
    height: auto;
    border-radius: 3px;
    object-fit: cover;
}

/* Mobile */
.mobile-language-selector {
    padding: 1rem 1.5rem;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}
.mobile-language-selector h4 {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
}
.mobile-lang-link {
    display: flex; /* Cambia in flex per allineare immagine e testo */
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    font-size: 1.1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: background-color 0.2s;
}
.mobile-lang-link:hover { background-color: var(--component-bg-hover); }

.lang-button-client,
.lang-button-client:hover {
border: none !important;
box-shadow: none !important;
transform: none !important;
}


a, button, input, textarea {
    -webkit-tap-highlight-color: transparent; /* Safari / iOS */
    -webkit-tap-highlight-color: rgba(0,0,0,0); /* Android fallback */
}

input, select { border-radius: 9999px !important; }

button { font-family: 'Inter', sans-serif;}

