body {
    padding: 0;
    font-family: Arial, sans-serif;
    margin:
        env(safe-area-inset-top) 
        env(safe-area-inset-right) 
        env(safe-area-inset-bottom) 
        env(safe-area-inset-left);
}
#map {
    height: 100vh;
    width: 100%;
}
.controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    color: #FFFFFF;
    padding: 0px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    font: 16px Arial, sans-serif;
}
.toggle-item {
    background: #073B4C;
    padding: 10px;
    border: 1px solid #000000;
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}
.toggle-item:hover {
    background: #0a4a5c;
}
.toggle-item input[type="checkbox"] {
    margin-right: 8px;
    pointer-events: none;
}

/* CPN label styling */
.cpn-label {
    background: rgba(6, 214, 160, 0.9) !important;
    border: 1px solid #000000 !important;
    border-radius: 3px !important;
    color: #000000 !important;
    font-weight: bold !important;
    font-size: 11px !important;
    padding: 2px 4px !important;
    white-space: nowrap !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
    z-index: 1000 !important;
}

.cpn-label:before {
    border-top-color: rgba(6, 214, 160, 0.9) !important;
}

/* Art popup image styling */
.leaflet-popup-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 5px 0 !important;
    border-radius: 4px !important;
}

.leaflet-popup-content {
    max-width: 250px !important;
    margin: 8px !important;
}

/* Update notification styles */
.update-notification {
    display: none;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    background: #118ab2;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    font-size: 14px;
    max-width: 90vw;
}

.update-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.update-message {
    font-weight: bold;
}

.update-buttons {
    display: flex;
    gap: 10px;
}

.update-btn, .dismiss-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
}

.update-btn {
    background: #06d6a0;
    color: #000;
}

.update-btn:hover {
    background: #05c493;
}

.dismiss-btn {
    background: transparent;
    color: white;
    border: 1px solid white;
}

.dismiss-btn:hover {
    background: rgba(255,255,255,0.1);
}

/* Install button styles */
.install-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    height: 50px;
    padding: 0 16px;
    border-radius: 25px;
    background: #06d6a0;
    border: none;
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: all 0.2s ease;
    font-weight: bold;
    font-size: 14px;
}

.install-btn:hover {
    background: #05c493;
    transform: translateY(-2px);
}

.install-btn:active {
    transform: translateY(0);
}

/* About button styles */
.about-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #118ab2;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: all 0.2s ease;
}

.about-btn:hover {
    background: #0f7a9e;
    transform: scale(1.05);
}

.about-btn:active {
    transform: scale(0.95);
}

/* About modal styles */
.about-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 10001;
    padding: 20px;
    box-sizing: border-box;
}

.about-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
}

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

.about-header h2 {
    margin: 0;
    color: #118ab2;
    font-size: 24px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-btn:hover {
    background: #f0f0f0;
    color: #666;
}

.about-body {
    padding: 20px;
    line-height: 1.6;
}

.about-body p {
    margin: 0 0 15px 0;
}

.about-body ul {
    margin: 10px 0 15px 20px;
    padding: 0;
}

.about-body li {
    margin: 5px 0;
}

.version {
    font-size: 14px;
    color: #666;
    margin-top: 20px !important;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* Update section styles */
.update-section {
    margin-top: 20px;
    text-align: center;
}

.check-updates-btn,
.export-logs-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin: 5px;
}

.export-logs-btn {
    background: #6c757d;
}

.check-updates-btn:hover {
    background: #0056b3;
}

.export-logs-btn:hover {
    background: #545b62;
}

.check-updates-btn:disabled,
.export-logs-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Mobile optimizations */
@media (max-width: 600px) {
    .install-btn {
        bottom: calc(20px + env(safe-area-inset-bottom));
        left: calc(20px + env(safe-area-inset-left));
    }
    
    .about-btn {
        bottom: calc(20px + env(safe-area-inset-bottom));
        right: calc(20px + env(safe-area-inset-right));
    }
    
    .about-modal {
        padding: 10px;
    }
    
    .about-content {
        border-radius: 8px;
        max-height: calc(100vh - 20px);
    }
    
    .about-header h2 {
        font-size: 20px;
    }
}

/* iOS Install Panel */
.ios-install-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    z-index: 10002;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

.ios-install-panel.show {
    transform: translateY(0);
}

.ios-install-content {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

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

.ios-install-header h3 {
    margin: 0;
    color: #118ab2;
    font-size: 20px;
}

.ios-install-body p {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 16px;
}

.ios-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 15px;
}

.step-number {
    background: #118ab2;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}

.step-text {
    flex: 1;
}

.step-text p {
    margin: 0;
    color: #333;
    line-height: 1.5;
}

.step-text strong {
    color: #118ab2;
}

/* Handle for dragging (visual cue) */
.ios-install-panel::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
}

/* Street label styling */
.street-label-radial {
    background: rgba(255, 255, 255, 0) !important;
    border: none !important;
    border-radius: 3px !important;
    color: #FFF !important;
    font-weight: bold !important;
    font-size: 12px !important;
    padding: 2px 6px !important;
    white-space: nowrap !important;
    box-shadow: none !important;
}

.street-label-arc {
    background: rgba(17, 138, 178, 0.9) !important;
    border: 1px solid #073B4C !important;
    border-radius: 4px !important;
    color: #FFFFFF !important;
    font-weight: bold !important;
    font-size: 12px !important;
    padding: 3px 6px !important;
    white-space: nowrap !important;
    box-shadow: 0 2px 4px rgba(7, 59, 76, 0.4) !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5) !important;
}

.street-label-concentric {
    background: rgba(17, 138, 178, 0) !important;
    border: 0px solid #073B4C !important;
    border-radius: 4px !important;
    color: #FFFFFF !important;
    font-weight: bold !important;
    font-size: 12px !important;
    padding: 3px 6px !important;
    white-space: nowrap !important;
    box-shadow: 0 2px 4px rgba(7, 59, 76, 0.4) !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5) !important;
}

.street-label-radial:before {
    border-top-color: rgba(255, 255, 255, 0) !important;
}

.street-label-arc:before {
    border-top-color: rgba(17, 138, 178, 0.9) !important;
}

