body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, sans-serif;
}

/* Main Layout */
.main-container {
    display: flex;
    height: 100vh;
}

.map-container {
    flex: 1;
    position: relative;
}

#map {
    height: 100vh;
    width: 100%;
}

/* Allow natural tile rendering for better text sharpness */
.leaflet-tile {
    image-rendering: auto;
}

/* Left Sidebar */
.main-sidebar {
    width: 300px;
    background: #f8f9fa;
    border-right: 1px solid #dee2e6;
    padding: 10px;
    overflow-y: auto;
    box-sizing: border-box;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Sidebar Search Section - moved to top */
.search-section {
    margin-bottom: 5px;
    position: relative;
    margin-top: 0;
    padding-top: 0;
}

.search-input-container {
    position: relative;
    margin-bottom: 10px;
}

.search-input-container input {
    width: 100%;
    padding: 10px 35px 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.search-input-container input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.search-input-container button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    font-size: 14px;
}

.search-results-sidebar {
    position: fixed;
    left: 305px;
    top: 0;
    width: 280px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    max-height: none;
    overflow: visible;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    z-index: 10001;
}

.search-results-sidebar .search-result-item {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-results-sidebar .search-result-item:hover {
    background-color: #f8f9fa;
}

.search-results-sidebar .search-result-item:last-child {
    border-bottom: none;
}

.search-results-sidebar .result-reference {
    font-weight: bold;
    font-size: 13px;
    color: #333;
}

.search-results-sidebar .result-name {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.search-results-sidebar .result-program {
    font-size: 10px;
    color: #999;
    margin-top: 2px;
}

.search-results-sidebar .search-loading,
.search-results-sidebar .no-results,
.search-results-sidebar .search-error {
    padding: 10px;
    text-align: center;
    font-size: 12px;
    color: #666;
}

.search-results-sidebar .more-results {
    padding: 8px 12px;
    font-size: 11px;
    color: #999;
    font-style: italic;
    text-align: center;
}

/* Park Cards Section */
.park-cards-section {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    margin-bottom: 5px;
    position: relative;
}

.park-cards-info {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 40px);
    text-align: center;
    color: #666;
    font-size: 16px;
    line-height: 1.4;
    font-style: italic;
    font-weight: bold;
    padding: 20px;
}

.park-card {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.park-card:hover,
.park-card.hover-active {
    border-color: #007bff;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
    transform: translateY(-1px);
}

.park-card:last-child {
    margin-bottom: 0;
}

.park-header {
    margin-bottom: 6px;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.park-reference {
    font-weight: 700;
    font-size: 13px;
    color: #007bff;
    background: #e3f2fd;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    cursor: pointer;
    transition: all 0.2s ease;
}

.park-reference:hover {
    background: #007bff;
    color: white;
    transform: scale(1.05);
}

.park-bug-icon {
    position: absolute;
    left: 8px;
    color: #6c757d;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.park-bug-icon:hover {
    opacity: 1;
    color: #dc3545;
    transform: scale(1.1);
}

.park-name {
    font-size: 12px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: center;
}

.park-stats-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 11px;
    color: #666;
}

.park-stat-item {
    font-weight: 500;
}

.park-stat-separator {
    color: #999;
    font-weight: bold;
}

.park-activator {
    background: #e8f5e8;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 10px;
    text-align: center;
}

.park-activator-label {
    color: #666;
    font-weight: 500;
}

.park-activator-call {
    color: #2e7d32;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.park-activator-call:hover {
    color: #1b5e20;
    text-decoration: none;
}

.park-close-btn {
    position: absolute;
    top: 4px;
    right: 6px;
    background: none;
    border: none;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    padding: 2px;
    line-height: 1;
    z-index: 10;
}

.park-close-btn:hover {
    color: #333;
}

/* Button Grid - positioned at bottom */
.button-grid {
    margin-top: auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 4px;
    padding: 8px;
    background: #f5f5f5;
    border: 2px solid #007bff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
    margin-bottom: 0;
}

.grid-button {
    background: linear-gradient(145deg, #ffffff, #f1f3f4);
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 6px 4px;
    font-size: 11px;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 45px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    position: relative;
    overflow: hidden;
}

.grid-button-label {
    font-size: 9px;
    line-height: 1;
    text-align: center;
    font-weight: 500;
    pointer-events: none;
}

.grid-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.grid-button:hover {
    background: linear-gradient(145deg, #007bff, #0056b3);
    color: white;
    border-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
}

.grid-button:hover::before {
    left: 100%;
}

.grid-button:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

/* Controls Section */
.controls-section {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 4px;
    margin-top: 3px;
    margin-bottom: 5px;
    padding: 8px;
    background: #f5f5f5;
    border: 2px solid #007bff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.control-button {
    background: linear-gradient(145deg, #ffffff, #f1f3f4);
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 6px 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 9px;
    font-weight: 600;
    color: #495057;
    text-decoration: none;
    min-height: 35px;
}

.control-icon {
    font-size: 14px;
    line-height: 1;
}

.control-text {
    font-size: 8px;
    font-weight: 500;
    text-align: center;
}

.control-button:hover {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.control-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.language-button.active {
    background: linear-gradient(145deg, #007bff, #0056b3);
    color: white;
    border-color: #0056b3;
}

.language-button:hover {
    background: linear-gradient(145deg, #0056b3, #004085);
    color: white;
    border-color: #004085;
}

.info-button:hover {
    background: linear-gradient(145deg, #17a2b8, #138496);
    color: white;
    border-color: #138496;
}

.donate-button {
    background: linear-gradient(145deg, #ffffff, #f1f3f4);
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #495057;
    text-decoration: none;
    min-height: 35px;
    position: relative;
    overflow: hidden;
}

.donate-button:hover {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.donate-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

#coffee-btn:hover {
    background: linear-gradient(145deg, #FFDD00, #FFB000);
    color: #333;
    border-color: #FFB000;
}

#paypal-btn:hover {
    background: linear-gradient(145deg, #0070ba, #005ea6);
    color: white;
    border-color: #005ea6;
}

.donate-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.donate-text {
    font-weight: 500;
}

/* Resource Links Styling */
.resource-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.resource-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(145deg, #f8f9fa, #ffffff);
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.resource-link:hover {
    background: linear-gradient(145deg, #e9ecef, #f1f3f4);
    border-color: #007bff;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.resource-icon {
    font-size: 24px;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.resource-content {
    flex: 1;
}

.resource-title {
    font-size: 14px;
    font-weight: 600;
    color: #343a40;
    margin-bottom: 4px;
}

.resource-description {
    font-size: 12px;
    color: #6c757d;
    line-height: 1.4;
}

/* MyPOTA Button Styling */
.mypota-button {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hunter-icon {
    width: 20px;
    height: 20px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    object-fit: contain;
}

.mypota-button:hover .hunter-icon {
    opacity: 1;
}

.mypota-button:hover {
    background: linear-gradient(145deg, #28a745, #1e7e34);
    color: white;
    border-color: #1e7e34;
}


/* Layer Control Box */
.layer-control-box {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    padding: 8px 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
}

.programs-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.program-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.program-checkbox {
    cursor: pointer;
}

.program-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 500;
}

.program-name {
    color: #333;
}

/* MyPota Layer Control Box (bottom-left) */
.mypota-layer-control-box {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    padding: 6px 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.mypota-layer-programs-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mypota-layer-program-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mypota-layer-checkbox {
    cursor: pointer;
    width: 16px;
    height: 16px;
    margin: 0;
}

.mypota-layer-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    margin: 0;
    user-select: none;
}

.mypota-layer-name {
    color: #333;
    white-space: nowrap;
}

/* Search Control */
.search-control {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    min-width: 250px;
}

.search-box {
    position: relative;
    z-index: 1000;
}

.search-box input {
    width: 100%;
    padding: 8px 35px 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 12px;
    box-sizing: border-box;
}

.search-box input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #3498db;
    border-radius: 6px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 10000;
    margin-top: 2px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    min-width: 100%;
    width: 100%;
}

.search-result-item {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
}

.result-reference {
    font-weight: bold;
    font-size: 12px;
    color: #333;
}

.result-name {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
}

.result-program {
    font-size: 10px;
    color: #999;
    margin-top: 2px;
}

.search-loading, .no-results, .search-error {
    padding: 10px;
    text-align: center;
    font-size: 12px;
    color: #666;
}

.more-results {
    padding: 8px 10px;
    font-size: 11px;
    color: #999;
    font-style: italic;
    text-align: center;
}

/* Custom marker styles */
.pota-marker {
    background: transparent !important;
    border: none !important;
}

.pota-pin {
    background-color: #27ae60;
    color: white;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    min-width: 40px;
}

.sota-marker {
    background: transparent !important;
    border: none !important;
}

.sota-pin {
    background-color: #000000;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Location pin selection highlighting */
.sota-pin.location-selected {
    border: 3px solid #ff4444 !important;
    box-shadow: 0 0 8px rgba(255, 68, 68, 0.6) !important;
}

.location-selected path,
.location-selected circle {
    stroke: #ff4444 !important;
    stroke-width: 4 !important;
    filter: drop-shadow(0 0 6px rgba(255, 68, 68, 0.6)) !important;
}

/* Pin throbbing animations */
@keyframes pin-throb {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    }
    50% {
        transform: scale(1.3);
        box-shadow: 0 4px 8px rgba(255,215,0,0.8);
    }
}

@keyframes circle-throb {
    0%, 100% {
        stroke-width: 2;
        stroke: #ffffff;
        fill-opacity: 0.8;
    }
    50% {
        stroke-width: 6;
        stroke: #ffd700;
        fill-opacity: 1;
    }
}

/* Animation classes to apply to pins */
.pin-highlight {
    animation: pin-throb 0.8s ease-in-out 4;
}

.circle-highlight {
    animation: circle-throb 0.8s ease-in-out 4;
}

/* Continuous strobe animations for card hover */
.pin-strobe {
    animation: pin-throb 0.6s ease-in-out infinite;
}

.circle-strobe {
    animation: circle-throb 0.6s ease-in-out infinite;
}
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}


/* Responsive design */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }

    .main-sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
        order: 1;
    }

    .map-container {
        height: 60vh;
        order: 2;
    }

    #map {
        height: 60vh;
    }


    .layer-control-box {
        top: 10px;
        right: 10px;
        min-width: 120px;
        padding: 8px;
    }

    .program-label {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .main-sidebar {
        padding: 15px;
    }

    .sidebar-header h2 {
        font-size: 1.2em;
    }


    .layer-control-box {
        top: 5px;
        right: 5px;
        min-width: 100px;
        padding: 6px;
    }
}

/* Park Boundary Styles */
.leaflet-interactive {
    cursor: pointer;
}

.leaflet-interactive:hover {
    cursor: pointer;
}

/* Boundary tooltip styling */
.leaflet-tooltip {
    background: rgba(0, 0, 0, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    font-size: 12px !important;
    padding: 4px 8px !important;
    border-radius: 3px !important;
}

/* Enhanced park boundary visibility */
.park-boundary {
    stroke-width: 2;
    stroke-opacity: 0.8;
    fill-opacity: 0.2;
    transition: stroke-width 0.2s ease, stroke-opacity 0.2s ease, fill-opacity 0.2s ease;
}

.park-boundary:hover,
.park-boundary.hover-active {
    stroke-width: 3;
    stroke-opacity: 1.0;
    fill-opacity: 0.3;
}

/* Remove default popup padding and style close button */
.leaflet-popup-content-wrapper {
    padding: 0 !important;
    border-radius: 4px !important;
    overflow: hidden !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    padding: 0 !important;
}

.leaflet-popup-close-button {
    color: white !important;
    font-size: 16px !important;
    font-weight: bold !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5) !important;
    top: 6px !important;
    right: 8px !important;
    width: 20px !important;
    height: 20px !important;
    line-height: 18px !important;
    text-align: center !important;
    z-index: 1000 !important;
    border-radius: 50% !important;
    background: rgba(0,0,0,0.2) !important;
}

/* Information Modal */
.info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(3px);
}

.info-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    max-height: 80vh;
    width: 90%;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.info-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e9ecef;
}

.info-modal-header h2 {
    margin: 0;
    color: #343a40;
    font-size: 24px;
    font-weight: 600;
}

.info-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.info-modal-close:hover {
    background: #f8f9fa;
    color: #495057;
}

.info-modal-body {
    padding: 24px;
}

.info-section {
    margin-bottom: 32px;
}

.info-section:last-child {
    margin-bottom: 0;
}

.info-section h3 {
    color: #495057;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.info-section p {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 16px 0;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.6;
    padding: 8px 0;
    border-bottom: 1px solid #f8f9fa;
    position: relative;
    padding-left: 20px;
}

.features-list li:before {
    content: "✓";
    color: #28a745;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 8px;
}

.features-list li:last-child {
    border-bottom: none;
}

.donation-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

/* Modal responsive design */
@media (max-width: 768px) {
    .info-modal-content {
        max-width: 95%;
        margin: 20px;
        max-height: 90vh;
    }

    .info-modal-header {
        padding: 16px 20px 12px;
    }

    .info-modal-header h2 {
        font-size: 20px;
    }

    .info-modal-body {
        padding: 20px;
    }

    .donation-buttons {
        grid-template-columns: 1fr;
    }
}

/* Mobile-Only Portrait Mode UI */
@media (max-width: 768px) and (orientation: portrait) {
    /* Mobile Top Search Bar */
    .mobile-top-bar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 45px;
        background: #ffffff;
        border-bottom: 2px solid #007bff;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        z-index: 2000;
        display: flex;
        align-items: center;
        padding: 0 8px;
        box-sizing: border-box;
    }

    .mobile-search-input {
        flex: 1;
        height: 36px;
        border: 1px solid #ced4da;
        border-radius: 6px;
        padding: 0 12px;
        font-size: 15px;
        box-sizing: border-box;
        margin-right: 6px;
    }

    .mobile-search-input:focus {
        outline: none;
        border-color: #007bff;
        box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
    }

    .mobile-search-button {
        width: 36px;
        height: 36px;
        background: #007bff;
        border: none;
        border-radius: 6px;
        color: white;
        font-size: 18px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        transition: background 0.2s ease;
    }

    .mobile-search-button:active {
        background: #0056b3;
    }

    .mobile-search-results {
        position: fixed;
        top: 47px;
        left: 8px;
        right: 8px;
        background: white;
        border: 2px solid #007bff;
        border-radius: 8px;
        max-height: 300px;
        overflow-y: auto;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        z-index: 2500;
    }

    .mobile-search-item {
        padding: 12px 15px;
        border-bottom: 1px solid #eee;
        cursor: pointer;
        transition: background-color 0.2s;
        -webkit-tap-highlight-color: rgba(0, 123, 255, 0.1);
        user-select: none;
        -webkit-user-select: none;
    }

    .mobile-search-item:hover,
    .mobile-search-item:active {
        background-color: #e3f2fd;
    }

    .mobile-search-item:last-child {
        border-bottom: none;
    }

    .mobile-search-item .result-reference {
        font-weight: bold;
        font-size: 14px;
        color: #007bff;
        margin-bottom: 4px;
    }

    .mobile-search-item .result-name {
        font-size: 13px;
        color: #666;
        margin-bottom: 2px;
    }

    .mobile-search-item .result-program {
        font-size: 11px;
        color: #999;
    }

    /* Mobile Bottom Button Bar */
    .mobile-bottom-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 55px;
        background: #ffffff;
        border-top: 2px solid #007bff;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 2000;
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 3px;
        padding: 4px 3px;
        box-sizing: border-box;
    }

    .mobile-button {
        background: linear-gradient(145deg, #ffffff, #f1f3f4);
        border: 1px solid #e1e5e9;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.2s ease;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 2px 1px;
        font-size: 10px;
        font-weight: 600;
        color: #495057;
        min-height: 44px;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-button:active {
        background: linear-gradient(145deg, #007bff, #0056b3);
        color: white;
        border-color: #0056b3;
        transform: scale(0.95);
    }

    .mobile-button-icon {
        width: 20px;
        height: 20px;
        object-fit: contain;
        display: block;
    }

    .mobile-button-label {
        font-size: 8px;
        line-height: 1;
        text-align: center;
    }

    /* Adjust map for mobile bars */
    .map-container {
        margin-top: 45px;
        margin-bottom: 55px;
    }

    #map {
        height: calc(100vh - 100px);
    }

    /* Hide desktop sidebar in mobile portrait mode */
    .main-sidebar {
        display: none !important;
    }

    /* Adjust layer control for mobile */
    .layer-control-box {
        top: 55px !important;
        right: 10px;
        width: fit-content !important;
        min-width: 0 !important;
        max-width: none !important;
        padding: 5px !important;
    }

    .layer-control-box .programs-list {
        gap: 5px !important;
        width: fit-content !important;
    }

    .layer-control-box .program-item {
        gap: 5px !important;
        width: fit-content !important;
        justify-content: flex-start !important;
    }

    .layer-control-box .program-label {
        gap: 3px !important;
        font-size: 13px !important;
        width: fit-content !important;
    }

    .layer-control-box .program-checkbox {
        width: 16px !important;
        height: 16px !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
    }

    .layer-control-box .program-name {
        white-space: nowrap !important;
        width: fit-content !important;
    }

    /* Position Leaflet zoom controls above mobile button bar */
    .leaflet-bottom.leaflet-left {
        bottom: 65px !important;
    }

    /* Hide zoom controls in mobile mode (pinch-to-zoom only) */
    .leaflet-control-zoom {
        display: none !important;
    }

    /* Make attribution full width and fixed at button bar edge */
    .leaflet-control-attribution {
        position: fixed !important;
        bottom: 55px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 5px !important;
        text-align: center !important;
        box-sizing: border-box !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        z-index: 1999 !important;
    }

    /* Adjust info modal for mobile with top/bottom bars */
    .info-modal {
        padding-top: 45px;
        padding-bottom: 55px;
    }

    /* Fix search results z-index to appear above map */
    .mobile-search-results {
        z-index: 2500 !important;
    }

    /* Mobile Park Cards Container */
    .mobile-park-cards-container {
        position: fixed;
        bottom: 65px;
        left: 10px;
        right: 10px;
        z-index: 1500;
        pointer-events: auto;
    }

    /* Mobile Park Card */
    .mobile-park-card {
        background: rgba(255, 255, 255, 0.97);
        border-radius: 8px;
        padding: 8px 10px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
        transition: transform 0.3s ease;
        position: relative;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-park-card:active {
        transform: scale(0.98);
    }

    /* Card Row 1: Reference (centered) + Close Button (right) */
    .mobile-card-row-1 {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 6px;
        position: relative;
    }

    .mobile-card-reference {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        padding: 4px 12px;
        border-radius: 12px;
        font-weight: bold;
        font-size: 13px;
        text-align: center;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-card-reference:active {
        transform: scale(0.95);
    }

    .mobile-card-close {
        position: absolute;
        right: 0;
        background: #dc3545;
        color: white;
        border: none;
        border-radius: 50%;
        width: 24px;
        height: 24px;
        font-size: 18px;
        line-height: 1;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-card-close:active {
        transform: scale(0.9);
    }

    /* Card Row 2: Name (centered) */
    .mobile-card-row-2 {
        margin-bottom: 6px;
    }

    .mobile-card-name {
        font-size: 14px;
        font-weight: bold;
        color: #2c3e50;
        text-align: center;
        line-height: 1.3;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Card Row 3: Stats (centered) + Pagination (right) */
    .mobile-card-row-3 {
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }

    .mobile-card-stats {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 11px;
        color: #555;
    }

    .mobile-card-separator {
        color: #999;
    }

    .mobile-card-first-activator-label {
        color: #555;
        font-size: 11px;
        margin-left: 2px;
    }

    .mobile-card-first-activator {
        color: #667eea;
        font-weight: 600;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        margin-left: 2px;
    }

    .mobile-card-first-activator:active {
        transform: scale(0.95);
        color: #764ba2;
    }

    .mobile-card-pagination {
        position: absolute;
        right: 0;
        font-size: 10px;
        color: #666;
        font-weight: 600;
    }

    /* Swipe Hint */
    .mobile-card-swipe-hint {
        text-align: center;
        font-size: 9px;
        color: #999;
        font-style: italic;
        margin-top: 4px;
        padding-top: 4px;
        border-top: 1px solid #eee;
    }

    /* Mobile Park Selector Button Grid */
    .mobile-park-selector {
        position: fixed;
        bottom: 63px;
        left: 10px;
        right: 10px;
        z-index: 1450;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: 4px;
        padding: 6px;
        background: rgba(255, 255, 255, 0.95);
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        pointer-events: auto;
        justify-content: center;
        max-width: 100%;
    }

    .mobile-park-button {
        background: #ffffff;
        color: #2c3e50;
        border: 2px solid #999;
        border-radius: 4px;
        padding: 4px 2px;
        font-size: 10px;
        font-weight: 600;
        text-align: center;
        cursor: pointer;
        transition: all 0.2s ease;
        height: 28px;
        min-height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-park-button:active {
        transform: scale(0.95);
    }

    .mobile-park-button.active {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        font-weight: 700;
    }
}