/* ==========================================================================
   SEXSAPIENS DESIGN SYSTEM & STYLESHEET
   Theme: Dark Mode Premium, Inclusivo e Giocoso
   ========================================================================== */

/* VARIABILI & CONFIGURAZIONE GLOBALE */
:root {
    --font-primary: 'Inter', sans-serif;
    --font-title: 'Outfit', sans-serif;

    /* Palette Colori */
    --bg-main: #0a0814;
    --bg-card: rgba(20, 16, 38, 0.6);
    --bg-card-hover: rgba(28, 22, 56, 0.85);
    --border-color: rgba(168, 85, 247, 0.15);
    --border-hover: rgba(236, 72, 153, 0.4);
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    /* Gradienti Accento */
    --accent-violet: #8b5cf6;
    --accent-magenta: #ec4899;
    --accent-cyan: #06b6d4;
    --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    --accent-glow: 0 0 20px rgba(236, 72, 153, 0.35);

    /* Feedback */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
}

/* RESET E BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-primary);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    line-height: 1.6;
}

/* EFFETTO SFONDO ANIMATO CON AURORA NEON */
.bg-gradient-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.bg-gradient-glow::before,
.bg-gradient-glow::after {
    content: '';
    position: absolute;
    width: 50vw;
    height: 50vw;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    animation: floatGlow 25s infinite alternate ease-in-out;
}

.bg-gradient-glow::before {
    background: radial-gradient(circle, var(--accent-violet) 0%, transparent 70%);
    top: -10%;
    left: 10%;
}

.bg-gradient-glow::after {
    background: radial-gradient(circle, var(--accent-magenta) 0%, transparent 70%);
    bottom: -10%;
    right: 10%;
    animation-delay: -5s;
}

@keyframes floatGlow {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(10%, 15%) scale(1.2);
    }
}

/* SCROLLBAR PERSONALIZZATA */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(236, 72, 153, 0.5);
}

/* ELEMENTI GLASSMORPHISM */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: all 0.3s ease;
}

/* TYPOGRAPHY */
h1, h2, h3, h4 {
    font-family: var(--font-title);
    font-weight: 700;
}

.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* HEADER & NAVIGAZIONE */
header {
    background: rgba(10, 8, 20, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.logo h1 {
    font-size: 1.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

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

nav {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-title);
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: var(--text-primary);
    background: var(--accent-gradient);
    box-shadow: var(--accent-glow);
}

/* CONTENUTO PRINCIPALE */
.content-container {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

/* GESTIONE DELLE SEZIONI (SPA VISIBILITY) */
.view-section {
    display: none;
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.view-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* PULSANTI */
.btn-primary {
    background: var(--accent-gradient);
    color: white;
    font-family: var(--font-title);
    font-weight: 600;
    border: none;
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--accent-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-family: var(--font-title);
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.10);
    border-color: var(--accent-violet);
}

/* ==========================================================================
   SEZIONE 1: HOME LAYOUT
   ========================================================================== */
.hero-section {
    text-align: center;
    padding: 4rem 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3.5rem;
}

.target-selector-container {
    width: 100%;
}

.selector-heading {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

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

.selection-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.selection-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(236, 72, 153, 0.08), transparent 50%);
    pointer-events: none;
}

.selection-card:hover {
    transform: translateY(-8px);
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    box-shadow: 0 12px 40px rgba(236, 72, 153, 0.15);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    filter: drop-shadow(0 0 10px rgba(236, 72, 153, 0.3));
}

.selection-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.selection-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.95rem;
    min-height: 60px;
}

.selection-card .btn-primary {
    width: auto;
}

/* ==========================================================================
   SEZIONE 2: SIMULATORE SCENARI
   ========================================================================== */
.simulator-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

.game-area {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.game-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.scenario-category {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--accent-magenta);
}

#scenario-title {
    font-size: 1.8rem;
    font-weight: 800;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 10px;
    transition: width 0.4s ease;
}

/* Carta del dialogo */
.dialogue-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
}

.character-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1rem;
}

.avatar-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.1);
    border: 2px solid var(--accent-violet);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
    overflow: hidden;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

