/* Studenti-v2.css - Arena design 2026 */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Sora:wght@400;600;700;800&display=swap');

:root {
    --blu: #0a1a52;
    --rosso: #e11d2a;
    --oro: #f2b515;
    --grigio: #eef0f6;
    --bianco: #ffffff;
    --verde: #1f9d57;
    --giallo: #ffc107;
    --viola: #6f42c1;
    --arancio: #fd7e14;
    --navy-ink: #060f33;
    --navy-700: #14235f;
    --red-deep: #b3121d;
    --gold-deep: #c98a06;
}

body {
    font-family: 'Manrope', 'Segoe UI', system-ui, sans-serif;
    background: var(--grigio);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: auto;
    padding: 20px;
}

/* Sezione pubblica nascosta nel design Arena (i link legali sono in .login-legal) */
.sezione-pubblica {
    display: none;
}

/* ================================================================
   LOGIN SCREEN — Arena design 2026
   ================================================================ */

.login-screen {
    max-width: 430px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.login-hero {
    background: linear-gradient(112deg, var(--blu) 0%, var(--blu) 56%, var(--red-deep) 56%, var(--rosso) 100%);
    clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
    padding: 52px 24px 76px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-logo-wrap {
    padding: 6px;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(242,181,21,.45), rgba(225,29,42,.28));
    margin-bottom: 16px;
}

.login-logo-img {
    width: 84px;
    height: 84px;
    border-radius: 22px;
    display: block;
}

.login-brand {
    font-family: 'Sora', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.login-tagline {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    font-weight: 500;
}

.login-body {
    padding: 24px 22px 32px;
    flex: 1;
}

/* Tab switcher Accedi / Registrati */
.login-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.login-tab {
    flex: 1;
    padding: 11px 0;
    border-radius: 12px;
    background: #eef0f6;
    font-weight: 700;
    font-size: 15px;
    text-align: center;
    cursor: pointer;
    color: #7b819b;
    transition: background 0.2s, color 0.2s;
    user-select: none;
}

.login-tab.active {
    background: var(--blu);
    color: #fff;
}

/* Campo icona — supporta sia emoji che Lucide SVG */
.field-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9aa0bd;
    opacity: 1;
    flex-shrink: 0;
    font-size: 16px;
    line-height: 1;
}

.field-icon svg {
    width: 19px;
    height: 19px;
    stroke-width: 2px;
    display: block;
}

/* Campi con icona */
.field-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f4f5fa;
    border: 1.5px solid #e6e8f1;
    border-radius: 16px;
    padding: 15px 16px;
    margin-bottom: 12px;
    transition: border-color 0.2s;
}

.field-wrap:focus-within {
    border-color: var(--blu);
    background: #fff;
}


.field-wrap input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 15px;
    font-family: 'Manrope', sans-serif;
    color: #141a33;
}

.field-wrap input::placeholder {
    color: #9aa0bd;
}

/* CTA button */
.auth-btn {
    width: 100%;
    background: linear-gradient(135deg, #ff5a64, var(--rosso));
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 16px;
    cursor: pointer;
    font-weight: 800;
    font-size: 16px;
    font-family: 'Sora', sans-serif;
    box-shadow: 0 12px 28px rgba(225,29,42,0.28);
    transition: opacity 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    box-sizing: border-box;
}

.auth-btn:hover {
    opacity: 0.9;
}

/* Campi form di registrazione (senza icona wrap) */
#register-form input {
    display: block;
    width: 100%;
    padding: 15px 16px;
    margin-bottom: 12px;
    border-radius: 16px;
    border: 1.5px solid #e6e8f1;
    background: #f4f5fa;
    box-sizing: border-box;
    font-size: 15px;
    font-family: 'Manrope', sans-serif;
    color: #141a33;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

#register-form input::placeholder {
    color: #9aa0bd;
}

#register-form input:focus {
    border-color: var(--blu);
    background: #fff;
}

.reg-warning {
    margin: -4px 0 12px 4px;
    font-size: 12px;
    color: #e67e00;
    font-style: italic;
}

.forgot-link {
    display: block;
    text-align: center;
    color: #7b819b;
    font-size: 13px;
    margin-top: 16px;
    cursor: pointer;
}

.forgot-link:hover {
    color: var(--blu);
}

.login-tab-link {
    display: block;
    text-align: center;
    color: #7b819b;
    font-size: 13px;
    margin-top: 16px;
    cursor: pointer;
    text-decoration: underline;
}

.login-legal {
    text-align: center;
    font-size: 12px;
    color: #9aa0bd;
    margin-top: 28px;
}

.login-legal a {
    color: #7b819b;
    text-decoration: none;
}

.login-legal a:hover {
    color: var(--blu);
    text-decoration: underline;
}

/* Schermate verifica email / in attesa */
#messaggio-verifica-email,
#messaggio-abilitazione {
    max-width: 430px;
    margin: 60px auto 0;
    padding: 32px 24px;
    text-align: center;
}

#messaggio-verifica-email h3,
#messaggio-abilitazione h3 {
    color: var(--blu);
    font-family: 'Sora', sans-serif;
    font-size: 22px;
}

.toggle-link {
    display: none;
}

header {
    background: var(--blu);
    color: white;
    padding: 10px 12px;
    border-radius: 8px;
    position: relative;
    border-bottom: 5px solid var(--rosso);
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 0;
}

.header-nome {
    font-weight: bold;
    font-size: 1em;
    opacity: 1;
}

/* Hamburger button */
.hamburger-btn {
    flex-shrink: 0;
    background: white;
    border: none;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.hamburger-btn:hover {
    background: #f0f0f0;
}

.hamburger-icon-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 6px;
    display: block;
}

.hamburger-label {
    font-size: 10px;
    font-weight: bold;
    color: var(--blu);
    letter-spacing: 0.05em;
}

/* Dropdown menu */
.hamburger-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    z-index: 200;
    min-width: 200px;
    overflow: hidden;
    flex-direction: column;
}

.hamburger-menu.open {
    display: flex;
}

.header-nav-btn {
    background: white;
    color: var(--blu);
    border: none;
    border-bottom: 1px solid #f0f0f0;
    padding: 14px 20px;
    text-align: left;
    border-radius: 0;
    font-size: 15px;
    font-weight: bold;
    width: 100%;
    cursor: pointer;
}

.header-nav-btn:hover {
    background: var(--grigio);
}

.header-nav-btn.active {
    background: var(--blu);
    color: white;
}

.hamburger-divider {
    height: 1px;
    background: #ddd;
}

.hamburger-esci {
    color: var(--rosso);
    border-bottom: none;
}

.hamburger-esci:hover {
    background: #fff0f0;
    color: var(--rosso);
}

/* Overlay trasparente per chiudere il menu cliccando fuori */
.hamburger-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 199;
}

.hamburger-overlay.open {
    display: block;
}

.back-btn {
    background: var(--bianco);
    color: var(--blu);
    border: 1px solid var(--blu);
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    margin-bottom: 15px;
    display: block;
    width: 100%;
    text-align: center;
}

#box-avviso {
    background: var(--arancio);
    color: white;
    padding: 12px 15px;
    border-radius: 8px;
    margin: 0;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    position: relative;
    user-select: none;
}

.annunci-titolo {
    flex: 1;
    text-align: center;
    transition: opacity 0.4s ease;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.annunci-titolo.annunci-fade-out {
    opacity: 0;
}

.annunci-freccia {
    font-size: 11px;
    opacity: 0.8;
    flex-shrink: 0;
}

.annunci-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e53935;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    font-weight: bold;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.pannello-annunci {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    z-index: 1000;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.pannello-annunci.ha-scroll::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 52px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.97));
    pointer-events: none;
    z-index: 2;
}

@keyframes rimbalza {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(5px); }
}

.pannello-scroll-arrow {
    display: none;
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 22px;
    color: var(--arancio);
    pointer-events: none;
    z-index: 3;
    animation: rimbalza 0.9s ease-in-out infinite;
    line-height: 1;
}

.pannello-annunci.ha-scroll .pannello-scroll-arrow {
    display: block;
}

.pannello-annunci-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--arancio);
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.pannello-annunci-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.pannello-annunci-lista {
    max-height: 60vh;
    overflow-y: auto;
}

.pannello-annuncio-item {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.pannello-annuncio-item:last-child {
    border-bottom: none;
}

.pannello-annuncio-titolo {
    font-weight: bold;
    font-size: 14px;
    color: #1a237e;
    margin-bottom: 4px;
}

.pannello-annuncio-testo {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
    margin-bottom: 6px;
}

.pannello-annuncio-link {
    display: inline-block;
    color: var(--arancio);
    font-size: 12px;
    font-weight: bold;
    text-decoration: none;
    border: 1px solid var(--arancio);
    padding: 4px 10px;
    border-radius: 4px;
    margin-top: 4px;
}

/* Gamification */
.xp-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-left: 8px solid var(--oro);
    cursor: pointer;
    transition: 0.2s;
}

