/**
 * Volo Libero 3D - Stile per Simulatore di Volo Uccello
 */

/* display:flex/grid vincono sull'attributo hidden: qui lo rimettiamo al comando */
.bf-app [hidden] {
    display: none !important;
}

.bf-app {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding: 0;
    color: #f1f5f9;
    background: #020617;
    overflow-x: hidden;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* 3D Viewport Stage - Occupa l'intera pagina a schermo pieno */
.bf-stage {
    position: relative;
    width: 100vw;
    height: calc(100vh - 72px);
    min-height: 580px;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    background: #020617;
    user-select: none;
    touch-action: none;
}

.bf-stage:fullscreen {
    width: 100vw;
    height: 100vh;
}

#bfCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
}

#bfCanvas:active {
    cursor: grabbing;
}

/* HUD Top Bar */
.bf-hud-top {
    position: absolute;
    top: 0.85rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    pointer-events: none;
    z-index: 10;
}

.bf-hud-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    pointer-events: auto;
}

/* Species Picker */
.bf-species-picker {
    position: relative;
}

.bf-btn-species {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.48rem 0.85rem;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    color: #f8fafc;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    transition: all 0.2s ease;
}

.bf-btn-species:hover {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(56, 189, 248, 0.5);
    transform: translateY(-1px);
}

.bf-arrow-down {
    font-size: 0.72rem;
    color: #94a3b8;
}

.bf-species-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    width: 260px;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    padding: 0.4rem;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    z-index: 30;
}

.bf-opt-species {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    background: transparent;
    border: none;
    color: #e2e8f0;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s ease;
}

.bf-opt-species:hover, .bf-opt-species.is-active {
    background: rgba(56, 189, 248, 0.18);
    color: #38bdf8;
}

.bf-opt-species.is-active {
    border: 1px solid rgba(56, 189, 248, 0.35);
}

.bf-s-icon {
    font-size: 1.35rem;
}

.bf-s-info strong {
    display: block;
    font-size: 0.86rem;
}

.bf-s-info small {
    display: block;
    font-size: 0.7rem;
    color: #94a3b8;
}

/* Telemetry Chips */
.bf-telemetry {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bf-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    font-size: 0.82rem;
    color: #f1f5f9;
}

.bf-chip-label {
    font-size: 0.68rem;
    color: #94a3b8;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.bf-chip strong {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.95rem;
    color: #38bdf8;
}

.bf-water-bar-wrap {
    width: 48px;
    height: 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 9999px;
    overflow: hidden;
}

.bf-water-bar-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #06b6d4, #3b82f6);
    transition: width 0.3s ease;
}

/* Center Flight Status */
.bf-flight-status-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    pointer-events: auto;
}

.bf-state-tag {
    padding: 0.35rem 0.95rem;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(56, 189, 248, 0.45);
    border-radius: 9999px;
    font-size: 0.84rem;
    font-weight: 700;
    color: #38bdf8;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.bf-compass-tag {
    font-family: ui-monospace, monospace;
    font-size: 0.72rem;
    color: #94a3b8;
    letter-spacing: 1px;
}

/* HUD Right Actions */
.bf-hud-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    pointer-events: auto;
}

.bf-hud-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    color: #f1f5f9;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.18s ease;
}

.bf-hud-btn:hover {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(56, 189, 248, 0.5);
    transform: translateY(-1px);
}

.bf-hud-btn.is-active {
    background: rgba(56, 189, 248, 0.25);
    border-color: #38bdf8;
    color: #38bdf8;
}

.bf-hud-btn-pause.is-paused {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.6);
    color: #fca5a5;
    animation: bfPulsePause 1.5s infinite;
}

@keyframes bfPulsePause {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 12px 3px rgba(239, 68, 68, 0.5); }
}

/* Pause Overlay */
.bf-pause-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(10px);
    z-index: 45;
    animation: bfFadeIn 0.2s ease;
}

.bf-pause-card {
    text-align: center;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 20px;
    padding: 2.2rem 3rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(56, 189, 248, 0.15);
    max-width: 90vw;
}

.bf-pause-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.6rem;
}

.bf-pause-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.6rem;
    color: #f8fafc;
    font-weight: 800;
}

.bf-pause-card p {
    margin: 0 0 1.5rem;
    color: #94a3b8;
    font-size: 0.95rem;
}

.bf-btn-resume {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
    transition: all 0.2s ease;
}

.bf-btn-resume:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 26px rgba(14, 165, 233, 0.6);
}

.bf-hud-btn-realmap {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.3), rgba(16, 185, 129, 0.25));
    border-color: rgba(56, 189, 248, 0.5);
    color: #38bdf8;
}

