/* --- 1. STRUTTURA DI BASE --- */
body { 
    margin: 0; 
    padding: 0; 
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
    overflow: hidden; 
    background-color: #f0f2f5;
}

#map { 
    height: 100vh; 
    width: 100vw; 
    z-index: 1; 
}

/* --- 2. OVERLAY COUNTDOWN (IL CUORE DELLA PAGINA) --- */
#countdown-overlay {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: linear-gradient(135deg, rgba(35, 140, 188, 0.98) 0%, rgba(0, 0, 128, 0.95) 100%);
    z-index: 9999; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center;
    color: white; 
    text-align: center;
  
}

.logo img { 
    height: 80px; 
    margin-bottom: 20px; 
}

#timer { 
    font-size: 4rem; 
    font-weight: bold; 
    margin: 10px 0; 
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.countdown-label {
    font-size: 1.2rem; 
    text-transform: uppercase; 
    letter-spacing: 2px;
    opacity: 0.9;
}

.address-label {
    font-size: 1.4rem; 
    margin-top: 5px;
    margin-bottom: 25px;
    font-weight: 300;
}

/* --- 3. SEZIONE LIVE LOCATION (SOTTO L'INDIRIZZO) --- */
.live-location-box {
    background: rgba(255, 255, 255, 0.15);
    padding: 25px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    margin: 20px 0;
    min-width: 300px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

#stats {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: #ffffff;
    letter-spacing: 1px;
}

.gmaps-link {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    color: #4285F4;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.gmaps-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    background: #f8f9fa;
}

.gmaps-link img {
    width: 22px;
    height: 22px;
    margin-right: 10px;
}

/* --- 4. PULSANTI E MODALE --- */
.info-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    background: #000080;
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-blue 2s infinite;
}

@keyframes pulse-blue {
    0% { box-shadow: 0 0 0 0 rgba(0, 0, 128, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(0, 0, 128, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 0, 128, 0); }
}

.btn-participate {
    background-color: #e3ab1e; 
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    transition: background 0.3s;
}

.btn-participate:hover {
    background-color: #c99616;
}

/* --- 5. TITOLI MAPPA (NASCOSTI SOTTO OVERLAY) --- */
.main-title {
    position: absolute;
    top: 130px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 25px;
    border-radius: 50px;
    border: 2px solid #000080;
}

.bottom-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.center-btn {
    background: #fff; 
    border: 2px solid #000080; 
    border-radius: 25px;
    padding: 10px 20px; 
    cursor: pointer; 
    font-weight: bold; 
    color: #000080;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* --- 6. MODAL --- */
.modal {
    display: none;
    position: fixed;
    z-index: 11000;
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    /* AGGIUNGI QUESTE RIGHE */
    overflow-y: auto;       /* Attiva lo scorrimento verticale */
    -webkit-overflow-scrolling: touch; /* Rende lo scorrimento fluido su iPhone */
}
.modal-content {
    background-color: #fefefe;
    margin: 5% auto;        /* Crea spazio sopra e sotto */
    padding: 25px;
    border-radius: 15px;
    width: 85%;
    max-width: 600px;
    position: relative;
    color: #333;
    /* AGGIUNGI/MODIFICA QUESTE RIGHE */
    max-height: none;       /* Rimuove limiti di altezza */
    margin-bottom: 50px;    /* Spazio extra in fondo per non toccare il bordo */
}
.info-table {
    width: 100%;
    max-width: 400px;
    border-collapse: collapse;
    margin: 20px auto;
}

.info-table th, .info-table td {
    padding: 10px;
    border: 1px solid #ddd;
}

/* --- 7. RESPONSIVE --- */
@media (max-width: 600px) {
    #timer { font-size: 2.8rem; }
    .countdown-label { font-size: 1rem; }
    .address-label { font-size: 1.1rem; }
    .live-location-box { min-width: 90%; padding: 15px; }
    #stats { font-size: 1.5rem; }
    .main-title h1 { font-size: 1rem; }
}
/* --- TOOLTIP GIALLO (INFO-HINT) --- */
.info-prompt {
    position: fixed;
    top: 25px;
    right: 75px; /* Posizionato a sinistra del pulsante 'i' */
    background: #e3ab1e; /* Giallo coordinato con il tasto partecipa */
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    z-index: 10001; /* Sopra l'overlay */
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.5s ease;
}

/* Freccetta del tooltip */
.info-prompt::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -8px;
    margin-top: -8px;
    border-width: 8px 0 8px 8px;
    border-style: solid;
    border-color: transparent transparent transparent #e3ab1e;
}

/* Classe attivata via JavaScript */
.info-prompt.show {
    opacity: 1;
    transform: translateX(0);
}