:root {
    --primary: #0EA5E9; --primary-hover: #0284C7;
    --dark: #0F172A; --light: #F8FAFC; --white: #FFFFFF;
    --gray: #64748B; --green: #10B981; --red: #EF4444;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; color: var(--dark); display: flex; flex-direction: column; height: 100vh; overflow: hidden; background-color: #e5e5e5; }

/* Header */
.site-header { height: 60px; background: rgba(255, 255, 255, 0.95); border-bottom: 1px solid #E2E8F0; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; z-index: 2000; }
.logo { font-weight: 800; font-size: 20px; color: var(--dark); text-decoration: none; display: flex; align-items: center; gap: 5px; }
.logo span { color: var(--primary); } .logo i { color: var(--primary); }
.nav-links a { margin-left: 20px; font-size: 14px; color: var(--gray); text-decoration: none; transition: 0.3s; cursor: pointer; }
.nav-links a:hover { color: var(--primary); }

/* Main */
.main-content { flex: 1; position: relative; }
#map { height: 100%; width: 100%; z-index: 1; }

/* Search Card */
.search-overlay { position: absolute; top: 20px; left: 20px; z-index: 1000; background: var(--white); padding: 20px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); width: 380px; max-width: 95%; }
.search-overlay h1 { font-size: 16px; margin-bottom: 15px; }
.route-inputs { background: var(--light); border: 1px solid #E2E8F0; border-radius: 12px; padding: 10px; position: relative; }
.input-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; } .input-row:last-child { margin-bottom: 0; }
.input-wrapper { flex: 1; position: relative; }
input { width: 100%; border: none; background: transparent; padding: 8px 0; font-size: 14px; outline: none; font-family: 'Inter', sans-serif; border-bottom: 1px solid transparent; }
input:focus { border-bottom: 1px solid var(--primary); }
.icon-start { color: var(--primary); font-size: 12px; width: 20px; text-align: center; } .icon-dest { color: var(--red); font-size: 16px; width: 20px; text-align: center; }
.connector-line { position: absolute; left: 19px; top: 30px; height: 26px; border-left: 2px dotted #CBD5E1; z-index: 0; }
#gpsBtn { background: none; border: none; cursor: pointer; color: var(--gray); transition: 0.2s; } #gpsBtn:hover { color: var(--primary); transform: scale(1.1); }

/* Buttons */
.main-action-btn { width: 100%; margin-top: 15px; padding: 12px; background: var(--dark); color: white; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; opacity: 0.5; pointer-events: none; transition: 0.3s; }
.main-action-btn.ready { background: var(--primary); opacity: 1; pointer-events: all; }
.search-hint { font-size: 11px; color: var(--gray); margin-top: 10px; text-align: center; }

/* Suggestions */
.suggestions-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: white; box-shadow: 0 5px 15px rgba(0,0,0,0.1); border-radius: 8px; list-style: none; z-index: 2000; display: none; max-height: 200px; overflow-y: auto; }
.suggestions-dropdown.active { display: block; }
.suggestions-dropdown li { padding: 10px; font-size: 13px; border-bottom: 1px solid #f1f1f1; cursor: pointer; } .suggestions-dropdown li:hover { background: #f0f9ff; color: var(--primary); }
.leaflet-routing-container { display: none !important; }

/* MODALS */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(5px); z-index: 9999; display: none; align-items: center; justify-content: center; }
.modal-box { background: white; padding: 30px; border-radius: 20px; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,0.2); width: 350px; animation: popIn 0.3s ease; position: relative; }
.modal-box h2 { margin-bottom: 10px; color: var(--dark); font-size: 20px; }
.modal-buttons { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.modal-btn { padding: 12px; border: none; border-radius: 10px; font-weight: bold; cursor: pointer; transition: 0.2s; font-size: 14px; }
.yes-btn { background: var(--green); color: white; } .yes-btn:hover { background: #059669; transform: scale(1.02); }
.no-btn { background: var(--red); color: white; } .no-btn:hover { background: #DC2626; transform: scale(1.02); }
.close-btn { background: var(--gray); color: white; } .close-btn:hover { background: var(--dark); }
.coupon-container { background: #ecfdf5; border: 2px dashed var(--green); padding: 15px; border-radius: 8px; margin-top: 15px; }
.coupon-code { font-family: monospace; font-size: 18px; font-weight: bold; color: var(--green); letter-spacing: 2px; }
@keyframes popIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* SHUTDOWN SCREEN */
.shutdown-screen { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: black; color: #00ff00; z-index: 10000; display: none; align-items: center; justify-content: center; font-family: 'Courier New', Courier, monospace; cursor: none; }
																																		

/* --- FLOATING NAVIGATION BUTTON --- */
.floating-nav-btn {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 900; /* Sopra la mappa, sotto i modali */
    
    background-color: #10B981; /* Verde Navigazione */
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    
    font-size: 16px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    cursor: pointer;
    display: none; /* Nascosto di default */
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.floating-nav-btn:hover {
    background-color: #059669;
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

.floating-nav-btn:active {
    transform: translateX(-50%) scale(0.95);
}

/* Animazione di entrata */
@keyframes slideUp {
    from { bottom: -60px; opacity: 0; }
    to { bottom: 30px; opacity: 1; }
}

.floating-nav-btn.visible {
    display: flex;
    animation: slideUp 0.4s ease-out;
}																																		
																																		