/* Animazioni di caricamento dialoghi e risposte con effetto stagger */
.animate-fade-in {
    animation: dialogueSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes dialogueSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-stagger-in .dialogue-option {
    opacity: 0;
    animation: optionSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-stagger-in .dialogue-option:nth-child(1) { animation-delay: 0.1s; }
.animate-stagger-in .dialogue-option:nth-child(2) { animation-delay: 0.2s; }
.animate-stagger-in .dialogue-option:nth-child(3) { animation-delay: 0.3s; }
.animate-stagger-in .dialogue-option:nth-child(4) { animation-delay: 0.4s; }

@keyframes optionSlideIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.character-info {
    display: flex;
    flex-direction: column;
}

.character-name {
    font-weight: 700;
    font-family: var(--font-title);
    color: var(--text-primary);
}

.character-status {
    font-size: 0.75rem;
    color: var(--accent-cyan);
}

.dialogue-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-primary);
    min-height: 80px;
}

/* Evidenziazione parole cliccabili */
.word-highlight {
    color: var(--accent-cyan);
    border-bottom: 2px dashed rgba(6, 182, 212, 0.5);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0 2px;
}

.word-highlight:hover {
    color: var(--text-primary);
    background: rgba(6, 182, 212, 0.2);
    border-radius: 4px;
}

/* Opzioni di risposta */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dialogue-option {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    color: var(--text-primary);
    font-family: var(--font-primary);
    text-align: left;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 1rem;
    outline: none;
}

.dialogue-option:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.1);
}

.option-marker {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.dialogue-option:hover .option-marker {
    background: var(--accent-magenta);
    border-color: var(--accent-magenta);
    color: white;
}

/* Schermata Fine Gioco */
.end-screen {
    padding: 3rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    animation: scaleUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.end-icon {
    font-size: 4rem;
    filter: drop-shadow(0 0 15px rgba(168, 85, 247, 0.4));
}

.stat-box {
    display: flex;
    gap: 3rem;
    margin: 1.5rem 0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 2.5rem;
    font-family: var(--font-title);
    font-weight: 800;
    color: var(--accent-magenta);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.unlocked-terms-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    max-width: 400px;
    margin-bottom: 1rem;
}

.unlocked-term-badge {
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: var(--accent-cyan);
    padding: 0.4rem 1rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Colonna destra: Widget Glossario */
.sidebar-help {
    padding: 1.5rem;
}

.sidebar-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.sidebar-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.keywords-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.keyword-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.keyword-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-cyan);
}

.keyword-item h4 {
    color: var(--accent-cyan);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.keyword-item h4::after {
    content: '📖';
    font-size: 0.8rem;
    opacity: 0.7;
}

.keyword-item p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.no-keywords {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    padding: 2rem 0;
    border: 1px dashed rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

/* ==========================================================================
   SEZIONE 3: GLOSSARIO / SEXSAPIENS GRID
   ========================================================================== */
.glossary-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem auto;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-secondary);
}

.filter-controls {
    margin-top: 2rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: var(--text-muted);
}

#glossary-search {
    width: 100%;
    background: rgba(10, 8, 20, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 0.8rem 1.2rem 0.8rem 3rem;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease;
}

#glossary-search:focus {
    border-color: var(--accent-magenta);
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.15);
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-title);
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.filter-btn.active {
    background: var(--accent-violet);
    border-color: var(--accent-violet);
    color: white;
}

/* Griglia degli elementi del Glossario */
.glossary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.term-card {
    padding: 1.8rem;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.term-card:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

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

.term-badge {
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: var(--accent-violet);
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.term-badge.badge-orientation {
    background: rgba(236, 72, 153, 0.15);
    border-color: rgba(236, 72, 153, 0.3);
    color: var(--accent-magenta);
}

.term-badge.badge-desire {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--color-warning);
}

.term-badge.badge-relation {
    background: rgba(6, 182, 212, 0.15);
    border-color: rgba(6, 182, 212, 0.3);
    color: var(--accent-cyan);
}

.term-badge.badge-health {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--color-success);
}

.term-lock-status {
    font-size: 0.95rem;
}

