body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f0f0f0;
    font-weight: 400;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-content {
    flex: 1;
}

.github-link {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s, transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.github-link:hover {
    opacity: 1;
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.2);
}

.header h1 {
    margin: 0;
    font-size: 2em;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.header p {
    margin: 10px 0 0 0;
    opacity: 0.9;
}

.controls {
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.control-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-primary {
    background: #007bff;
    color: white;
}

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

.btn-secondary {
    background: #6c757d;
    color: white;
}

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

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #1e7e34;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.content {
    display: flex;
    flex-direction: row;
    height: 70vh;
    min-height: 500px;
}


.map-container {
    flex: 1;
    position: relative;
    min-width: 0;
    overflow: hidden;
    min-height: 500px;
    height: 600px;
    box-sizing: border-box;
}

#map {
    height: 100%;
    min-height: 500px;
    width: 100%;
    display: block;
    box-sizing: border-box;
}

#map {
    height: 100%;
    width: 100%;
    position: relative;
    display: block; 
}

.sidebar {
    width: 300px;
    background: #f8f9fa;
    padding: 20px;
    overflow-y: auto;
    border-left: 1px solid #e9ecef;
}

.point-list {
    margin-top: 20px;
}

.point-item {
    background: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.point-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.point-title {
    font-weight: bold;
    color: #333;
}

.point-coords {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

.antenna-input {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.antenna-input input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 80px;
}

.slice-container {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}

.elevation-chart {
    width: 100%;
    height: 300px;
    border: 1px solid #ddd;
    border-radius: 5px;
    position: relative;
    background: linear-gradient(to bottom, #87CEEB 0%, #98FB98 70%, #8FBC8F 100%);
}

.chart-title {
    text-align: center;
    margin-bottom: 10px;
    font-weight: bold;
}

.instructions {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #2196f3;
}

.custom-context-menu {
    position: fixed;
    background: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    padding: 5px 0;
    min-width: 120px;
    font-size: 14px;
}

.context-menu-item {
    padding: 8px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.context-menu-item:hover {
    background-color: #f0f0f0;
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 1000px;
    height: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5em;
}

.modal-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.elevation-chart-modal {
    width: 100%;
    height: 400px;
    border: 1px solid #ddd;
    border-radius: 5px;
    position: relative;
    background: linear-gradient(to bottom, #87CEEB 0%, #98FB98 70%, #8FBC8F 100%);
    margin-bottom: 20px;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.loading {
    animation: pulse 1.5s infinite;
}

.success-indicator {
    color: #28a745;
    font-weight: bold;
}

.warning-indicator {
    color: #856404;
    font-weight: bold;
}

/* Loading spinner styles */
.map-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.map-loading p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    .header h1 {
        font-size: 1.5em;
    }
    .header p {
        font-size: 0.9em;
    }
    .controls {
        padding: 15px;
    }
    .control-group {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .btn {
        padding: 12px 16px;
        font-size: 16px;
        min-height: 44px;
    }
    .content {
        flex-direction: column;
        height: auto;
        min-height: auto;
    }
    .sidebar {
        width: 100%;
        border-left: none;
        border-top: 1px solid #e9ecef;
        order: 2;
        padding: 15px;
    }
    .map-container {
        flex: 1;
        min-height: 400px;
        height: 450px;
        order: 1;
    }
    #map {
        min-height: 400px;
        height: 100%;
    }
    .modal-content {
        width: 95%;
        height: 95%;
        margin: 2.5% auto;
    }
    .modal-header {
        padding: 15px;
    }
    .modal-header h2 {
        font-size: 1.2em;
    }
    .modal-body {
        padding: 15px;
    }
    .modal-footer {
        padding: 15px;
        flex-direction: column;
        gap: 10px;
    }
    .elevation-chart-modal {
        height: 300px;
    }
    .antenna-input {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }
    .antenna-input input {
        width: 100%;
        padding: 12px;
        font-size: 16px;
    }
    .point-item {
        padding: 12px;
    }
    .instructions {
        padding: 12px;
        font-size: 0.9em;
    }
    .custom-context-menu {
        min-width: 150px;
        font-size: 16px;
    }
    .context-menu-item {
        padding: 12px 15px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px;
    }
    .header {
        padding: 15px;
    }
    .github-link {
        top: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
    }
    .github-link svg {
        width: 20px;
        height: 20px;
    }
    .header h1 {
        font-size: 1.3em;
    }
    .controls {
        padding: 10px;
    }
    .content {
        display: flex;
        flex-direction: column;
        min-height: 300px;
        height: auto;
    }
    .map-container {
        min-height: 200px;
        height: 300px;
        position: relative;
        flex: none;
    }
    #map {
        min-height: 200px;
        height: 100%;
        position: relative;
        touch-action: pan-y;
    }
    .modal-content {
        width: 98%;
        height: 98%;
        margin: 1% auto;
    }
    .elevation-chart-modal {
        height: 250px;
    }
}
