body {
    font-family: Arial, sans-serif;
    margin: 20px;
    background-color: #f5f5f5;
}
.container {
    max-width: 1400px;
    margin: 0 auto;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.controls {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}
.control-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.control-group.checkbox-stack {
    gap: 8px;
}
.control-group label {
    font-weight: bold;
    font-size: 12px;
    color: #666;
}
input, select, button {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
button {
    background-color: #007bff;
    color: white;
    cursor: pointer;
    font-weight: bold;
}
button:hover {
    background-color: #0056b3;
}
button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}
.scrape-btn {
    background-color: #dc3545;
}
.scrape-btn:hover:not(:disabled) {
    background-color: #c82333;
}
.export-btn {
    background-color: #28a745;
}
.export-btn:hover {
    background-color: #1e7e34;
}
.file-input {
    margin-bottom: 15px;
}
.scrape-section {
    background-color: #e9ecef;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}
.progress-container {
    margin-top: 10px;
    display: none;
}
.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #ddd;
}
.progress-fill {
    height: 100%;
    background-color: #007bff;
    transition: width 0.3s ease;
    width: 0%;
}
.progress-text {
    margin-top: 5px;
    font-size: 14px;
    color: #666;
}
.stats {
    margin: 10px 0;
    font-weight: bold;
    color: #666;
}
.debug {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    max-height: 200px;
    overflow-y: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}
th {
    background-color: #f8f9fa;
    cursor: pointer;
    user-select: none;
    position: sticky;
    top: 0;
    z-index: 10;
}
th:hover {
    background-color: #e9ecef;
}
th.sort-asc::after {
    content: " ↑";
}
th.sort-desc::after {
    content: " ↓";
}
tr:nth-child(even) {
    background-color: #f9f9f9;
}
tr:hover {
    background-color: #e8f4f8;
}
tr.selected {
    background-color: #007bff !important;
    color: white;
}
tr.selected .frequency,
tr.selected .callsign,
tr.selected .distance {
    color: white !important;
}
.table-row-clickable {
    cursor: pointer;
}
.table-container {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.frequency {
    font-weight: bold;
    color: #007bff;
}
.callsign {
    font-weight: bold;
    color: #dc3545;
}
.distance {
    color: #28a745;
    font-weight: bold;
}
.error {
    color: #dc3545;
    background-color: #f8d7da;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}
.success {
    color: #155724;
    background-color: #d4edda;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}
.last-updated {
    font-size: 12px;
    color: #666;
    font-style: italic;
}
.map-container {
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}
#map {
    height: 500px;
    width: 100%;
}
.mapboxgl-popup-content {
    max-width: 300px;
}
.popup-content {
    font-size: 12px;
}
.popup-content h4 {
    margin: 0 0 10px 0;
    color: #007bff;
}
.popup-content .frequency {
    font-weight: bold;
    color: #dc3545;
    font-size: 14px;
}
.view-toggle {
    margin: 10px 0;
    display: flex;
    gap: 10px;
    align-items: center;
}
.view-toggle button {
    padding: 6px 12px;
    font-size: 12px;
}
.view-toggle button.active {
    background-color: #28a745;
}
.map-controls {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.control-group label input[type="checkbox"] {
    margin-right: 5px;
}
.control-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: none;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
}

.settings-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
    padding: 5px 10px;
}

.settings-btn:hover {
    color: #333;
    background: none;
}

.header-container {
    position: relative;
}

/* Fix Mapbox popup close button accessibility issue */
.mapboxgl-popup-close-button {
    aria-hidden: false !important;
}

/* Favorites star styling */
.favorite-star {
    cursor: pointer;
    font-size: 16px;
    color: #ccc;
    margin-right: 8px;
    transition: color 0.2s ease;
    user-select: none;
}

.favorite-star:hover {
    color: #ffc107;
}

.favorite-star.favorited {
    color: #ffc107;
}

.favorite-star.favorited:hover {
    color: #e0a800;
}

/* Fullscreen button styling */
.fullscreen-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1001;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.fullscreen-btn:hover {
    background: white;
    color: #000;
}

.map-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    margin: 0;
    border: none;
    border-radius: 0;
}

.map-container.fullscreen #map {
    height: 100vh;
}
