:root { --primary: #e61920; --primary-dark: #b31016; --black: #111111; --dark-gray: #2d2d2d; --light-bg: #f7f9fa; --white: #ffffff; --shadow: 0 8px 30px rgba(0,0,0,0.08); --border-radius: 16px; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { font-family: 'Inter', sans-serif; background-color: var(--light-bg); margin: 0; padding: 0; color: var(--black); padding-bottom: 90px; overscroll-behavior-y: none; }

/* Banners & Header */
.alert-banner { background: var(--black); color: var(--white); text-align: center; font-size: 13px; font-weight: 700; padding: 8px 10px; letter-spacing: 0.2px; }
.header { background-color: var(--white); text-align: center; padding: 20px 15px; border-bottom: 4px solid var(--primary); box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: relative; z-index: 10; }
.header img { max-height: 80px; object-fit: contain; margin-bottom: 5px; }
.header h1 { margin: 0; font-size: 22px; text-transform: uppercase; font-weight: 900; letter-spacing: -0.5px; }
.header p { color: var(--primary); font-weight: 800; margin: 4px 0 0 0; font-size: 14px; }

/* Marquee Sponsor con Loghi */
.sponsor-marquee { background: #ffffff; border-bottom: 2px solid #f0f0f0; padding: 15px 0; overflow: hidden; white-space: nowrap; position: relative; display: flex; align-items: center; }

.marquee-content { 
    display: flex; 
    animation: marquee 30s linear infinite; 
    /* Anti-flickering per iOS/Safari */
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.marquee-content span { display: flex; align-items: center; }

.sponsor-logo { 
    height: 45px; 
    margin: 0 35px; 
    object-fit: contain; 
    /* Entrano grigi, opachi e piccolini */
    filter: grayscale(100%) opacity(0.4); 
    transform: scale(0.9);
    transition: filter 0.5s ease, transform 0.5s ease; 
    will-change: filter, transform;
}

/* QUESTA è la classe che accende il logo in automatico! Niente hover. */
.sponsor-logo.in-center { 
    filter: grayscale(0%) opacity(1); 
    transform: scale(1.2); 
}

@keyframes marquee { 
    0% { transform: translate3d(0, 0, 0); } 
    100% { transform: translate3d(-33.3333%, 0, 0); } 
}

/* Questa è la classe che si attiverà magicamente quando il logo è al centro */
.sponsor-logo.in-center { 
    filter: grayscale(0%) opacity(1); 
    transform: scale(1.15); 
}

/* Nota: l'animazione ora si sposta del 33.3% perché mettiamo 3 blocchi invece di 2 per evitare il bug dello schermo bianco */
@keyframes marquee { 
    0% { transform: translate3d(0, 0, 0); } 
    100% { transform: translate3d(-33.3333%, 0, 0); } 
}

/* Struttura Tabs & Form */
.tab-content { display: none; padding: 25px 15px; max-width: 600px; margin: 0 auto; animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
#tab-masterplan { max-width: 1000px; }
.tab-content.active { display: block; }
@keyframes slideUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

.select-wrapper { position: relative; margin-bottom: 25px; transition: transform 0.3s ease, box-shadow 0.3s ease; border-radius: 12px; }
.select-wrapper::after { content: "▼"; position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: var(--primary); font-size: 12px; pointer-events: none; }
select { width: 100%; padding: 16px; border-radius: 12px; border: 2px solid #ddd; font-size: 16px; font-family: 'Inter', sans-serif; font-weight: 800; color: var(--dark-gray); outline: none; background: var(--white); appearance: none; box-shadow: 0 4px 15px rgba(0,0,0,0.03); transition: all 0.2s ease; cursor: pointer; }
select:focus { border-color: var(--primary); }

/* Nuova Animazione di Highlight per la Select (Richiamata dal JS dell'Onboarding) */
@keyframes highlightPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(230, 25, 32, 0); }
    50% { transform: scale(1.03); box-shadow: 0 0 20px rgba(230, 25, 32, 0.5); }
    100% { transform: scale(1); box-shadow: 0 0 0 rgba(230, 25, 32, 0); }
}
.highlight-pulse { animation: highlightPulse 0.6s ease-in-out 2; border: 2px solid var(--primary); border-radius: 12px; }

/* Empty State Ottimizzato */
.empty-state { text-align: center; padding: 30px 20px; background: var(--white); border-radius: var(--border-radius); box-shadow: var(--shadow); margin-top: 10px; border: 1px dashed #eee; }
.empty-icon { font-size: 40px; margin-bottom: 10px; }
.empty-state h3 { color: var(--primary); margin: 0 0 10px 0; font-size: 20px; font-weight: 900; }
.empty-state p { color: #555; font-size: 15px; line-height: 1.5; margin: 0; }

/* Banners Informativi & Promo */
.simple-banner { display: flex; flex-direction: column; gap: 8px; background: var(--white); border: 1px solid #ddd; border-radius: 10px; padding: 14px 16px; margin-bottom: 25px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.banner-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 700; color: var(--dark-gray); }
.banner-val { color: var(--primary); font-weight: 900; font-size: 15px; }

.promo-card { display: flex; align-items: center; gap: 15px; padding: 15px; border-radius: 12px; margin-bottom: 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.promo-icon { font-size: 30px; }
.promo-text { font-size: 14px; line-height: 1.4; color: #444; }
.promo-text strong { color: var(--black); font-size: 15px; }
.promo-text a { color: var(--primary); font-weight: 800; text-decoration: none; }
.bar-promo { background: linear-gradient(to right, #fff, #fff3e0); border-left: 5px solid #ff9800; }
.ig-promo { background: linear-gradient(to right, #fff, #fce4ec); border-left: 5px solid #e91e63; }

/* Match Cards */
.matches { display: flex; flex-direction: column; gap: 15px; }
.match-card { background: var(--white); border-radius: var(--border-radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid #eee; }
.match-header { background: var(--dark-gray); color: var(--white); padding: 10px 20px; font-size: 14px; font-weight: 800; display: flex; justify-content: space-between; }
.match-body { padding: 15px; font-size: 15px; display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; }
.team-name { font-weight: 600; color: #555; font-size: 14px; }
.vs-badge { background: #f0f0f0; color: var(--primary); padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 900; letter-spacing: 1px; }
.my-team { color: var(--black); font-weight: 900; font-size: 18px; }

/* Masterplan / Tabellone */
.scroll-hint { text-align: center; font-size: 13px; color: var(--primary); font-weight: 800; margin-bottom: 12px; animation: pulse 2s infinite; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } }
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 8px; box-shadow: var(--shadow); border: 1px solid #ddd; background: var(--white); }
.master-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.master-table th, .master-table td { border: 1px solid #eee; padding: 10px 8px; text-align: center; vertical-align: middle; }
.master-table th { background-color: var(--dark-gray); color: var(--white); font-weight: 800; font-size: 13px; white-space: nowrap; }
.master-table .sticky-col { position: sticky; left: 0; background-color: var(--light-bg); font-weight: 900; color: var(--primary); font-size: 12px; z-index: 2; border-right: 2px solid #ccc; white-space: nowrap; }
.master-table th.sticky-col { background-color: var(--black); color: var(--white); z-index: 3; }
.m-cell-content { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.m-team { font-size: 11px; font-weight: 700; color: #333; line-height: 1.2; }
.m-vs { color: var(--primary); font-size: 10px; font-weight: 900; }
.m-free { color: #aaa; font-style: italic; font-size: 12px; background: #fafafa; }

/* Info Cards & Misc */
.field-title { color: var(--black); font-size: 20px; font-weight: 900; margin: 30px 0 15px 0; padding-bottom: 5px; border-bottom: 3px solid var(--primary); display: inline-block; }
.field-title:first-child { margin-top: 0; }
.info-card { background: var(--white); border-radius: var(--border-radius); padding: 25px; margin-bottom: 25px; box-shadow: var(--shadow); }
.info-card h2 { color: var(--primary); margin-top: 0; border-bottom: 2px solid #f0f0f0; padding-bottom: 12px; font-size: 20px; font-weight: 900; display: flex; align-items: center; gap: 8px; }
.info-list { padding-left: 0; margin: 0; list-style: none; line-height: 1.8; }
.info-list li { position: relative; padding-left: 25px; margin-bottom: 12px; font-size: 15px; color: #444; }
.info-list li::before { content: '•'; color: var(--primary); font-weight: bold; font-size: 20px; position: absolute; left: 5px; top: -2px; }
.map-img-container { width: 100%; border-radius: 12px; overflow: hidden; border: 2px solid var(--black); margin-bottom: 20px; background: #eee; display: flex; justify-content: center; align-items: center; }
.map-img { width: 100%; display: block; object-fit: cover; }

/* Bottom Nav */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; justify-content: space-between; padding: 10px 5px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 20px rgba(0,0,0,0.08); border-top: 1px solid rgba(0,0,0,0.05); z-index: 1000; }
.nav-item { color: #999; background: none; border: none; font-size: 10px; font-weight: 800; text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; flex: 1; padding: 5px 0; transition: color 0.3s ease; }
.nav-item svg { width: 22px; height: 22px; fill: currentColor; transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.nav-item.active { color: var(--primary); }
.nav-item.active svg { transform: scale(1.15); }

/* ---------------------------------------------------- */
/* NUOVO LAYOUT SEZIONE MAPPA E NAVIGAZIONE             */
/* ---------------------------------------------------- */

.location-card {
    background: var(--white);
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.loc-details h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: var(--black);
    font-weight: 900;
}

.loc-details p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.nav-btn {
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-shadow: 0 4px 12px rgba(230, 25, 32, 0.3);
    transition: transform 0.2s, background 0.2s;
    min-width: 85px;
}

.nav-btn:active {
    transform: scale(0.95);
    background: var(--primary-dark);
}

.nav-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Restyling lista parcheggi per la navigazione rapida */
.parking-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.parking-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.parking-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

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

.park-info strong {
    font-size: 15px;
    color: var(--black);
}

.park-info span {
    font-size: 13px;
    color: #777;
    margin-top: 2px;
}

.park-link {
    background: #f0f0f0;
    color: var(--black);
    text-decoration: none;
    font-weight: 800;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background 0.2s;
}

.park-link:active {
    background: #e0e0e0;
}

/* ---------------------------------------------------- */
/* NUOVE REGOLE PER IL MODALE DI ONBOARDING (BENVENUTO) */
/* ---------------------------------------------------- */
.onboarding-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    animation: fadeInOverlay 0.4s forwards ease-out;
}

.onboarding-card {
    background: var(--white);
    border-radius: 20px;
    padding: 25px 20px; /* Ridotto leggermente per guadagnare spazio */
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    animation: popUpCard 0.5s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.1s;
    
    /* FIX SCROLL MOBILE ANDROID */
    max-height: 85vh; /* Altezza massima 85% dello schermo */
    overflow-y: auto; /* Attiva lo scroll interno se serve */
    overscroll-behavior: contain; /* Impedisce che scrolli la pagina dietro */
}


.onboarding-icon {
    font-size: 45px;
    margin-bottom: 10px;
}

.onboarding-title {
    color: var(--primary);
    font-size: 22px;
    font-weight: 900;
    margin: 0 0 10px 0;
    letter-spacing: -0.5px;
}

.onboarding-intro {
    font-size: 15px;
    color: #555;
    margin: 0 0 20px 0;
    line-height: 1.4;
}

.onboarding-list {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
    text-align: left;
}

.onboarding-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px; /* Spazi ridotti per compattare la lista */
    font-size: 13px; /* Leggermente più piccolo per non affollare */
    color: #333;
    line-height: 1.4;
    background: #f8f9fa;
    padding: 10px; /* Padding interno ridotto */
    border-radius: 12px;
    border: 1px solid #eee;
}

.onboarding-list li strong {
    color: var(--black);
    font-weight: 800;
    display: block;
    margin-bottom: 2px;
}

.onb-emoji {
    font-size: 20px;
    line-height: 1;
    margin-top: 2px;
}

.onboarding-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 900;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(230, 25, 32, 0.4);
    transition: background 0.2s, transform 0.2s;
}

.onboarding-btn:active {
    transform: scale(0.96);
    background: var(--primary-dark);
}

/* Animazioni di uscita (aggiunte via JS prima di nascondere) */
.onboarding-overlay.fade-out { animation: fadeOutOverlay 0.3s forwards ease-in; }
.onboarding-overlay.fade-out .onboarding-card { animation: popDownCard 0.3s forwards ease-in; }

@keyframes fadeInOverlay { to { opacity: 1; } }
@keyframes popUpCard { to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes fadeOutOverlay { to { opacity: 0; } }
@keyframes popDownCard { to { opacity: 0; transform: translateY(10px) scale(0.95); } }

/* ---------------------------------------------------- */
/* MODALE ALLARME ACCETTAZIONE                          */
/* ---------------------------------------------------- */
.alert-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeInOverlay 0.3s forwards ease-out;
}

.alert-card {
    background: #fff;
    border-radius: 20px;
    padding: 25px 20px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 15px 40px rgba(230, 25, 32, 0.4);
    border: 4px solid var(--primary);
    transform: translateY(20px);
    animation: popUpCard 0.4s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.alert-icon {
    font-size: 50px;
    margin-bottom: 5px;
    animation: pulseAlert 1.5s infinite;
}

@keyframes pulseAlert {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.alert-title {
    color: var(--primary);
    font-size: 22px;
    font-weight: 900;
    margin: 0 0 15px 0;
    text-transform: uppercase;
}

.alert-text {
    font-size: 16px;
    color: #333;
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.alert-text strong {
    color: var(--primary-dark);
    font-size: 18px;
}

.alert-info-box {
    background: #fff8e1;
    border-left: 4px solid #ff9800;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    color: #555;
    margin-bottom: 20px;
    text-align: left;
    line-height: 1.5;
}

.alert-info-box strong {
    color: #e65100;
}

.alert-btn {
    background: var(--black);
    color: var(--white);
    border: none;
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 900;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: background 0.2s, transform 0.2s;
}

.alert-btn:active {
    transform: scale(0.96);
    background: #333;
}

/* --- STILE DASHBOARD SQUADRA LOGGATA --- */
.team-dashboard-header {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--white);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-left: 5px solid var(--primary);
    animation: slideUp 0.3s ease forwards;
}

.dashboard-logo {
    width: 55px;
    height: 55px;
    object-fit: contain;
    border-radius: 8px;
    background: #f9f9f9;
    padding: 5px;
    border: 1px solid #eee;
}

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

.dashboard-subtitle {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.dashboard-title {
    margin: 0;
    font-size: 18px;
    color: var(--black);
    font-weight: 900;
    line-height: 1.2;
}

/* ---------------------------------------------------- */
/* AVVISO PERMANENTE ACCETTAZIONE (INLINE)              */
/* ---------------------------------------------------- */
.persistent-alert {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff5f5;
    border: 1px solid #ffcdd2;
    border-left: 6px solid var(--primary);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(230, 25, 32, 0.08);
    animation: slideUp 0.3s ease forwards;
}

.p-alert-icon {
    font-size: 26px;
    animation: pulse 2s infinite; /* Usa l'animazione pulse già esistente */
}

.p-alert-text {
    font-size: 13px;
    color: #c62828;
    line-height: 1.4;
}

.p-alert-text strong {
    font-size: 15px;
    font-weight: 900;
    color: var(--primary-dark);
    display: block;
    margin-bottom: 2px;
}

/* ---------------------------------------------------- */
/* GRAFICA NUMERI BANCO (MODALE E BANNER)               */
/* ---------------------------------------------------- */
.desk-highlight-box {
    background: #fffafa;
    border: 2px dashed var(--primary);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.desk-highlight-box span {
    font-size: 14px;
    color: #444;
    font-weight: 800;
}

.desk-badge {
    background: var(--primary);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 22px;
    font-weight: 900;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(230, 25, 32, 0.4);
    letter-spacing: 1px;
}

.p-desk-badge {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 900;
    margin-left: 4px;
    vertical-align: middle;
    box-shadow: 0 2px 5px rgba(230, 25, 32, 0.3);
}

/* Modifica il margine del testo per allinearlo bene col nuovo badge */
.p-alert-text {
    font-size: 14px;
}
.p-alert-text strong {
    margin-bottom: 4px;
}

/* ---------------------------------------------------- */
/* STACK E MODALE SOCIETÀ PARTECIPANTI                  */
/* ---------------------------------------------------- */

/* Bannerino in Home */
.clubs-preview-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--white);
    padding: 10px 15px;
    margin: -10px auto 15px auto;
    max-width: 600px;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    cursor: pointer;
    border: 1px solid #f0f0f0;
    border-top: none;
    transition: transform 0.2s, background 0.2s;
}

.clubs-preview-banner:active {
    transform: scale(0.98);
    background: #fafafa;
}

/* Gli avatar sovrapposti (i loghi!) */
.clubs-stack {
    display: flex;
    align-items: center;
}

.clubs-stack img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--white);
    margin-left: -12px;
    object-fit: contain;
    background: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.clubs-stack img:first-child {
    margin-left: 0;
}

/* I testi a destra dei loghi */
.clubs-stack-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark-gray);
    line-height: 1.3;
}

.clubs-stack-text strong {
    color: var(--primary);
    font-weight: 900;
}

.clubs-stack-sub {
    font-size: 11px;
    color: #777;
    font-weight: 700;
}

.clubs-stack-sub b {
    color: var(--black);
}

.clubs-stack-arrow {
    color: #bbb;
    font-weight: bold;
    font-size: 16px;
}

/* Modale Elenco Completo */
.clubs-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center; /* Modificato da flex-end a center */
    padding: 20px; /* Aumentato il margine laterale */
    animation: fadeInOverlay 0.3s forwards;
}

.clubs-modal-card {
    background: var(--white);
    width: 100%;
    max-width: 500px;
    border-radius: 20px; /* Bordo arrotondato ovunque, non solo sopra */
    padding: 20px;
    max-height: 80vh; /* Ridotto leggermente per sicurezza su schermi piccoli */
    display: flex;
    flex-direction: column;
    animation: popUpCard 0.3s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

.clubs-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.clubs-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 900;
    color: var(--black);
}

.close-modal-btn {
    background: #f0f0f0;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: bold;
    color: #555;
    cursor: pointer;
}

.clubs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 15px;
    overflow-y: auto;
    padding-bottom: 20px;
}

.club-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.club-item img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    background: #f9f9f9;
    padding: 5px;
    border-radius: 12px;
    border: 1px solid #eee;
}

.club-item span {
    font-size: 11px;
    font-weight: 700;
    color: #444;
    line-height: 1.2;
}

/* ---------------------------------------------------- */
/* PWA E INSTALLAZIONE APP                              */
/* ---------------------------------------------------- */
.install-app-btn {
    background: var(--black);
    color: var(--white);
    border: none;
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 900;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s;
}

.install-app-btn::before {
    content: "⬇️";
    font-size: 16px;
}

.install-app-btn:active {
    transform: scale(0.96);
}

.install-prompt-box {
    background: #f8f9fa;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.ios-steps {
    text-align: left;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 12px;
    margin-top: 15px;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}
.ios-steps p { margin: 8px 0; }

/* ---------------------------------------------------- */
/* SMART BANNER INSTALLAZIONE E ISTRUZIONI IOS          */
/* ---------------------------------------------------- */
.smart-install-banner {
    background: #ffffff;
    border: 2px solid #ffebee;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 10px 25px rgba(230, 25, 32, 0.12);
    animation: slideUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 6px solid var(--primary);
}

.sib-content-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sib-app-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.sib-text {
    text-align: left;
    font-size: 13px;
    color: #555;
    line-height: 1.4;
}

.sib-text strong {
    display: block;
    font-size: 16px;
    color: var(--black);
    margin-bottom: 3px;
    letter-spacing: -0.3px;
}

.sib-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 900;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    box-shadow: 0 6px 15px rgba(230, 25, 32, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sib-btn svg {
    width: 20px;
    height: 20px;
}

.sib-btn:active {
    transform: scale(0.96);
    box-shadow: 0 2px 8px rgba(230, 25, 32, 0.2);
}

/* Stili specifici Modale iOS (Fix) */
.ios-instruction-step {
    display: flex;
    flex-direction: row; /* Forza orizzontale */
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 15px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

.ios-step-number {
    background: var(--primary);
    color: #fff;
    width: 24px;
    height: 24px;
    min-width: 24px; /* Impedisce che si schiacci */
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-weight: 900;
    flex-shrink: 0;
}

.ios-step-text {
    flex: 1; /* Occupa lo spazio rimanente */
}

.icon-inline {
    width: 28px !important;
    height: 28px !important;
    display: inline-block;
    vertical-align: middle;
    margin-top: 8px;
    background: #fff;
    padding: 4px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* ---------------------------------------------------- */
/* UPGRADE UX DEI BOTTONI GENERALI (Onboarding, Modali) */
/* ---------------------------------------------------- */
.onboarding-btn, .alert-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 6px 15px rgba(230, 25, 32, 0.3);
    border: none;
    color: var(--white);
    font-weight: 900;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 12px;
    padding: 16px;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s;
}

.onboarding-btn:active, .alert-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(230, 25, 32, 0.2);
}