.xp-section:hover {
    background: #fffdf0;
}

.xp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.xp-bar-bg {
    background: #eee;
    height: 16px;
    border-radius: 8px;
    overflow: hidden;
}

.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--oro), #ffb700);
    transition: width 0.8s ease-out;
}

.user-stats {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-badge {
    background: white;
    padding: 10px 15px;
    border-radius: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-weight: bold;
    color: var(--blu);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

/* MODAL PLAYER VIDEO - FIX MOBILE */
#video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.98);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.modal-player-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.mobile-close-btn {
    width: 100%;
    background: var(--rosso);
    color: white;
    padding: 18px 0;
    text-align: center;
    font-weight: bold;
    font-size: 18px;
    border: none;
    cursor: pointer;
    z-index: 10001;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.modal-content-player {
    width: 100%;
    max-width: 950px;
    aspect-ratio: 16/9;
    background: black;
    margin: auto;
    position: relative;
}

#xp-status-msg {
    color: var(--oro);
    padding: 15px;
    font-weight: bold;
    text-align: center;
    font-size: 18px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Discipline */
.disciplina-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.disciplina-card {
    background: var(--blu);
    color: white;
    padding: 40px 20px;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2em;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.disciplina-card:hover {
    transform: translateY(-5px);
    background: var(--rosso);
}

/* Video Card */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd;
}

.video-card.bloccato {
    opacity: 0.6;
    filter: grayscale(1);
}

.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 10;
    pointer-events: none;
}

.lock-text {
    font-size: 10px;
    background: rgba(0,0,0,0.8);
    padding: 4px 8px;
    border-radius: 20px;
    margin-top: 5px;
    font-weight: bold;
}

/* Icona Cuore — posizione top-right */
.fav-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    left: auto;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #bbb;
    z-index: 15;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.fav-btn.active {
    color: var(--rosso);
    transform: scale(1.1);
}

.video-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.video-info {
    padding: 12px;
    flex-grow: 1;
}

.video-title {
    font-weight: bold;
    color: var(--blu);
    font-size: 0.95em;
    line-height: 1.3;
}

.grado-separatore {
    width: 100%;
    color: var(--blu);
    border-bottom: 3px solid var(--oro);
    padding-bottom: 8px;
    margin: 40px 0 20px;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: bold;
}

.progress-mini-container {
    width: 100px;
    background: #eee;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
}

.progress-mini-bar {
    height: 100%;
    background: var(--verde);
    transition: width 0.5s;
}

.search-input {
    width: 100%;
    padding: 18px 25px;
    border-radius: 35px;
    border: 2px solid var(--blu);
    font-size: 17px;
    box-sizing: border-box;
    margin-bottom: 25px;
    outline: none;
}

/* Modal Livelli */
.custom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 1100;
    justify-content: center;
    align-items: center;
}

.modal-content-livelli {
    background: white;
    width: 90%;
    max-width: 480px;
    padding: 25px;
    border-radius: 15px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}

.modal-punti-utente {
    text-align: center;
    font-weight: bold;
    color: var(--blu);
    margin: 0 0 20px 0;
    padding: 12px;
    background: var(--grigio);
    border-radius: 8px;
    font-size: 15px;
}

.livello-row {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.livello-row.attuale {
    background: var(--oro);
    color: var(--blu);
    font-weight: bold;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#messaggio-abilitazione {
    background: #fff3cd;
    color: #856404;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    margin: 50px 15px;
    border: 1px solid #ffeeba;
}

.hidden {
    display: none;
}

/* Pagina Impostazioni */
.impostazioni-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-left: 8px solid var(--blu);
    margin-top: 15px;
}

.impostazioni-campo {
    margin-bottom: 22px;
}

.impostazioni-campo label {
    display: block;
    font-weight: bold;
    color: var(--blu);
    margin-bottom: 8px;
}

.impostazioni-campo .search-input {
    margin-bottom: 8px;
}

.hint {
    font-size: 12px;
    color: #666;
    margin-top: 6px;
}

.avviso-nickname {
    font-size: 13px;
    margin-top: 8px;
}

.avviso-nickname.avviso-warning {
    color: var(--arancio);
    font-weight: bold;
}

/* Pagina Classifica */
.classifica-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-left: 8px solid var(--oro);
    margin-top: 15px;
}

.classifica-sottotitolo {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

.tabella-classifica {
    width: 100%;
    border-collapse: collapse;
}

.tabella-classifica th,
.tabella-classifica td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.tabella-classifica th {
    background: var(--grigio);
    color: var(--blu);
    font-weight: bold;
}

.tabella-classifica tbody tr:hover {
    background: #fafafa;
}

.classifica-riga-io {
    background: #fff9e6;
    font-weight: bold;
}

.badge-io {
    background: var(--blu);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin-left: 6px;
}

.classifica-privati {
    margin-top: 20px;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

/* Pagina Percorso (tecniche apprese, sola lettura) */
.percorso-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-left: 8px solid var(--viola);
    margin-top: 15px;
}

.percorso-intro {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 18px;
}

.percorso-lista {
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
}


.percorso-meta {
    font-size: 12px;
    color: #666;
}

.percorso-vuoto {
    font-size: 14px;
    color: #666;
    padding: 16px;
    margin: 0;
}

.percorso-disciplina {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.percorso-disciplina-titolo {
    background: var(--blu);
    color: white;
    padding: 12px 16px;
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}

.percorso-grado {
    border-bottom: 1px solid #eee;
}

.percorso-grado:last-child {
    border-bottom: none;
}

.percorso-grado-titolo {
    background: var(--viola);
    color: white;
    padding: 8px 16px;
    margin: 0;
    font-size: 16px;
    font-weight: bold;
}

.percorso-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
    vertical-align: middle;
}

.percorso-badge.appresa {
    background: var(--verde);
}

.percorso-badge.non-appresa {
    background: var(--rosso);
}

/* ========== QUIZ ========== */
#vista-quiz {
    padding: 20px;
    max-width: 700px;
    margin: 0 auto;
}

.quiz-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
}

.quiz-suoni-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: bold;
    color: var(--blu);
    cursor: pointer;
    user-select: none;
}

.quiz-suoni-toggle input {
    width: auto;
    margin: 0;
    cursor: pointer;
}

/* Arena override — push right, custom toggle pill */
.quiz-suoni-toggle {
    margin-left: auto;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
}

.quiz-suoni-toggle input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 34px;
    height: 20px;
    border-radius: 999px;
    background: #d8dce8;
    border: none;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: background 0.2s;
    margin: 0;
}

.quiz-suoni-toggle input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.20);
    transition: transform 0.2s;
}

.quiz-suoni-toggle input[type="checkbox"]:checked {
    background: var(--verde);
}

.quiz-suoni-toggle input[type="checkbox"]:checked::after {
    transform: translateX(14px);
}

.quiz-azioni-top {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
}

.quiz-regole-testo p {
    margin: 12px 0;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
}

#quiz-griglia-categorie {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
}

.quiz-categoria-btn {
    background: var(--blu);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    font-size: 15px;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.quiz-categoria-icona {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.quiz-categoria-btn:hover {
    background: var(--viola);
    transform: scale(1.02);
}

#quiz-domanda-wrap {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-left: 6px solid var(--blu);
}

#quiz-categoria-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

#quiz-domanda-testo {
    font-size: 18px;
    font-weight: bold;
    color: #222;
    margin-bottom: 20px;
    line-height: 1.4;
}

.quiz-timer-wrap {
    height: 12px;
    background: var(--grigio);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
}

.quiz-timer-bar-bg {
    height: 100%;
    width: 100%;
    overflow: hidden;
    border-radius: 6px;
}

#quiz-timer-bar {
    height: 100%;
    min-height: 12px;
    background: var(--blu);
    width: 100%;
    transition: width 1s linear;
    display: block;
}

#quiz-timer-secondi {
    text-align: right;
    font-size: 14px;
    color: #666;
    margin-top: 4px;
}

#quiz-opzioni {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiz-opzione-btn {
    background: var(--grigio);
    border: 2px solid #ddd;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 16px;
    text-align: left;
    cursor: pointer;
    transition: 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.quiz-opzione-btn:focus,
.quiz-opzione-btn:focus-visible {
    outline: none;
    box-shadow: none;
}

@media (hover: hover) {
    .quiz-opzione-btn:hover {
        border-color: var(--blu);
        background: #e8e8ff;
    }
}

#quiz-feedback-wrap {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    text-align: center;
}

#quiz-feedback-titolo {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
}

#quiz-feedback-messaggio {
    color: #555;
    margin-bottom: 12px;
}