.term-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
}

.term-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

/* Stato Bloccato per i termini nel glossario */
.term-card.locked {
    filter: grayscale(1) opacity(0.5);
    border-style: dashed;
}

.term-card.locked:hover {
    filter: grayscale(0.5) opacity(0.8);
    transform: none;
}

.term-card-footer {
    display: flex;
    justify-content: flex-end;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-violet);
    margin-top: auto;
}

.term-card:hover .term-card-footer {
    color: var(--accent-magenta);
}

/* ==========================================================================
   MODALE DEL TERMINE
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 3, 10, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: fadeIn 0.25s ease-out;
}

.modal-content {
    max-width: 600px;
    width: 100%;
    padding: 3rem 2.5rem;
    position: relative;
    animation: scaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-close {
    position: absolute;
    top: 1.2rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--accent-magenta);
}

.modal-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-size: 2rem;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.term-definition {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-primary);
}

.term-example-box {
    background: rgba(255, 255, 255, 0.02);
    border-left: 3px solid var(--accent-magenta);
    padding: 1.2rem;
    border-radius: 0 10px 10px 0;
}

.term-example-box strong {
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-magenta);
    margin-bottom: 0.5rem;
}

.term-example-box p {
    font-size: 0.95rem;
    font-style: italic;
    color: var(--text-secondary);
}

/* CLASSI UTILITY & NASCONDI */
.hidden {
    display: none !important;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
    text-align: center;
    padding: 2.5rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.85rem;
    margin-top: auto;
}

/* ==========================================================================
   STILI BACHECA DEI TROFEI (HOME)
   ========================================================================== */
/* PROGRESSIONE */
.progress-showcase {
    margin-top: 4rem;
    padding: 2rem 2.5rem;
}

.progress-showcase h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.progress-bars {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.progress-item {}

.progress-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.progress-count {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.progress-track {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.07);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-fill-cyan    { background: linear-gradient(90deg, #06b6d4, #22d3ee); box-shadow: 0 0 8px rgba(6, 182, 212, 0.4); }
.progress-fill-violet  { background: linear-gradient(90deg, #8b5cf6, #a78bfa); box-shadow: 0 0 8px rgba(139, 92, 246, 0.4); }
.progress-fill-magenta { background: linear-gradient(90deg, #ec4899, #f472b6); box-shadow: 0 0 8px rgba(236, 72, 153, 0.4); }

/* TROFEI */
.trophy-showcase {
    margin-top: 4rem;
    padding: 2.5rem;
    text-align: left;
}

.trophy-showcase h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.trophy-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

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

.trophy-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
}

.trophy-item.unlocked {
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.1), rgba(255, 255, 255, 0.02));
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.1);
}

.trophy-item.unlocked:hover {
    transform: translateY(-4px);
    border-color: var(--accent-magenta);
    box-shadow: 0 4px 25px rgba(236, 72, 153, 0.15);
}

.trophy-item.locked {
    filter: grayscale(1) opacity(0.4);
    border-style: dashed;
}

.trophy-badge-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.2));
}

.trophy-item.unlocked .trophy-badge-icon {
    filter: drop-shadow(0 0 15px rgba(236, 72, 153, 0.4));
    animation: pulseTrophy 2.5s infinite alternate ease-in-out;
}

@keyframes pulseTrophy {
    from { transform: scale(1); }
    to { transform: scale(1.08); }
}

.trophy-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-title);
    color: var(--text-primary);
}

.trophy-item p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ==========================================================================
   STILI MINI-QUIZ (SIMULATORE)
   ========================================================================== */
.quiz-card {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: dialogueSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.quiz-badge {
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: var(--accent-cyan);
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.quiz-header h3 {
    font-size: 1.8rem;
    font-weight: 800;
}

.quiz-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

#quiz-question-text {
    font-size: 1.25rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1rem;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quiz-option-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    color: var(--text-primary);
    font-family: var(--font-primary);
    text-align: left;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.quiz-option-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-cyan);
    transform: translateX(4px);
}

/* Classi di feedback risposta */
.quiz-option-btn.correct {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--color-success);
    color: white;
    font-weight: 600;
}