.bf-hud-btn-realmap:hover {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.5), rgba(16, 185, 129, 0.4));
    border-color: #38bdf8;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.35);
}

.bf-hud-btn-satview {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(14, 165, 233, 0.25));
    border-color: rgba(192, 132, 252, 0.5);
    color: #c084fc;
}

.bf-hud-btn-satview:hover, .bf-hud-btn-satview.is-active {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.55), rgba(14, 165, 233, 0.45));
    border-color: #d8b4fe;
    color: #fff;
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.4);
}

.bf-full-satellite-map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: #091122;
}

.bf-chip-gps {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(15, 23, 42, 0.88);
}

.bf-chip-gps .bf-chip-label {
    color: #34d399;
}

.bf-chip-gps small {
    color: #94a3b8;
    font-size: 0.72rem;
    margin-left: 0.3rem;
}

/* Mini Radar Topografico & Satellite GPS */
.bf-minimap-wrap {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    width: 170px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 16px;
    padding: 0.45rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    z-index: 10;
    pointer-events: auto;
}

.bf-minimap-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.2rem;
    margin-bottom: 0.35rem;
}

.bf-map-toggle {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #94a3b8;
    font-size: 0.65rem;
    padding: 0.2rem 0.35rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.bf-map-toggle:hover, .bf-map-toggle.is-active {
    background: rgba(14, 165, 233, 0.3);
    border-color: #38bdf8;
    color: #38bdf8;
    font-weight: 700;
}

.bf-map-gmaps-link {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 6px;
    color: #fca5a5;
    font-size: 0.65rem;
    padding: 0.2rem 0.35rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.bf-map-gmaps-link:hover {
    background: rgba(239, 68, 68, 0.35);
    color: #fff;
}

#bfMinimapCanvas {
    width: 100%;
    height: 145px;
    display: block;
    border-radius: 10px;
    background: #091122;
}

.bf-minimap-leaflet {
    width: 100%;
    height: 145px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.bf-minimap-legend {
    display: flex;
    justify-content: space-between;
    font-size: 0.64rem;
    color: #94a3b8;
    margin-top: 0.25rem;
    padding: 0 0.1rem;
}

/* Modal Mappe Reali */
.bf-realmap-card {
    max-width: 840px;
    width: 94vw;
    max-height: 88vh;
    overflow-y: auto;
}

.bf-realmap-search-wrap {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}

.bf-search-input {
    flex: 1;
    padding: 0.7rem 1.1rem;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 12px;
    color: #f8fafc;
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.2s;
}

.bf-search-input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.bf-btn-search {
    padding: 0.7rem 1.4rem;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.15s;
}

.bf-btn-search:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
}

.bf-search-status {
    padding: 0.5rem 0.8rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    font-size: 0.84rem;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bf-realmap-subtitle {
    margin: 0 0 0.8rem;
    font-size: 0.95rem;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.bf-locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.bf-loc-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: #e2e8f0;
}

.bf-loc-card:hover, .bf-loc-card.is-active {
    background: rgba(14, 165, 233, 0.15);
    border-color: #38bdf8;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(56, 189, 248, 0.2);
}

.bf-loc-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bf-loc-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
}

.bf-loc-name {
    font-size: 1rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0.2rem 0 0;
}

.bf-loc-coords {
    font-size: 0.74rem;
    color: #94a3b8;
    font-family: ui-monospace, monospace;
}

.bf-loc-desc {
    font-size: 0.78rem;
    color: #cbd5e1;
    line-height: 1.35;
    margin-top: 0.2rem;
}

.bf-realmap-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}

.bf-realmap-info {
    font-size: 0.8rem;
    color: #94a3b8;
}