#quiz-feedback-riepilogo {
    background: #f0f7f0;
    border-left: 4px solid var(--verde);
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 16px;
    text-align: left;
}

#quiz-feedback-domanda-testo {
    color: #333;
    margin-bottom: 6px;
}

#quiz-feedback-risposta-corretta {
    font-weight: bold;
    color: var(--verde);
    margin: 0;
}

#quiz-feedback-avanti-btn {
    background: var(--blu);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 28px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 4px;
}

#quiz-feedback-avanti-btn:hover {
    opacity: 0.88;
}

#quiz-nessuna-domanda {
    background: #fff9e6;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #ffeeba;
}

#quiz-nessuna-domanda p {
    margin: 0 0 16px 0;
    color: #856404;
}

/* Pulsante Reset Quiz in header quiz */
.quiz-btn-reset {
    background: var(--arancio);
}

.quiz-btn-reset:hover {
    background: #e06c00;
}

/* Modal Reset Quiz */
.modal-reset-quiz .quiz-reset-intro {
    text-align: center;
    font-size: 15px;
    color: #333;
    margin: 0 0 20px 0;
    padding: 12px;
    background: #f0f8ff;
    border-radius: 8px;
    border-left: 4px solid var(--blu);
}

.quiz-reset-categorie-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
    max-height: 220px;
    overflow-y: auto;
}

.quiz-reset-categoria-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    color: var(--blu);
    padding: 8px 0;
}

.quiz-reset-categoria-cb {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
}

.modal-reset-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.auth-btn-secondary {
    background: #f4f5fa;
    color: var(--blu);
    box-shadow: none;
}

.auth-btn-secondary:hover {
    background: #e6e8f1;
    opacity: 1;
}

/* Vista Punti BudoCam */
.punti-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.punti-sezione {
    border-top: 1px solid #eee;
    padding-top: 16px;
    margin-top: 16px;
}

.punti-riga {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.punti-riga:last-child {
    border-bottom: none;
}

.punti-badge {
    flex-shrink: 0;
    font-weight: bold;
    font-size: 14px;
    padding: 4px 10px;
    border-radius: 20px;
    min-width: 40px;
    text-align: center;
}

.punti-badge-verde {
    background: #e8f5e9;
    color: var(--verde);
}

.punti-badge-rosso {
    background: #ffebee;
    color: var(--rosso);
}

/* Vista Home - profilo studente */
.home-card {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.home-card-titolo {
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    margin-bottom: 10px;
}

.home-card-sottotitolo {
    font-weight: bold;
    font-size: 11px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.home-card-profilo {
    border-left: 5px solid var(--blu);
}

.home-profilo-nome {
    font-size: 22px;
    font-weight: bold;
    color: var(--blu);
    margin-bottom: 4px;
}

.home-profilo-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 12px;
}

.home-discipline-lista {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.home-disciplina-riga {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: var(--grigio);
    border-radius: 8px;
    font-size: 14px;
}

.home-disciplina-nome {
    font-weight: bold;
    color: var(--blu);
}

.home-disciplina-grado {
    font-size: 12px;
    color: #666;
}

.home-xp-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
}

.home-xp-numero {
    font-size: 24px;
    font-weight: bold;
    color: var(--blu);
}

.home-xp-livello {
    font-size: 12px;
    background: var(--blu);
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: bold;
}

.home-prossimo-livello {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

.home-classifica-pos {
    font-size: 13px;
    color: var(--viola);
    font-weight: bold;
    margin-top: 8px;
}

.home-stat-riga {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.home-stat-riga:last-child {
    border-bottom: none;
}

.home-stat-riga span:last-child {
    font-weight: bold;
    color: var(--blu);
}

.home-stat-small {
    font-size: 12px;
    color: #666;
}

.home-stat-small span:last-child {
    color: #555;
}

.home-quiz-cat-riga {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 12px;
}

.home-quiz-cat-nome {
    flex: 0 0 160px;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-quiz-cat-bar-wrap {
    flex: 1;
    background: #eee;
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}

.home-quiz-cat-bar {
    height: 100%;
    background: var(--verde);
    border-radius: 4px;
    transition: width 0.5s ease-out;
}

.home-quiz-cat-perc {
    flex: 0 0 50px;
    text-align: right;
    color: #888;
    font-size: 11px;
}

/* ================================================================
   ARENA APP LAYOUT — Area Protetta
   ================================================================ */

#area-protetta.container {
    max-width: 430px;
    padding: 0;
    padding-bottom: 68px;
}

/* Header: mostra solo la barra annunci, nasconde il resto */
#area-protetta > header {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin-bottom: 0;
    min-height: 0;
    border-radius: 0;
    gap: 0;
}

.hamburger-btn,
#hamburger-menu,
#hamburger-overlay { display: none !important; }

/* Annunci — padded e con border-radius Arena */
#box-annunci-wrap { padding: 10px 14px 0; }
#box-avviso { border-radius: 14px; font-size: 14px; }

/* ================================================================
   ARENA HOME — Hero bicolore diagonale
   ================================================================ */

.arena-home-hero {
    background: linear-gradient(112deg, var(--blu) 0%, var(--blu) 56%, var(--red-deep) 56%, var(--rosso) 100%);
    clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
    padding: 18px 20px 72px;
}

.arena-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.arena-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.arena-avatar-wrap {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: rgba(255,255,255,0.14);
    border: 1.5px solid rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.arena-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.arena-greet-col {
    display: flex;
    flex-direction: column;
}

.arena-greet-label {
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    font-weight: 600;
}

.arena-greet-nome {
    color: #fff;
    font-family: 'Sora', sans-serif;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.arena-streak-pill {
    background: rgba(255,255,255,0.14);
    color: #fff;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(255,255,255,0.2);
}

/* XP Ring */
.arena-xp-center {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.arena-ring-wrap {
    position: relative;
    width: 132px;
    height: 132px;
}

.arena-xp-ring {
    width: 132px;
    height: 132px;
    transform: rotate(-90deg);
    display: block;
}

.arena-ring-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.arena-ring-points {
    font-family: 'Sora', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    letter-spacing: -0.02em;
}

.arena-ring-sub {
    color: rgba(255,255,255,0.75);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-top: 2px;
}

.arena-level-badge {
    margin-top: -6px;
    background: linear-gradient(135deg, #ffd75e, var(--oro));
    color: #5a3d00;
    padding: 6px 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 12px rgba(242,181,21,0.35);
}

.arena-next-level-text {
    color: rgba(255,255,255,0.75);
    font-size: 12px;
    font-weight: 500;
    margin-top: 8px;
    text-align: center;
}

/* ================================================================
   ARENA HOME — Body
   ================================================================ */

.arena-home-body {
    padding: 0 14px 16px;
    margin-top: -36px;
    position: relative;
    z-index: 1;
}

/* Medals: 3 colonne */
.arena-medals-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.arena-medal-cell {
    background: #fff;
    border-radius: 20px;
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    box-shadow: 0 8px 24px rgba(20,26,51,0.09);
}

.arena-medal-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.arena-medal-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 2px;
}

.arena-medal-video .arena-medal-icon { background: rgba(10,26,82,0.08); color: var(--blu); }
.arena-medal-heart .arena-medal-icon { background: rgba(225,29,42,0.1); color: var(--rosso); }
.arena-medal-quiz  .arena-medal-icon { background: rgba(31,157,87,0.12); color: var(--verde); }

.arena-medal-val {
    font-family: 'Sora', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--blu);
    line-height: 1;
}

.arena-medal-lbl {
    font-size: 11px;
    font-weight: 600;
    color: #7b819b;
    text-align: center;
}

/* Card base */
.arena-card {
    background: #fff;
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 8px 24px rgba(20,26,51,0.07);
}

.arena-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.arena-card-title {
    font-family: 'Sora', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--blu);
}

.arena-card-link {
    background: none;
    border: none;
    color: var(--rosso);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

/* Discipline list restyled per Arena */
#vista-home .home-discipline-lista {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#vista-home .home-disciplina-riga {
    background: #f4f5fa;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 14px;
}

#vista-home .home-disciplina-nome {
    font-weight: 700;
    color: var(--blu);
}

#vista-home .home-disciplina-grado {
    font-size: 12px;
    color: #7b819b;
}

/* Classifica CTA card */
.arena-cta-card {
    background: var(--blu);
    padding: 18px 16px;
}

.arena-classifica-pos {
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    text-align: center;
}

.arena-navy-btn {
    width: 100%;
    background: #fff;
    color: var(--blu);
    border: none;
    padding: 14px 16px;
    border-radius: 14px;
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    transition: opacity 0.2s;
}

.arena-navy-btn:hover {
    opacity: 0.9;
}

.arena-cooling-badge {
    font-size: 12px;
    color: #7b819b;
    font-weight: 600;
}

/* Quiz categories per Arena */
#vista-home .home-quiz-cat-riga {
    border-bottom: 1px solid #f0f0f0;
    padding: 7px 0;
}

#vista-home .home-quiz-cat-bar-wrap {
    background: #eef0f6;
    border-radius: 4px;
}