.quiz-option-btn.incorrect {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--color-error);
    color: white;
    opacity: 0.8;
}

.quiz-progress {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: right;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
    margin-top: 1rem;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */
/* ==========================================================================
   STILI SELEZIONE SCENARIO
   ========================================================================== */
.scenario-selection-screen {
    padding: 3rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.scenario-selection-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2.5rem;
}

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

.scenario-list-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.8rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.scenario-list-card:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.15);
}

.scenario-list-card h4 {
    font-size: 1.25rem;
    font-family: var(--font-title);
    color: var(--text-primary);
}

.scenario-list-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.scenario-list-card .badge {
    align-self: flex-start;
}

.audio-toggle-btn {
    font-size: 1.1rem !important;
    padding: 0.5rem 0.8rem !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    width: 38px;
    height: 38px;
    margin-left: 0.5rem;
}

/* ==========================================================================
   LANDING PAGE & TARGET SELECTOR STYLING
   ========================================================================== */
.cta-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2.5rem 0 3.5rem 0;
}

.cta-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2.5rem 2rem;
    border-radius: 20px;
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.cta-card:hover {
    transform: translateY(-5px);
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.15);
}

.cta-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.cta-card h3 {
    font-family: var(--font-title);
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.cta-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.cta-card .btn-primary {
    margin-top: auto;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.values-section {
    padding: 3rem 2rem;
    margin-bottom: 3.5rem;
    border-radius: 20px;
}

.section-subtitle-center {
    text-align: center;
    font-family: var(--font-title);
    font-size: 1.8rem;
    margin-bottom: 2.2rem;
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

.value-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.value-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
}

.value-item h4 {
    font-family: var(--font-title);
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
}

.value-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Schermata Scelta Target nel simulatore */
.target-selection-screen {
    text-align: center;
    padding: 3rem 2rem;
}

.term-badge-discovered {
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #c084fc;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    text-transform: uppercase;
}

/* Stile per le icone doodle SVG nel sito */
.doodle-icon {
    width: 60px;
    height: 60px;
    color: var(--accent-violet);
    transition: transform 0.3s ease, color 0.3s ease;
    display: inline-block;
}

.cta-card:hover .doodle-icon {
    transform: scale(1.1) rotate(-3deg);
    color: var(--accent-magenta);
}

.value-icon .doodle-icon {
    width: 48px;
    height: 48px;
    color: var(--accent-cyan);
    margin-bottom: 0.5rem;
}

.card-icon .doodle-icon {
    width: 64px;
    height: 64px;
    color: var(--accent-magenta);
}

/* Doodle logo */
.logo-icon svg {
    vertical-align: middle;
    color: var(--accent-magenta);
    margin-right: 8px;
    filter: drop-shadow(0 0 5px rgba(236, 72, 153, 0.4));
}

/* Audio toggle doodle */
.audio-toggle-btn svg {
    color: var(--text-primary);
    transition: color 0.3s ease, transform 0.2s ease;
    vertical-align: middle;
}

.audio-toggle-btn:hover svg {
    color: var(--accent-magenta);
    transform: scale(1.1);
}

/* Titolo doodle icon */
.title-doodle-icon {
    color: var(--accent-magenta);
    filter: drop-shadow(0 0 5px rgba(236, 72, 153, 0.3));
}

/* Inline doodle icons that match font size */
.doodle-icon-inline {
    width: 1.2em;
    height: 1.2em;
    display: inline-block;
    vertical-align: middle;
    color: currentColor;
    margin-right: 0.35rem;
}

/* ==========================================================================
   STILI GIOCO MITO O REALTÀ (3D CARD FLIP)
   ========================================================================== */
.game-mode-selection-screen {
    text-align: center;
    padding: 3rem 2rem;
    animation: fadeIn 0.4s ease forwards;
}

.selection-card.game-card {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.selection-card.game-card:hover {
    transform: translateY(-5px) scale(1.02);
}

.myth-game-screen {
    max-width: 650px;
    margin: 2rem auto;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 20px;
}

.flip-card-container {
    width: 100%;
    perspective: 1200px;
    margin: 1.5rem 0;
}

.flip-card {
    width: 100%;
    height: 380px;
    background-color: transparent;
    border-radius: 18px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

/* Rotazione attiva */
.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 18px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin: 0;
}

.flip-card-front {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
}

.flip-card-back {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--accent-cyan);
    transform: rotateY(180deg);
}

/* Colorazione del bordo della carta posteriore a seconda del risultato */
.flip-card-back.correct-border {
    border-color: var(--color-success);
}

.flip-card-back.incorrect-border {
    border-color: var(--color-error);
}

#myth-text {
    font-size: 1.4rem;
    line-height: 1.45;
    font-weight: 700;
    margin: 1.5rem 0;
    color: var(--text-primary);
}

.myth-prompt-text {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 2rem;
}

.myth-action-buttons {
    display: flex;
    gap: 20px;
    width: 100%;
    justify-content: center;
}

.myth-btn {
    padding: 1rem 2rem;
    border-radius: 30px;
    font-weight: 700;
    font-family: var(--font-title);
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.myth-btn.btn-myth {
    background: rgba(239, 68, 68, 0.15);
    border: 2px solid rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

.myth-btn.btn-myth:hover {
    background: #ef4444;
    color: white;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
}

.myth-btn.btn-reality {
    background: rgba(6, 182, 212, 0.15);
    border: 2px solid rgba(6, 182, 212, 0.4);
    color: var(--accent-cyan);
}

.myth-btn.btn-reality:hover {
    background: var(--accent-cyan);
    color: var(--bg-dark);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
    transform: translateY(-2px);
}

.result-indicator {
    font-family: var(--font-title);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.result-indicator.correct-text {
    color: var(--color-success);
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.result-indicator.incorrect-text {
    color: var(--color-error);
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

#myth-back-explanation {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

#myth-back-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==========================================================================
   STILI MODALITÀ QUIZ DEDICATA (STANDALONE)
   ========================================================================== */
.quiz-mode-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 3rem;
    min-height: 450px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 20px;
}

.quiz-mode-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    animation: fadeIn 0.4s ease forwards;
}

#quiz-mode-active {
    align-items: stretch;
    text-align: left;
}

.quiz-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1rem;
    width: 100%;
}

.quiz-score-badge {
    background: rgba(236, 72, 153, 0.15);
    border: 1px solid rgba(236, 72, 153, 0.3);
    color: var(--accent-magenta);
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.quiz-length-selector {
    margin-bottom: 1.5rem;
}

.quiz-len-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary.quiz-len-btn.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
    box-shadow: var(--accent-glow);
}

.quiz-mode-icon {
    animation: pulseGently 3s ease-in-out infinite;
}

@keyframes pulseGently {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.quiz-result-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
}

.score-display-box {
    animation: dialogueSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 900px) {
    .simulator-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar-help {
        order: 2;
    }
}

/* HAMBURGER MENU */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    cursor: pointer;
    z-index: 101;
    flex-shrink: 0;
}

.menu-toggle span {
    display: block;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.25s ease;
    transform-origin: center;
}

.menu-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
        padding: 0.85rem 1rem;
        position: relative;
    }

    .menu-toggle {
        display: flex;
    }

    #main-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0.3rem;
        padding: 0.75rem 0;
        border-top: 1px solid rgba(255,255,255,0.06);
        order: 3;
    }

    #main-nav.is-open {
        display: flex;
    }

    .nav-link {
        width: 100%;
        text-align: left;
        padding: 0.7rem 1rem;
        border-radius: 12px;
        font-size: 1rem;
    }

    .audio-toggle-btn {
        width: auto !important;
        align-self: flex-start;
    }

    .hero-title {
        font-size: 2.5rem;
    }
    
    .content-container {
        padding: 1rem;
    }
    
    .selection-card {
        padding: 1.8rem;
    }
    
    .stat-box {
        gap: 1.5rem;
    }
    
    .modal-content {
        padding: 2rem 1.5rem;
    }

    .quiz-mode-container {
        padding: 2rem 1.2rem;
        margin: 1rem 0;
    }

    .myth-game-screen {
        padding: 1.5rem 1rem;
        margin: 1rem 0;
    }

    .flip-card {
        height: 420px;
    }

    .flip-card-front, .flip-card-back {
        padding: 1.5rem 1rem;
    }

    .myth-action-buttons {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .myth-btn {
        width: 100%;
    }
}