.bf-btn-gmaps {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    background: rgba(239, 68, 68, 0.18);
    border: 1px solid rgba(239, 68, 68, 0.5);
    border-radius: 10px;
    color: #fca5a5;
    font-weight: 700;
    font-size: 0.86rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.bf-btn-gmaps:hover {
    background: rgba(239, 68, 68, 0.35);
    color: #fff;
    transform: translateY(-1px);
}

.bf-realmap-footer-btns {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.bf-btn-streetview {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(16, 185, 129, 0.5);
    color: #6ee7b7;
}

.bf-btn-streetview:hover {
    background: rgba(16, 185, 129, 0.35);
    color: #fff;
}

/* Bottom Center Floating Quick Hint */
.bf-quick-hint-bar {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 9999px;
    padding: 0.5rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #e2e8f0;
    font-size: 0.84rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
    z-index: 15;
    pointer-events: auto;
    white-space: nowrap;
    max-width: 90vw;
}

.bf-hint-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0 0.2rem;
    margin-left: 0.3rem;
}

.bf-hint-close:hover {
    color: #fff;
}

kbd {
    display: inline-block;
    padding: 0.12rem 0.38rem;
    background: #1e293b;
    border: 1px solid #475569;
    border-radius: 4px;
    box-shadow: 0 1px 0 #0f172a;
    font-family: ui-monospace, monospace;
    font-size: 0.74rem;
    color: #38bdf8;
}

/* Cloud Mist Overlay */
.bf-cloud-mist {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.78) 0%, rgba(240, 249, 255, 0.5) 45%, rgba(224, 242, 254, 0.2) 75%, transparent 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    mix-blend-mode: screen;
    z-index: 5;
}

.bf-cloud-mist.is-in-cloud {
    opacity: 0.94;
}

/* Water Splash Ripple FX */
.bf-water-splash {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, rgba(56, 189, 248, 0.4) 0%, transparent 100%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 5;
}

.bf-water-splash.is-splashing {
    opacity: 1;
    animation: bfSplashPulse 0.4s ease-out;
}

@keyframes bfSplashPulse {
    0% { transform: scaleY(0.5); }
    50% { transform: scaleY(1.15); }
    100% { transform: scaleY(1); }
}

/* Toast Notification */
.bf-action-toast {
    position: absolute;
    top: 4.8rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.55rem 1.3rem;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(56, 189, 248, 0.55);
    border-radius: 9999px;
    color: #e0f2fe;
    font-size: 0.86rem;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65);
    z-index: 25;
    animation: bfFadeUp 0.3s ease;
}

@keyframes bfFadeUp {
    from { opacity: 0; transform: translate(-50%, 10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* Touch Controls */
.bf-touch-controls {
    display: none;
    position: absolute;
    bottom: 1.25rem;
    left: 1.25rem;
    right: 1.25rem;
    justify-content: space-between;
    align-items: flex-end;
    pointer-events: none;
    z-index: 15;
}

@media (hover: none) and (pointer: coarse) {
    .bf-touch-controls {
        display: flex;
    }
}

.bf-touch-stick {
    pointer-events: auto;
    width: 115px;
    height: 115px;
}

.bf-touch-stick-base {
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(12px);
    border: 2px solid rgba(56, 189, 248, 0.45);
    border-radius: 50%;
    position: relative;
}

.bf-touch-stick-thumb {
    width: 46px;
    height: 46px;
    background: radial-gradient(circle, #38bdf8, #0284c7);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px #38bdf8;
}

.bf-touch-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    pointer-events: auto;
}

.bf-touch-btn {
    padding: 0.7rem 0.95rem;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 12px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    touch-action: manipulation;
}

.bf-touch-btn:active {
    background: rgba(56, 189, 248, 0.45);
    border-color: #38bdf8;
}

/* Modal Comandi */
.bf-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.88);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 50;
}

.bf-modal-card {
    width: 100%;
    max-width: 680px;
    max-height: 85vh;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
}

.bf-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.15rem 1.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bf-modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    color: #fff;
}

.bf-modal-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
}

.bf-modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.bf-modal-body {
    padding: 1.4rem;
    overflow-y: auto;
}

.bf-controls-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.bf-control-item {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    padding: 0.6rem 0.85rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.bf-keys-box {
    min-width: 90px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.bf-control-desc strong {
    display: block;
    font-size: 0.88rem;
    color: #f1f5f9;
}

.bf-control-desc span {
    font-size: 0.76rem;
    color: #94a3b8;
}

/* Info & Features Content Underneath the 3D Stage */
.bf-info-section {
    max-width: 1280px;
    margin: 2.5rem auto 1rem;
    padding: 0 1.5rem 3rem;
}

.bf-hero-under {
    text-align: center;
    margin-bottom: 2rem;
}

.bf-hero-under h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 800;
    margin: 0 0 0.6rem;
    color: #fff;
}

.bf-hero-under p {
    font-size: 0.95rem;
    color: #94a3b8;
    max-width: 780px;
    margin: 0 auto;
    line-height: 1.6;
}

.bf-features-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.bf-feat-card {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.4rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.bf-feat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.4);
}