#vista-home .home-quiz-cat-bar {
    background: linear-gradient(90deg, var(--verde), #24b869);
}

/* ================================================================
   ARENA BOTTOM NAVIGATION
   ================================================================ */

.arena-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    background: #fff;
    border-top: 1px solid #e6e8f1;
    display: flex;
    align-items: stretch;
    z-index: 500;
    padding: 8px 4px 12px;
    box-sizing: border-box;
    box-shadow: 0 -4px 20px rgba(20,26,51,0.08);
}

.arena-nav-item {
    flex: 1;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 4px 0;
}

.arena-nav-icon {
    font-size: 22px;
    line-height: 1;
    color: #9aa0bd;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.arena-nav-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 2px;
}

.arena-nav-label {
    font-size: 10px;
    font-weight: 700;
    color: #9aa0bd;
    font-family: 'Sora', sans-serif;
    transition: color 0.2s;
}

.arena-nav-item.active .arena-nav-icon {
    color: var(--blu);
}

.arena-nav-item.active .arena-nav-icon svg {
    stroke-width: 2.4px;
}

.arena-nav-item.active .arena-nav-label {
    color: var(--blu);
}

/* ================================================================
   ARENA VIEW HEADER — comune a tutte le viste (tranne home)
   ================================================================ */

.arena-view-header {
    background: linear-gradient(112deg, var(--blu) 0%, var(--blu) 56%, var(--red-deep) 56%, var(--rosso) 100%);
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
    padding: 20px 20px 50px;
    color: #fff;
}

/* Riga principale: icon+titolo a sinistra, elemento opzionale a destra */
.arena-view-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.arena-view-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.arena-view-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--oro);
    flex-shrink: 0;
}

.arena-view-header-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 2px;
}

.arena-view-header-title {
    font-family: 'Sora', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
}

.arena-view-header-sub {
    color: rgba(255,255,255,0.82);
    font-size: 13px;
    font-weight: 500;
    margin-top: 8px;
}

/* Grado nella classifica: stile come pill quando il JS lo popola */
#classifica-sottotitolo:not(:empty) {
    display: inline-block;
    background: rgba(255,255,255,0.16);
    color: #fff;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

/* Wrapper con padding per il contenuto sotto l'header */
.arena-grid-wrap {
    padding: 0 14px 16px;
    margin-top: -20px;
    position: relative;
    z-index: 1;
}

/* ================================================================
   ARENA QUIZ
   ================================================================ */

#vista-quiz {
    padding: 0;
    max-width: 430px;
    margin: 0 auto;
}

.quiz-header-actions {
    background: #fff;
    border-radius: 16px;
    padding: 10px 14px;
    margin-bottom: 12px;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(20,26,51,0.07);
    flex-wrap: wrap;
}

.quiz-btn-regole {
    background: rgba(10,26,82,0.07);
    color: var(--blu);
    border: none;
    border-radius: 10px;
    padding: 9px 13px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Manrope', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.quiz-btn-reset {
    background: rgba(253,126,20,0.1);
    color: var(--arancio);
}

.quiz-btn-regole:hover { background: rgba(10,26,82,0.13); }
.quiz-btn-reset:hover  { background: rgba(253,126,20,0.2); color: var(--arancio); }

#quiz-scelta-categoria {
    background: #fff;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(20,26,51,0.07);
    border: none;
}

#quiz-scelta-categoria h2 {
    font-family: 'Sora', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: var(--blu);
    margin: 0 0 4px;
    padding: 0;
    border: none;
}

#quiz-griglia-categorie {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 12px 0 0;
}

.quiz-categoria-btn {
    background: #f4f5fa;
    color: var(--blu);
    border: none;
    padding: 14px 12px;
    border-radius: 16px;
    font-weight: 700;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
    font-family: 'Manrope', sans-serif;
}

.quiz-categoria-btn:hover {
    background: var(--blu);
    color: #fff;
    transform: translateY(-2px);
}

#quiz-domanda-wrap {
    background: #fff;
    border-radius: 20px;
    padding: 16px;
    border: none;
    box-shadow: 0 8px 24px rgba(20,26,51,0.08);
}

.back-btn {
    background: #f4f5fa;
    color: var(--blu);
    border: none;
    border-radius: 12px;
    padding: 10px 16px;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
    text-align: left;
}

#quiz-categoria-label {
    background: rgba(111,66,193,0.1);
    color: var(--viola);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

#quiz-domanda-testo {
    font-family: 'Sora', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #141a33;
    line-height: 1.4;
    margin: 0 0 16px;
}

.quiz-timer-wrap {
    background: #eef0f6;
    border-radius: 8px;
    height: 8px;
    overflow: visible;
    margin-bottom: 6px;
    position: relative;
}

.quiz-timer-bar-bg {
    height: 8px;
    border-radius: 8px;
    overflow: hidden;
}

#quiz-timer-bar {
    height: 8px;
    background: linear-gradient(90deg, var(--viola), var(--blu));
    border-radius: 8px;
    transition: width 1s linear;
}

#quiz-timer-secondi {
    display: block;
    text-align: right;
    font-size: 12px;
    font-weight: 700;
    color: var(--blu);
    margin-top: 4px;
    margin-bottom: 14px;
}

#quiz-opzioni {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiz-opzione-btn {
    background: #f4f5fa;
    border: 2px solid transparent;
    padding: 15px 16px;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    color: #141a33;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    font-family: 'Manrope', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

.quiz-opzione-btn:focus,
.quiz-opzione-btn:focus-visible { outline: none; box-shadow: none; }

@media (hover: hover) {
    .quiz-opzione-btn:not(:disabled):hover {
        border-color: var(--blu);
        background: #eef0f6;
    }
}

.quiz-opzione-btn.corretto {
    background: rgba(31,157,87,0.1);
    border-color: var(--verde);
    color: #15703f;
    font-weight: 700;
}

.quiz-opzione-btn.sbagliato {
    background: rgba(225,29,42,0.08);
    border-color: var(--rosso);
    color: var(--rosso);
}

#quiz-feedback-wrap {
    background: #fff;
    border-radius: 20px;
    padding: 22px 16px;
    box-shadow: 0 8px 24px rgba(20,26,51,0.08);
    text-align: center;
}

#quiz-feedback-titolo {
    font-family: 'Sora', sans-serif;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
}

#quiz-feedback-messaggio {
    font-size: 14px;
    color: #7b819b;
    line-height: 1.5;
    margin-bottom: 14px;
}

#quiz-feedback-riepilogo {
    background: rgba(31,157,87,0.08);
    border-left: 4px solid var(--verde);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
    text-align: left;
}

#quiz-feedback-domanda-testo {
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
    font-weight: 600;
}

#quiz-feedback-risposta-corretta {
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: var(--verde);
    margin: 0;
}

#quiz-feedback-avanti-btn {
    background: var(--blu);
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 14px 32px;
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    margin-top: 8px;
    transition: opacity 0.2s;
}

#quiz-feedback-avanti-btn:hover { opacity: 0.88; }

#quiz-nessuna-domanda {
    background: #fff;
    border-radius: 20px;
    padding: 22px 16px;
    text-align: center;
    border: none;
    box-shadow: 0 8px 24px rgba(20,26,51,0.07);
}

#quiz-nessuna-domanda h2 {
    font-family: 'Sora', sans-serif;
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 10px;
}

#quiz-nessuna-domanda p {
    font-size: 14px;
    color: #7b819b;
    line-height: 1.55;
    margin: 0 0 16px;
}

#quiz-nessuna-domanda .auth-btn {
    box-shadow: none;
    font-size: 15px;
    padding: 13px 20px;
    width: auto;
    margin: 16px auto 0;
    display: flex;
}

/* Pulsanti di chiusura nei modali (Chiudi / Ok) */
.custom-modal .modal-content-livelli > .auth-btn {
    margin-top: 16px;
}

/* ================================================================
   ARENA CLASSIFICA — card-row (vedi sezione in fondo al file)
   ================================================================ */

#vista-classifica .classifica-privati {
    margin: 12px 0 0;
    font-size: 13px;
    color: #7b819b;
    font-style: italic;
}

/* ================================================================
   ARENA PUNTI / PROFILO
   ================================================================ */

/* Elementi val-xp, xp-fill, label-livello rimangono nascosti — usati solo dal JS */

#vista-punti .punti-riga {
    padding: 10px 0;
    font-size: 14px;
}