/* ==========================================================================
   ONBOARDING
   ========================================================================== */
#onboarding-modal {
    z-index: 2000;
}

.onboarding-content {
    max-width: 520px;
    width: 100%;
    padding: 2.5rem 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: scaleUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Steps */
.onboarding-step {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    animation: fadeIn 0.3s ease-out;
}

.onboarding-step.active {
    display: flex;
}

.onboarding-step h2 {
    font-size: 1.8rem;
    margin: 0;
}

.onboarding-step p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 400px;
    margin: 0;
}

/* Step 1 */
.onboarding-logo {
    margin-bottom: 0.25rem;
    filter: drop-shadow(0 0 16px rgba(139, 92, 246, 0.4));
}

/* Step 2 */
.onboarding-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    text-align: left;
}

.onboarding-feature {
    display: grid;
    grid-template-columns: 36px 1fr;
    grid-template-rows: auto auto;
    column-gap: 0.75rem;
    row-gap: 0.15rem;
    align-items: start;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 0.9rem 1rem;
}

.onboarding-feature-icon {
    grid-row: 1 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 2px;
}

.onboarding-feature strong {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-family: var(--font-title);
}

.onboarding-feature span {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Step 3 */
.onboarding-final-icon {
    filter: drop-shadow(0 0 14px rgba(6, 182, 212, 0.35));
    margin-bottom: 0.25rem;
}

#btn-onboarding-start {
    margin-top: 0.5rem;
    padding: 0.8rem 2.5rem;
    font-size: 1rem;
}