.bf-feat-icon {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.bf-feat-card h3 {
    margin: 0 0 0.4rem;
    font-size: 1.05rem;
    color: #fff;
}

.bf-feat-card p {
    margin: 0;
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.55;
}

/* Responsive */
@media (max-width: 900px) {
    .bf-btn-txt {
        display: none;
    }
    .bf-stage {
        height: 85vh;
        min-height: 480px;
    }
    .bf-minimap-wrap {
        display: none;
    }
    .bf-quick-hint-bar {
        font-size: 0.75rem;
        padding: 0.4rem 1rem;
        bottom: 0.8rem;
    }
}

/* Vista Strada: volo radente fra i palazzi (doppio clic su un punto) */
.bf-hud-btn-street {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.28), rgba(16, 185, 129, 0.22));
    border-color: rgba(74, 222, 128, 0.5);
    color: #4ade80;
}

.bf-hud-btn-street:hover, .bf-hud-btn-street.is-active {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.55), rgba(16, 185, 129, 0.45));
    border-color: #86efac;
    color: #fff;
    box-shadow: 0 0 16px rgba(34, 197, 94, 0.4);
}

.bf-hud-btn-pano {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.3), rgba(249, 115, 22, 0.25));
    border-color: rgba(250, 204, 21, 0.55);
    color: #fde047;
}

.bf-hud-btn-pano:hover {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.6), rgba(249, 115, 22, 0.5));
    border-color: #fef08a;
    color: #fff;
}

/* Vista Strada reale: foto stradali Mapillary sopra la scena 3D */
.bf-pano-wrap {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 58%;
    z-index: 30;
    background: #05070d;
    display: flex;
    flex-direction: column;
    border-left: 2px solid rgba(56, 189, 248, 0.45);
    box-shadow: -18px 0 40px rgba(2, 6, 23, 0.55);
}

/* A tutto schermo: solo la fotografia */
.bf-pano-wrap.is-full {
    width: 100%;
    border-left: none;
}

.bf-pano-wrap[hidden] { display: none; }

.bf-pano-viewer {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
}

.bf-pano-bar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 10px 16px;
    background: rgba(2, 6, 23, 0.92);
    border-top: 1px solid rgba(148, 163, 184, 0.28);
    color: #e2e8f0;
    font-size: 13px;
}

.bf-pano-coords {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    color: #38bdf8;
    font-weight: 700;
}

.bf-pano-hint { color: #94a3b8; }

.bf-pano-hint kbd {
    background: rgba(148, 163, 184, 0.2);
    border-radius: 4px;
    padding: 1px 5px;
    margin: 0 1px;
}

.bf-pano-close {
    margin-left: auto;
    background: rgba(239, 68, 68, 0.25);
    border: 1px solid rgba(248, 113, 113, 0.6);
    color: #fecaca;
    border-radius: 10px;
    padding: 7px 14px;
    font-weight: 700;
    cursor: pointer;
}

.bf-pano-close:hover { background: rgba(239, 68, 68, 0.5); color: #fff; }

.bf-pano-expand {
    background: rgba(56, 189, 248, 0.2);
    border: 1px solid rgba(56, 189, 248, 0.5);
    color: #7dd3fc;
    border-radius: 10px;
    padding: 6px 11px;
    font-size: 15px;
    cursor: pointer;
    margin-left: auto;
}

.bf-pano-expand:hover { background: rgba(56, 189, 248, 0.45); color: #fff; }

.bf-pano-close { margin-left: 8px; }

@media (max-width: 900px) {
    .bf-pano-wrap {
        width: 100%;
        top: auto;
        height: 52%;
        border-left: none;
        border-top: 2px solid rgba(56, 189, 248, 0.45);
    }
    .bf-pano-hint { display: none; }
}

/* Fermo a mezz'aria: il volo si blocca ma il mondo continua */
.bf-hud-btn-hover {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.28), rgba(245, 158, 11, 0.22));
    border-color: rgba(252, 211, 77, 0.5);
    color: #fcd34d;
}

.bf-hud-btn-hover:hover, .bf-hud-btn-hover.is-active {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.6), rgba(245, 158, 11, 0.5));
    border-color: #fde68a;
    color: #fff;
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.4);
}

/* Manetta: andatura di crociera accanto alla velocità */
.bf-throttle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding-left: 8px;
    border-left: 1px solid rgba(148, 163, 184, 0.3);
}

.bf-throttle-btn {
    width: 22px;
    height: 22px;
    line-height: 1;
    border-radius: 7px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(15, 23, 42, 0.7);
    color: #e2e8f0;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    padding: 0;
}

.bf-throttle-btn:hover {
    background: rgba(56, 189, 248, 0.35);
    border-color: #38bdf8;
    color: #fff;
}

.bf-throttle-val {
    min-width: 38px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #7dd3fc;
}