#vista-punti .livello-row {
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
    border-bottom: 1px solid #f4f5fa;
}

#vista-punti .livello-row.attuale {
    background: rgba(242,181,21,0.15);
    border-color: transparent;
    font-weight: 700;
    color: var(--blu);
    border-radius: 10px;
}

/* ================================================================
   ARENA DISCIPLINE (video grid)
   ================================================================ */

#vista-discipline .disciplina-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

#vista-discipline .disciplina-card {
    background: var(--blu);
    color: #fff;
    padding: 28px 16px;
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 8px 24px rgba(10,26,82,0.22);
    transition: transform 0.2s, background 0.2s;
    border: none;
}

#vista-discipline .disciplina-card:hover {
    transform: translateY(-4px);
    background: var(--rosso);
}

/* ================================================================
   ARENA PERCORSO
   ================================================================ */

#vista-percorso .percorso-lista {
    border-radius: 16px;
    overflow: hidden;
    border: none;
}

#vista-percorso .percorso-disciplina {
    border: none;
    border-radius: 16px;
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(20,26,51,0.07);
}

#vista-percorso .percorso-disciplina-titolo {
    background: var(--blu);
    border-radius: 0;
    font-family: 'Sora', sans-serif;
    padding: 14px 16px;
    font-size: 16px;
}

#vista-percorso .percorso-grado-titolo {
    background: #f4f5fa;
    color: var(--viola);
    padding: 8px 16px;
    font-size: 14px;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
}

/* ================================================================
   ARENA IMPOSTAZIONI
   ================================================================ */

.arena-input {
    display: block;
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1.5px solid #e6e8f1;
    background: #f4f5fa;
    font-size: 15px;
    font-family: 'Manrope', sans-serif;
    color: #141a33;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s, background 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.arena-input:focus {
    border-color: var(--blu);
    background: #fff;
}

.arena-input::placeholder { color: #9aa0bd; }

select.arena-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%230a1a52' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
    cursor: pointer;
}

/* Hint text — Arena muted color globalmente */
.hint {
    color: #7b819b;
    line-height: 1.5;
}

#vista-impostazioni .hint {
    margin-top: 8px;
}

#vista-impostazioni .impostazioni-campo { margin-bottom: 0; }

#vista-impostazioni .auth-btn {
    box-shadow: none;
    font-size: 15px;
    padding: 14px;
    margin-top: 10px;
}

/* ================================================================
   ARENA VIDEO VIEW
   ================================================================ */

#badge-preferiti {
    background: rgba(225,29,42,0.07);
    color: var(--rosso);
    border-radius: 14px;
    box-shadow: none;
    font-weight: 700;
    font-size: 13px;
    padding: 10px 16px;
    display: none;
    border: none;
}

/* #mainSearch ora è nell'header bicolore → .arena-video-search-wrap input */
/* #titolo-disciplina-scelta ora è nell'header come .arena-view-header-title */

#vista-video .video-card {
    border-radius: 16px;
    border: none;
    box-shadow: 0 6px 18px rgba(20,26,51,0.09);
}

#vista-video .video-title {
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 700;
    color: var(--blu);
}

/* Playlist suggerite nella vista video */
#sez-playlist-studenti #playlist-titolo {
    font-family: 'Sora', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: var(--viola);
    margin: 24px 0 12px;
}

#sez-playlist-studenti #griglia-playlist {
    margin-bottom: 24px;
}

/* Cuore preferiti su video card — Arena (top-right) */
.fav-btn {
    top: 8px;
    right: 8px;
    left: auto;
    border-radius: 10px;
    width: 32px;
    height: 32px;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(20,26,51,0.15);
    background: rgba(0,0,0,0.45);
    color: #fff;
}

.fav-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2px;
    fill: none;
}

.fav-btn.active {
    color: #ff5a64;
    background: rgba(0,0,0,0.45);
}

.fav-btn.active svg {
    fill: currentColor;
}

.lock-overlay svg {
    width: 32px;
    height: 32px;
    stroke: rgba(255,255,255,0.9);
    stroke-width: 1.8px;
    fill: none;
}

/* ================================================================
   ARENA PROFILO — nav secondaria nel tab Profilo
   ================================================================ */

.arena-profilo-nav {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.arena-profilo-btn {
    background: #f4f5fa;
    border: none;
    border-radius: 14px;
    padding: 14px 16px;
    text-align: left;
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--blu);
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.15s;
}

.arena-profilo-btn:hover { background: #eef0f6; }

.arena-profilo-btn--logout { color: var(--rosso); }
.arena-profilo-btn--logout:hover { background: rgba(225,29,42,0.07); }

/* ================================================================
   ARENA MODALI — overlay e card
   ================================================================ */

.custom-modal {
    backdrop-filter: blur(4px);
}

.modal-content-livelli {
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.25);
}

.modal-content-livelli h2 {
    font-family: 'Sora', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: var(--blu);
    letter-spacing: -0.01em;
    text-align: center;
    margin-top: 0;
}

.modal-punti-utente {
    border-radius: 14px;
    background: #f4f5fa;
    color: var(--blu);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    padding: 12px 16px;
    margin: 0 0 16px;
}

.livello-row {
    border-radius: 10px;
    padding: 11px 14px;
    border-bottom: 1px solid #f4f5fa;
    font-size: 14px;
}

.livello-row.attuale {
    background: rgba(242,181,21,0.15);
    border-color: transparent;
    color: var(--blu);
    border-radius: 12px;
    box-shadow: none;
}

/* Modal Reset Quiz */
.modal-reset-quiz .quiz-reset-intro {
    background: #f4f5fa;
    border-left: 4px solid var(--blu);
    border-radius: 12px;
}

.quiz-reset-categoria-label {
    border-radius: 10px;
    padding: 10px 12px;
}

.quiz-reset-categoria-label:hover { background: #f4f5fa; }

.modal-reset-actions { gap: 10px; }
.modal-reset-actions .auth-btn { flex: 1; }

/* Modal Regole */
.quiz-regole-testo p {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    border-bottom: 1px solid #f4f5fa;
    padding-bottom: 10px;
    margin-bottom: 0;
}

.quiz-regole-testo p:last-child { border-bottom: none; }

/* ================================================================
   ARENA — Schermate verifica email e attesa approvazione
   ================================================================ */

#messaggio-verifica-email:not(.hidden),
#messaggio-abilitazione:not(.hidden) {
    max-width: 430px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px 80px;
    text-align: center;
}

#messaggio-verifica-email h3,
#messaggio-abilitazione h3 {
    font-family: 'Sora', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: var(--blu);
    margin: 0 0 14px;
    letter-spacing: -0.01em;
}

#messaggio-verifica-email p,
#messaggio-abilitazione p {
    color: #7b819b;
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 28px;
}

#messaggio-verifica-email .auth-btn,
#messaggio-abilitazione .auth-btn {
    width: auto;
    padding: 14px 28px;
    margin-bottom: 10px;
    box-sizing: border-box;
}

/* Override colori warning dell'abilitazione */
#messaggio-abilitazione {
    background: #fff;
    color: inherit;
    border: none;
    padding: 48px 24px 80px;
}

/* ================================================================
   ARENA — Video modal (stile già funzionale, piccoli fix)
   ================================================================ */

#video-modal .mobile-close-btn {
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    letter-spacing: 0.02em;
    font-size: 15px;
}

/* ================================================================
   ARENA — Fix valori verbosi scritti dal JS
   ================================================================ */

/* home-video-visti = "47 / 100": riduce il font per stare nella medaglia */
#home-video-visti {
    font-size: 15px;
    line-height: 1.2;
}

/* home-livello = "ATLETA (Lv. 4)": tronca se troppo lungo */
.arena-level-badge {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* home-quiz-raffreddamento: mostra un contatore leggibile */
#home-quiz-raffreddamento:not(:empty)::before { content: '⏳ '; }
#home-quiz-raffreddamento:not(:empty)::after  { content: ' in raffreddamento'; font-weight: 400; }

/* ================================================================
   ARENA — Percorso: bordi interni e padding
   ================================================================ */

#vista-percorso .percorso-grado {
    padding: 0;
    border-bottom: 1px solid #f4f5fa;
}

#vista-percorso .percorso-grado:last-child { border-bottom: none; }

/* Stato vuoto percorso */
#vista-percorso .percorso-vuoto {
    color: #7b819b;
    font-size: 14px;
    text-align: center;
    padding: 24px 16px;
}

/* Video nel percorso: stile Arena (no bordo, shadow leggero) */
#vista-percorso .video-card {
    border-radius: 16px;
    border: none;
    box-shadow: 0 4px 14px rgba(20,26,51,0.09);
}

#vista-percorso .video-title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}


/* badge-io e rank medaglie → definiti nella sezione classifica card-row in fondo */