/* Navigation */
.onboarding-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.onboarding-dots {
    display: flex;
    gap: 8px;
}

.onboarding-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    transition: all 0.25s ease;
    cursor: pointer;
}

.onboarding-dot.active {
    background: var(--accent-violet);
    width: 22px;
    border-radius: 4px;
}

.onboarding-btn-skip {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-title);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    transition: color 0.2s ease;
}

.onboarding-btn-skip:hover {
    color: var(--text-secondary);
}

.onboarding-btn-next {
    background: var(--accent-gradient);
    border: none;
    color: #fff;
    font-family: var(--font-title);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.onboarding-btn-next:hover {
    opacity: 0.85;
    transform: translateX(2px);
}

@media (max-width: 768px) {
    .onboarding-content {
        padding: 2rem 1.5rem 1.5rem;
    }

    .onboarding-step h2 {
        font-size: 1.5rem;
    }
}

/* ==========================================================================
   BANNER COOKIE / GDPR
   ========================================================================== */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    justify-content: center;
    pointer-events: none;
    animation: cookieSlideUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.cookie-banner.hidden {
    display: none !important;
}

.cookie-content {
    background: rgba(18, 10, 36, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    max-width: 800px;
    width: 100%;
    padding: 1.5rem 2rem;
    pointer-events: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(168, 85, 247, 0.15);
}

.cookie-text h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-family: var(--font-title);
    color: var(--accent-magenta);
    font-size: 1.15rem;
}

.cookie-text p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-color);
    line-height: 1.4;
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