/* ================================================================
   ARENA — Quiz: progress dots sopra la domanda
   ================================================================ */

/* Il JS non gestisce i progress dots — aggiungiamo uno stile per il timer-wrap */
.quiz-timer-wrap {
    position: relative;
}

/* Feedback streak pill */
.quiz-feedback-streak {
    display: inline-block;
    background: linear-gradient(135deg, #ffd75e, var(--oro));
    color: #5a3d00;
    padding: 6px 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    margin-top: 6px;
}

/* ================================================================
   ARENA — Livelli: stile righe nel modal e nella vista punti
   ================================================================ */

#punti-livelli-body .livello-row,
#elenco-livelli-body .livello-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #f4f5fa;
    border-radius: 0;
    font-size: 14px;
    align-items: center;
}

#punti-livelli-body .livello-row:last-child,
#elenco-livelli-body .livello-row:last-child { border-bottom: none; }

#punti-livelli-body .livello-row.attuale,
#elenco-livelli-body .livello-row.attuale {
    background: rgba(242,181,21,0.12);
    border-radius: 10px;
    border-color: transparent;
    font-weight: 700;
}

#punti-livelli-body .livello-row.bloccato,
#elenco-livelli-body .livello-row.bloccato {
    color: #aaaaaa;
    font-weight: 400;
}

/* ================================================================
   ARENA — Pannello Annunci (dropdown da header)
   ================================================================ */

/* Bar di anteprima (la striscia arancione con il titolo scorrevole) */
#box-avviso {
    background: linear-gradient(112deg, #e67e00 0%, var(--arancio) 100%);
    border-radius: 14px;
    padding: 11px 16px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    box-shadow: 0 4px 14px rgba(253,126,20,0.30);
    letter-spacing: 0.01em;
}

/* Freccia dentro la bar */
#box-avviso .annunci-freccia {
    opacity: 0.9;
    font-size: 10px;
}

/* Pannello dropdown */
#pannello-annunci {
    border-radius: 20px;
    border: none;
    box-shadow: 0 8px 32px rgba(10,26,82,0.18);
    overflow: hidden;
    top: calc(100% + 8px);
}

/* Header del pannello: navy invece di arancio */
.pannello-annunci-header {
    background: linear-gradient(112deg, var(--blu) 0%, #14235f 100%);
    padding: 14px 18px;
    font-family: 'Sora', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.pannello-annunci-close {
    font-size: 20px;
    opacity: 0.8;
    transition: opacity 0.15s;
}

.pannello-annunci-close:hover { opacity: 1; }

/* Lista voci */
.pannello-annunci-lista {
    max-height: 65vh;
    background: #fff;
}

.pannello-annuncio-item {
    padding: 14px 18px;
    border-bottom: 1px solid #f4f5fa;
}

.pannello-annuncio-item:last-child { border-bottom: none; }

.pannello-annuncio-titolo {
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: var(--blu);
    margin-bottom: 5px;
}

.pannello-annuncio-testo {
    font-size: 13px;
    color: #444;
    line-height: 1.5;
    margin-bottom: 6px;
}

.pannello-annuncio-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--rosso);
    font-weight: 700;
    font-size: 12px;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(225,29,42,0.08);
    transition: background 0.15s;
}

.pannello-annuncio-link:hover { background: rgba(225,29,42,0.15); }

/* Freccia scroll → usa blu invece di arancio */
.pannello-scroll-arrow { color: var(--blu); }

/* Gradiente fade in fondo alla lista */
.pannello-annunci.ha-scroll::after {
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.97));
}

/* ================================================================
   ARENA — Scrollbar custom (webkit) per aree con overflow
   ================================================================ */

.modal-content-livelli,
.pannello-annunci-lista,
.quiz-reset-categorie-list {
    scrollbar-width: thin;
    scrollbar-color: #d8dce8 transparent;
}

.modal-content-livelli::-webkit-scrollbar,
.pannello-annunci-lista::-webkit-scrollbar,
.quiz-reset-categorie-list::-webkit-scrollbar {
    width: 4px;
}

.modal-content-livelli::-webkit-scrollbar-track,
.pannello-annunci-lista::-webkit-scrollbar-track,
.quiz-reset-categorie-list::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content-livelli::-webkit-scrollbar-thumb,
.pannello-annunci-lista::-webkit-scrollbar-thumb,
.quiz-reset-categorie-list::-webkit-scrollbar-thumb {
    background: #d8dce8;
    border-radius: 4px;
}

/* ================================================================
   ARENA — Lucide inline icons (pill, badge, button)
   ================================================================ */

.arena-streak-pill svg {
    width: 15px;
    height: 15px;
    stroke-width: 2.2px;
    color: #ffb27a;
}

.arena-level-badge svg {
    width: 15px;
    height: 15px;
    stroke-width: 2px;
    color: #5a3d00;
    flex-shrink: 0;
}

.arena-navy-btn svg {
    width: 19px;
    height: 19px;
    stroke-width: 2px;
    color: var(--oro);
    flex-shrink: 0;
}

.arena-profilo-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2px;
    flex-shrink: 0;
}

.quiz-btn-regole svg {
    width: 15px;
    height: 15px;
    stroke-width: 2px;
    flex-shrink: 0;
}

.mobile-close-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5px;
    vertical-align: middle;
    flex-shrink: 0;
}

/* ================================================================
   ARENA — Discipline card (nuova struttura orizzontale)
   ================================================================ */

#vista-discipline .disciplina-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.disciplina-card-arena {
    background: #fff;
    border-radius: 20px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(10,26,82,0.10);
    transition: transform 0.2s, box-shadow 0.2s;
}

.disciplina-card-arena:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(10,26,82,0.16);
}

.disciplina-icon-tile {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, #14235f, #0a1542);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--oro);
}

.disciplina-icon-tile svg {
    width: 26px;
    height: 26px;
    stroke-width: 2px;
}

.disciplina-icon-tile img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 16px;
}

.disciplina-icon-tile:has(img) {
    background: transparent;
}

.disciplina-info-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.disciplina-nome-arena {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: var(--blu);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.disciplina-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.disciplina-grado-pill {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(10,26,82,0.08);
    color: var(--blu);
}

.disciplina-n-video {
    font-size: 12px;
    color: #7b819b;
    font-weight: 600;
}

.disciplina-chevron {
    color: #b9bdd0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.disciplina-chevron svg {
    width: 20px;
    height: 20px;
    stroke-width: 2px;
}

/* ================================================================
   ARENA — Quiz category card (nuova struttura con icon tile)
   ================================================================ */

.quiz-categoria-card {
    background: #fff;
    border-radius: 16px;
    padding: 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    box-shadow: 0 4px 14px rgba(20,26,51,0.06);
    transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
    font-family: 'Manrope', sans-serif;
}

.quiz-categoria-card:hover {
    border-color: var(--blu);
    background: #f4f5fa;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(20,26,51,0.10);
}

.quiz-cat-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quiz-cat-icon-tile {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: rgba(10,26,82,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blu);
    flex-shrink: 0;
}

.quiz-cat-icon-tile svg {
    width: 24px;
    height: 24px;
    stroke-width: 2px;
}

.quiz-cat-icon-tile--img {
    background: #fff;
    border: 1.5px solid rgba(10,26,82,0.08);
    padding: 5px;
}

.quiz-cat-icon-tile--img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
}

.quiz-cat-count-pill {
    background: rgba(242,181,21,0.18);
    color: var(--gold-deep);
    font-size: 12px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    font-family: 'Sora', sans-serif;
}

.quiz-cat-nome {
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--blu);
    line-height: 1.25;
}

/* ================================================================
   ARENA — Classifica card-row (sostituisce la tabella)
   ================================================================ */

#classifica-lista {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.classifica-card-row {
    background: #fff;
    border-radius: 18px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 14px rgba(20,26,51,0.06);
    border: 2px solid transparent;
}

.classifica-card-io {
    border-color: var(--blu);
    background: linear-gradient(135deg, #fff, #eef2ff);
}

.classifica-rank-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10,26,82,0.07);
    color: #7b819b;
    font-weight: 800;
    font-family: 'Sora', sans-serif;
    font-size: 14px;
}

.classifica-rank-medal svg {
    width: 17px;
    height: 17px;
    stroke-width: 2px;
    color: #3a2a00;
}

.classifica-nome-col {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.classifica-nome-disp {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: var(--blu);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.classifica-punti-disp {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: var(--blu);
    white-space: nowrap;
    flex-shrink: 0;
}

.classifica-punti-disp svg {
    width: 14px;
    height: 14px;
    stroke-width: 2px;
    color: var(--gold-deep);
}

/* Badge IO rosso pill */
.badge-io {
    background: linear-gradient(135deg, #ff5a64, var(--rosso));
    color: #fff;
    font-weight: 800;
    border-radius: 999px;
    font-size: 10px;
    padding: 3px 9px;
    letter-spacing: 0.04em;
    font-family: 'Sora', sans-serif;
}

/* Privati footer */
#vista-classifica #classifica-privati {
    display: flex;
    align-items: center;
    gap: 6px;
}

#vista-classifica #classifica-privati svg {
    width: 14px;
    height: 14px;
    stroke-width: 2px;
    color: #7b819b;
    flex-shrink: 0;
}

/* ================================================================
   ARENA — Video view: header bicolore integrato con back btn e search
   ================================================================ */

#vista-video {
    padding: 0;
}

.arena-video-header {
    padding-bottom: 36px;
}

.arena-back-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #fff;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.arena-back-btn svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5px;
}

.arena-video-search-wrap {
    position: relative;
    margin-top: 10px;
}

.arena-video-search-wrap input {
    width: 100%;
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 12px;
    padding: 10px 13px 10px 36px;
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    font-family: 'Manrope', sans-serif;
    outline: none;
    box-sizing: border-box;
    caret-color: #fff;
}

.arena-video-search-wrap input::placeholder {
    color: rgba(255,255,255,0.65);
}

.arena-search-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    pointer-events: none;
}

.arena-search-icon svg {
    width: 16px;
    height: 16px;
    stroke-width: 2px;
    color: rgba(255,255,255,0.8);
}

#vista-video-body {
    padding: 12px 14px 90px;
    margin-top: -8px;
    position: relative;
    z-index: 1;
}

/* Titolo disciplina (ora nell'header, stile bianco) */
#vista-video .arena-view-header-title {
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

/* Grado separatore nella video view */
#vista-video .grado-separatore {
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--navy-ink) 0%, var(--navy-700) 100%);
    color: #fff;
    border-bottom: none;
    border-radius: 10px;
    padding: 10px 14px;
    margin: 20px 0 10px;
}

#contenitore-video-gradi .grado-separatore:first-child {
    margin-top: 4px;
}

#vista-video .grado-separatore .grado-progress-row .progress-mini-container {
    background: rgba(255,255,255,0.22);
    border-radius: 4px;
}

#vista-video .grado-separatore .grado-progress-row .progress-mini-bar {
    background: linear-gradient(90deg, var(--gold-deep), var(--oro));
    border-radius: 4px;
}

#vista-video .grado-separatore .grado-perc-lbl {
    color: rgba(255,255,255,0.85);
}

#vista-video .grado-separatore .grado-bloccato-pill {
    background: rgba(255,255,255,0.13);
    color: rgba(255,255,255,0.85);
}

/* Badge preferiti dentro il body video */
#badge-preferiti {
    margin-bottom: 10px;
}

/* ================================================================
   ARENA HOME — Belt progress card (7 dot segmenti cintura)
   ================================================================ */

.arena-belt-card {
    padding: 16px 18px;
}

.arena-belt-dots {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-top: 4px;
}

.arena-belt-dot {
    height: 12px;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}

.arena-belt-dot.attuale {
    box-shadow: 0 0 0 2.5px #fff, 0 0 0 4.5px var(--blu);
}

/* SEI QUI badge nella vista Punti e nel modal livelli */
.livello-seiqui-badge {
    background: linear-gradient(135deg, #ffd75e, var(--oro));
    color: #5a3d00;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    font-family: 'Sora', sans-serif;
    letter-spacing: 0.02em;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Playlist card nella vista video — Arena style */
.video-card-playlist {
    cursor: pointer;
    border-top: 3px solid var(--viola) !important;
    border-radius: 16px;
}

.video-playlist-count {
    font-size: 11px;
    color: #7b819b;
    margin-top: 3px;
}

/* ================================================================
   ARENA — Belt pill colorate (discipline card)
   ================================================================ */

.disciplina-grado-pill.belt-bianca   { background: rgba(207,207,214,0.22); color: #6b6f80; }
.disciplina-grado-pill.belt-gialla   { background: rgba(242,181,21,0.16);  color: #c98a06; }
.disciplina-grado-pill.belt-arancione{ background: rgba(253,126,20,0.13);  color: #e06c00; }
.disciplina-grado-pill.belt-verde    { background: rgba(31,157,87,0.13);   color: #1f9d57; }
.disciplina-grado-pill.belt-blu      { background: rgba(10,26,82,0.10);    color: #0a1a52; }
.disciplina-grado-pill.belt-marrone  { background: rgba(107,62,29,0.12);   color: #6b3e1d; }
.disciplina-grado-pill.belt-nera     { background: rgba(17,17,17,0.09);    color: #444; }

/* ================================================================
   ARENA — Header discipline: "Esplora" pill
   ================================================================ */

.arena-esplora-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #ffd75e, var(--oro));
    color: #5a3d00;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    font-family: 'Sora', sans-serif;
    white-space: nowrap;
    flex-shrink: 0;
}

.arena-esplora-pill svg {
    width: 13px;
    height: 13px;
    stroke-width: 2px;
}

/* ================================================================
   ARENA — "Altre discipline in arrivo" dashed card
   ================================================================ */

.disciplina-card-dashed {
    background: linear-gradient(135deg, #fff, #f5f7ff);
    border: 1.5px dashed #cfd4e6;
    border-radius: 20px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 10px;
}

.disciplina-dashed-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(10,26,82,0.07);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blu);
    flex-shrink: 0;
}

.disciplina-dashed-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 2px;
}

.disciplina-dashed-title {
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--blu);
}

.disciplina-dashed-sub {
    font-size: 12px;
    color: #7b819b;
    margin-top: 2px;
}

/* ================================================================
   ARENA — Grado separatore: progress row inline e lock pill
   ================================================================ */

.grado-progress-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.grado-progress-row .progress-mini-container {
    width: 70px;
    height: 6px;
    background: #e3e6f0;
    border-radius: 999px;
    overflow: hidden;
}

.grado-progress-row .progress-mini-bar {
    background: linear-gradient(90deg, var(--gold-deep), var(--oro));
    border-radius: 999px;
    height: 100%;
}

.grado-perc-lbl {
    font-size: 12px;
    font-weight: 700;
    color: #7b819b;
    white-space: nowrap;
}

.grado-bloccato-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(0,0,0,0.06);
    color: #7b819b;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.grado-bloccato-pill svg {
    width: 13px;
    height: 13px;
    stroke-width: 2px;
    flex-shrink: 0;
}

/* ================================================================
   ARENA — Quiz: dots strip e badge "Serie X/5"
   ================================================================ */

.arena-quiz-dots-strip {
    display: flex;
    gap: 6px;
    padding: 6px 20px 0;
}

.arena-quiz-dot {
    flex: 1;
    height: 7px;
    border-radius: 999px;
    background: rgba(255,255,255,0.22);
    transition: background 0.2s;
}

.arena-quiz-dot.done {
    background: var(--oro);
}

.arena-quiz-serie-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #ffd75e, var(--oro));
    color: #5a3d00;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    font-family: 'Sora', sans-serif;
    white-space: nowrap;
    flex-shrink: 0;
}

.arena-quiz-serie-badge svg {
    width: 13px;
    height: 13px;
    stroke-width: 2px;
}

/* Side nav: nascosta su mobile, viene attivata dalla media query desktop */
.arena-side-nav { display: none; }

/* Media query per schermi molto stretti (< 360px) */
@media (max-width: 360px) {
    .arena-medals-row { gap: 6px; }
    .arena-medal-cell { padding: 14px 4px; }
    .arena-medal-val  { font-size: 18px; }
    .arena-medal-lbl  { font-size: 10px; }
    .arena-belt-dots  { gap: 4px; }
}

/* ================================================================
   ARENA — Punti screen: XP ring nell'header
   ================================================================ */

.arena-punti-header {
    padding-bottom: 68px;
}

.arena-punti-ring-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 8px;
}

.arena-punti-ring-wrap {
    position: relative;
    width: 118px;
    height: 118px;
}

.arena-punti-xp-ring {
    width: 118px;
    height: 118px;
    transform: rotate(-90deg);
    display: block;
}

.arena-punti-ring-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.arena-punti-ring-points {
    font-family: 'Sora', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    letter-spacing: -0.02em;
}

.arena-punti-ring-sub {
    color: rgba(255,255,255,0.75);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-top: 2px;
}

/* ================================================================
   DESKTOP LAYOUT — breakpoint ≥ 1024px
   Mobile (< 1024px) rimane invariato — questo blocco aggiunge, non sovrascrive
   ================================================================ */

@media (min-width: 1024px) {

    /* === Side nav: colonna sinistra fissa 220px su sfondo navy-ink === */
    .arena-side-nav {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 220px;
        height: 100vh;
        background: var(--navy-ink);
        z-index: 100;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(255,255,255,0.10) transparent;
    }

    .arena-side-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 22px 18px 18px;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    .arena-side-brand-img {
        width: 38px;
        height: 38px;
        border-radius: 11px;
        flex-shrink: 0;
    }

    .arena-side-brand-name {
        font-family: 'Sora', sans-serif;
        font-size: 19px;
        font-weight: 800;
        color: #fff;
        letter-spacing: -0.01em;
    }

    .arena-side-nav-items {
        display: flex;
        flex-direction: column;
        padding: 14px 10px;
        gap: 4px;
        flex: 1;
    }

    .arena-side-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 13px 14px;
        background: none;
        border: none;
        border-radius: 14px;
        cursor: pointer;
        color: rgba(255,255,255,0.58);
        transition: background 0.2s, color 0.2s;
        width: 100%;
        text-align: left;
        font-family: 'Manrope', sans-serif;
    }

    .arena-side-item:hover {
        background: rgba(255,255,255,0.07);
        color: rgba(255,255,255,0.90);
    }

    .arena-side-item.active {
        background: rgba(255,255,255,0.11);
        color: #fff;
    }

    .arena-side-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        color: inherit;
    }

    .arena-side-icon svg {
        width: 20px;
        height: 20px;
        stroke-width: 2px;
        color: inherit;
    }

    .arena-side-item.active .arena-side-icon svg {
        stroke-width: 2.4px;
        color: var(--oro);
    }

    .arena-side-label {
        font-family: 'Sora', sans-serif;
        font-size: 14px;
        font-weight: 700;
        letter-spacing: 0.01em;
        color: inherit;
    }

    /* === Area protetta: shifted a destra di 220px, nasconde padding-bottom mobile === */
    #area-protetta.container {
        max-width: none;
        margin: 0 0 0 220px;
        padding-bottom: 0;
        width: auto;
        min-height: 100vh;
    }

    /* === Bottom nav: nascosta su desktop (rimane nel DOM per compatibilità JS) === */
    .arena-bottom-nav {
        display: none !important;
    }

    /* === Header diagonale: altezza ridotta su desktop === */
    .arena-home-hero {
        clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
        padding-bottom: 60px;
    }

    .arena-view-header {
        clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
        padding: 22px 28px 40px;
    }

    .arena-punti-header {
        padding-bottom: 72px;
    }

    /* === Padding contenuto === */
    .arena-home-body {
        padding: 0 28px 28px;
    }

    .arena-grid-wrap {
        padding: 0 28px 28px;
    }

    #box-annunci-wrap {
        padding: 12px 28px 0;
    }

    /* === Cards: più respiro su desktop === */
    .arena-card {
        margin-bottom: 16px;
    }

    .arena-medals-row {
        gap: 14px;
        margin-bottom: 16px;
    }

    .arena-medal-cell {
        padding: 18px 12px;
    }

    /* === Video grid → 3-4 colonne === */
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    /* === Quiz categorie → 3 colonne === */
    #quiz-griglia-categorie {
        grid-template-columns: repeat(3, 1fr);
    }

    #vista-quiz {
        max-width: none;
        margin: 0;
    }

    /* === Discipline → 3 colonne (override dal flex-column mobile) === */
    #vista-discipline .disciplina-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        flex-direction: unset;
    }

    /* === Video view: rimuove truncation del titolo === */
    #vista-video .arena-view-header-title {
        max-width: none;
    }
}