@keyframes cookieSlideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .cookie-banner {
        bottom: 10px;
        left: 10px;
        right: 10px;
    }
    
    .cookie-content {
        flex-direction: column;
        padding: 1.2rem;
        text-align: center;
        gap: 15px;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   STILI DI ACCESSIBILITÀ (A11Y)
   ========================================================================== */
.a11y-toggle-btn {
    font-size: 1.1rem !important;
    padding: 0.5rem !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    width: 38px;
    height: 38px;
    margin-left: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.a11y-toggle-btn:hover {
    background: rgba(168, 85, 247, 0.2);
    border-color: var(--accent-magenta);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

.a11y-toggle-btn svg {
    width: 22px;
    height: 22px;
}

.a11y-menu-panel {
    position: absolute;
    top: 75px;
    right: 20px;
    width: 290px;
    padding: 1.5rem;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(6, 182, 212, 0.15);
    background: rgba(24, 15, 48, 0.96);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    animation: fadeInA11y 0.2s ease-out forwards;
}

.a11y-menu-panel.hidden {
    display: none !important;
}

.a11y-menu-panel h3 {
    margin: 0;
    font-size: 1.05rem;
    font-family: var(--font-title);
    color: var(--accent-cyan);
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
    text-align: left;
}

.a11y-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.a11y-option-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
}

.a11y-btn-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.a11y-btn-toggle[aria-pressed="true"] {
    background: var(--accent-cyan);
    color: #120a24;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
}

.a11y-option-size {
    border-top: 1px dashed rgba(255, 255, 255, 0.05);
    padding-top: 0.8rem;
}

.a11y-size-buttons {
    display: flex;
    gap: 5px;
    margin-top: 0.4rem;
}

.a11y-size-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.4rem 0.3rem;
    border-radius: 6px;
    font-size: 0.72rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.a11y-size-btn.active {
    background: var(--accent-magenta);
    color: white;
    border-color: var(--accent-magenta);
    box-shadow: 0 0 8px rgba(236, 72, 153, 0.4);
}

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

/* Evidenziazione per navigazione tastiera (Focus visibile) */
.a11y-toggle-btn:focus,
.nav-link:focus,
.btn-primary:focus,
.btn-secondary:focus,
.term-card:focus,
.game-card:focus,
.quiz-choice-btn:focus,
.myth-btn:focus,
.a11y-btn-toggle:focus,
.a11y-size-btn:focus,
button:focus,
a:focus {
    outline: 3px solid var(--accent-cyan) !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.6) !important;
}

/* Override Font Alta Leggibilità (Dislessia) */
body.dyslexia-mode {
    font-family: 'Atkinson Hyperlegible', sans-serif !important;
}

body.dyslexia-mode h1,
body.dyslexia-mode h2,
body.dyslexia-mode h3,
body.dyslexia-mode h4,
body.dyslexia-mode h5,
body.dyslexia-mode h6,
body.dyslexia-mode button,
body.dyslexia-mode span,
body.dyslexia-mode p,
body.dyslexia-mode a,
body.dyslexia-mode li,
body.dyslexia-mode input,
body.dyslexia-mode textarea {
    font-family: 'Atkinson Hyperlegible', sans-serif !important;
}

/* Dimensionamento Testo */
body.text-large {
    font-size: 1.15rem;
}
body.text-large h1, body.text-large .hero-title { font-size: 3rem !important; }
body.text-large h2 { font-size: 2.2rem !important; }
body.text-large h3 { font-size: 1.6rem !important; }
body.text-large p, body.text-large button, body.text-large span, body.text-large li { font-size: 1.05rem !important; }

body.text-xlarge {
    font-size: 1.3rem;
}
body.text-xlarge h1, body.text-xlarge .hero-title { font-size: 3.4rem !important; }
body.text-xlarge h2 { font-size: 2.5rem !important; }
body.text-xlarge h3 { font-size: 1.9rem !important; }
body.text-xlarge p, body.text-xlarge button, body.text-xlarge span, body.text-xlarge li { font-size: 1.18rem !important; }

/* Contrasto Elevato (High Contrast Mode) */
body.high-contrast-mode {
    background-color: #000000 !important;
    background-image: none !important;
    color: #ffffff !important;
}

body.high-contrast-mode .bg-gradient-glow {
    display: none !important;
}

body.high-contrast-mode .glass-panel,
body.high-contrast-mode header,
body.high-contrast-mode footer,
body.high-contrast-mode .a11y-menu-panel,
body.high-contrast-mode .modal-content {
    background: #000000 !important;
    border: 3px solid #ffffff !important;
    box-shadow: none !important;
    color: #ffffff !important;
}

body.high-contrast-mode h1, 
body.high-contrast-mode h2, 
body.high-contrast-mode h3, 
body.high-contrast-mode h4,
body.high-contrast-mode .selector-heading,
body.high-contrast-mode .hero-title {
    color: #00ffff !important; /* Cyan puro ad altissimo contrasto */
    text-shadow: none !important;
}

body.high-contrast-mode .text-gradient {
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    color: #ff00ff !important; /* Magenta puro ad altissimo contrasto */
}

body.high-contrast-mode .btn-primary {
    background: #000000 !important;
    border: 3px solid #ff00ff !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

body.high-contrast-mode .btn-primary:hover {
    background: #ff00ff !important;
    color: #000000 !important;
    font-weight: 800;
}

body.high-contrast-mode .btn-secondary {
    background: #000000 !important;
    border: 3px solid #ffffff !important;
    color: #ffffff !important;
}

body.high-contrast-mode .btn-secondary:hover {
    background: #ffffff !important;
    color: #000000 !important;
    font-weight: 800;
}

body.high-contrast-mode .a11y-size-btn.active {
    background: #ff00ff !important;
    color: #000000 !important;
    border-color: #ff00ff !important;
}

body.high-contrast-mode .a11y-btn-toggle[aria-pressed="true"] {
    background: #00ffff !important;
    color: #000000 !important;
    border-color: #00ffff !important;
}

body.high-contrast-mode .nav-link {
    color: #ffffff !important;
    opacity: 0.8;
}

body.high-contrast-mode .nav-link.active {
    color: #00ffff !important;
    opacity: 1;
    border-bottom: 3px solid #00ffff !important;
}

body.high-contrast-mode .doodle-logo-svg,
body.high-contrast-mode .doodle-icon,
body.high-contrast-mode svg {
    color: #ffffff !important;
    filter: drop-shadow(0 0 1px #ffffff);
}

/* ==========================================================================
   STILI GIOCO "LE PAROLE GIUSTE"
   ========================================================================== */
.chat-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.chat-bubble {
    position: relative;
    max-width: 85%;
    padding: 1.2rem 1.5rem;
    border-radius: 20px;
    font-size: 1.05rem;
    line-height: 1.5;
    font-weight: 500;
    margin-bottom: 0.5rem;
    border: 3px solid var(--text-color);
}

.chat-bubble.received {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.2);
    border-bottom-left-radius: 4px;
    color: var(--text-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.chat-sender {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--accent-magenta);
    margin-bottom: 0.4rem;
    letter-spacing: 1px;
}

.words-options-container {
    margin-top: 0.5rem;
}

.words-options-container .quiz-choice-btn {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    width: 100%;
}

.words-options-container .quiz-choice-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent-magenta);
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.3);
    transform: translateY(-2px);
}