/* ================================================================
   MIGLIORIE GRAFICHE — transizioni, skeleton, toast
   ================================================================ */

/* --- 1 · TRANSIZIONI VISTA --- */
@keyframes arenaVistaIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
[id^="vista-"]:not(.hidden) {
  animation: arenaVistaIn 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- 2 · SKELETON LOADERS --- */
@keyframes arenaSkShimmer {
  from { background-position: -400px 0; }
  to   { background-position:  400px 0; }
}
.arena-sk-pulse {
  background: linear-gradient(90deg, #eef0f6 25%, #e0e4f0 50%, #eef0f6 75%);
  background-size: 800px 100%;
  animation: arenaSkShimmer 1.5s infinite linear;
  border-radius: 6px;
  display: block;
}
/* skeleton riga classifica */
.arena-sk-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border-radius: 14px;
  margin-bottom: 8px;
}
.arena-sk-avatar  { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
.arena-sk-lines   { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.arena-sk-line    { height: 12px; width: 68%; }
.arena-sk-short   { width: 38%; height: 10px; }
.arena-sk-points  { width: 58px; height: 26px; border-radius: 13px; flex-shrink: 0; }
/* skeleton card quiz */
.arena-sk-card {
  background: #fff;
  border-radius: 16px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.arena-sk-icon { width: 48px; height: 48px; border-radius: 12px; }

/* --- 3 · SCHERMATA SFIDE --- */
.sfide-lista { display: flex; flex-direction: column; gap: 12px; }
.sfida-card {
  background: #fff;
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(10,26,82,0.07);
}
.sfida-card.completata { border: 1.5px solid var(--verde); }
.sfida-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sfida-icon-wrap {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--grigio);
  display: flex; align-items: center; justify-content: center;
  color: var(--navy-700);
  flex-shrink: 0;
}
.sfida-card.completata .sfida-icon-wrap { background: rgba(31,157,87,0.12); color: var(--verde); }
.sfida-info { flex: 1; min-width: 0; }
.sfida-titolo {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--navy-ink);
  line-height: 1.3;
}
.sfida-desc { font-size: 12px; color: #7b819b; margin-top: 2px; }
.sfida-check {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--verde);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sfida-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sfida-bar-wrap {
  flex: 1;
  height: 7px;
  background: var(--grigio);
  border-radius: 4px;
  overflow: hidden;
}
.sfida-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--navy-700), var(--blu));
  border-radius: 4px;
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.sfida-card.completata .sfida-bar { background: var(--verde); }
.sfida-counter {
  font-family: 'Sora', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy-700);
  white-space: nowrap;
}
.sfida-card.completata .sfida-counter { color: var(--verde); }
.sfide-classifica-btn {
  width: 100%;
  margin-top: 4px;
}

/* --- 4 · GRAFICO SETTIMANALE --- */
.arena-grafico-bars {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 72px;
  padding-top: 6px;
}
.arena-grafico-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  height: 100%;
}
.arena-grafico-bar-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
}
.arena-grafico-bar {
  width: 100%;
  background: #e0e4f0;
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  transition: height 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.arena-grafico-bar.has-val { background: rgba(10,26,82,0.28); }
.arena-grafico-bar.oggi    { background: linear-gradient(180deg, #f2b515, #c98a06); }
.arena-grafico-label {
  font-size: 10px;
  color: #7b819b;
  font-weight: 700;
  font-family: 'Sora', sans-serif;
  line-height: 1;
}
.arena-grafico-label.oggi { color: var(--oro); }
.arena-grafico-tot {
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--oro);
}

/* --- 2 · CONFETTI BURST --- */
.arena-confetti-wrap {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9800;
  overflow: hidden;
}
@keyframes arenaCoriandolo {
  0%   { transform: translateY(-10px) translateX(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(105vh) translateX(var(--cx)) rotate(var(--cr)); opacity: 0; }
}
.arena-coriandolo {
  position: absolute;
  top: 0;
  border-radius: 2px;
  animation: arenaCoriandolo var(--cd, 1.1s) cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* --- 5 · RING XP ANIMATION --- */
#home-xp-ring-arc,
#punti-xp-ring-arc {
  transition: stroke-dashoffset 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes arenaRingPulse {
  0%   { filter: drop-shadow(0 0 0px rgba(242,181,21,0)); }
  45%  { filter: drop-shadow(0 0 10px rgba(242,181,21,0.85)); }
  100% { filter: drop-shadow(0 0 0px rgba(242,181,21,0)); }
}
.arena-ring-pulse {
  animation: arenaRingPulse 0.75s ease forwards;
}

/* --- 3 · TOAST --- */
#arena-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--navy-ink);
  color: #fff;
  padding: 12px 22px;
  border-radius: 28px;
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 0 6px 24px rgba(0,0,0,0.28);
  z-index: 9990;
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
  white-space: nowrap;
  max-width: calc(100vw - 40px);
  text-align: center;
}
#arena-toast.arena-toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
#arena-toast.arena-toast-ok  { background: var(--verde); }
#arena-toast.arena-toast-oro {
  background: linear-gradient(135deg, #c98a06 0%, #f2b515 100%);
  color: var(--navy-ink);
}
#arena-toast.arena-toast-err { background: var(--rosso); }

@media (min-width: 1024px) {
  #arena-toast { bottom: 24px; left: 232px; transform: translateY(10px); }
  #arena-toast.arena-toast-visible { transform: translateY(0); }
}