.words-options-container .quiz-choice-btn.correct-choice {
    background: rgba(34, 197, 94, 0.15) !important;
    border-color: #22c55e !important;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.3) !important;
}

.words-options-container .quiz-choice-btn.wrong-choice {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3) !important;
}

/* High Contrast Mode for Choice Buttons */
body.high-contrast-mode .words-options-container .quiz-choice-btn {
    background: #000000 !important;
    border: 3px solid #ffffff !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

body.high-contrast-mode .words-options-container .quiz-choice-btn:hover {
    background: #ffffff !important;
    color: #000000 !important;
}

body.high-contrast-mode .words-options-container .quiz-choice-btn.correct-choice {
    border-color: #00ff00 !important;
    color: #00ff00 !important;
}

body.high-contrast-mode .words-options-container .quiz-choice-btn.wrong-choice {
    border-color: #ff0000 !important;
    color: #ff0000 !important;
}

.words-explanation-panel {
    background: rgba(18, 10, 36, 0.7);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    animation: fadeInA11y 0.3s ease-out forwards;
}

.words-explanation-panel.hidden {
    display: none !important;
}

.explanation-status {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 1px;
}

.explanation-status.correct {
    color: #22c55e;
}

.explanation-status.wrong {
    color: #ef4444;
}

/* Override contrasto elevato per bolle di chat e spiegazioni */
body.high-contrast-mode .chat-bubble.received,
body.high-contrast-mode .words-explanation-panel {
    background: #000000 !important;
    border: 3px solid #ffffff !important;
    color: #ffffff !important;
}


