html,
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-size: 14px;
}

.interpolated-value {
    color: red;
}

#map {
    width: 100%;
    height: 100vh;
    position: relative;
}

.sidebar {
    width: 100%;
    background: linear-gradient(135deg, #0A192F 0%, #0D2448 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-bottom: 2px solid;
    border-image: linear-gradient(90deg, #1E40AF, #0EA5E9, #1E40AF) 1;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 100;
    backdrop-filter: blur(10px);
}

.sidebar h1 {
    background: linear-gradient(135deg, #60A5FA, #0EA5E9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

@media (max-width: 768px) {
    .sidebar {
        padding: 0.75rem;
    }
}

.zoom-controls {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.zoom-controls button {
    background: linear-gradient(135deg, #FFFFFF, #F3F4F6);
    border: none;
    border-radius: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    font-weight: 600;
}

.zoom-controls button:hover {
    background: linear-gradient(135deg, #60A5FA, #0EA5E9);
    transform: scale(1.15) translateY(-2px);
    box-shadow: 0 8px 24px rgba(96, 165, 250, 0.4);
}

.legend {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    min-width: 180px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 0.75rem;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-item span:last-child {
    font-size: 0.85rem;
    font-weight: 500;
    color: #1F2937;
}

.spinner {
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-left-color: #60A5FA;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

.loading-spinner-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    display: none;
}

.loading-spinner-container.active {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.95);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
}

.loading-spinner-container.active::after {
    content: 'Loading Assets...';
    margin-left: 1rem;
    color: #60A5FA;
    font-weight: 600;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.select-container select {
    appearance: none;
    background: linear-gradient(135deg, #FFFFFF, #F9FAFB);
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    padding: 0.625rem 2.5rem 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #FFFFFF;
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2360A5FA' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.2rem;
    cursor: pointer;
}

.select-container select:disabled {
    background: #F3F4F6;
    color: #9CA3AF;
    cursor: not-allowed;
    opacity: 0.6;
}

.custom-compass {
    position: absolute;
    bottom: 70px;
    left: 15px;
    z-index: 1000;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(249, 250, 251, 0.95));
    border: 2px solid rgba(96, 165, 250, 0.3);
    border-radius: 50%;
    width: 95px;
    height: 95px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.compass-inner {
    position: relative;
    width: 85px;
    height: 85px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compass-direction {
    position: absolute;
    font-size: 16px;
    font-weight: 700;
    color: #1F2937;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.compass-n {
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    color: #EF4444;
    animation: pulse-n 2s ease-in-out infinite;
}

@keyframes pulse-n {

    0%,
    100% {
        color: #EF4444;
    }

    50% {
        color: #F87171;
    }
}

.compass-s {
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
}

.compass-e {
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
}

.compass-w {
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
}

.compass-needle {
    position: absolute;
    width: 3px;
    height: 22px;
    background: linear-gradient(to top, #1E40AF 0%, #60A5FA 50%, #EF4444 100%);
    left: 50%;
    top: 50%;
    transform-origin: bottom center;
    transform: translateX(-50%) translateY(-100%);
    border-radius: 2px;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.4);
}

.compass-center {
    position: absolute;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #1E40AF, #60A5FA);
    border-radius: 50%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.3);
}

.popup-content {
    font-family: 'Poppins', sans-serif;
    padding: 1rem;
    background: linear-gradient(135deg, #FFFFFF, #F9FAFB);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border-left: 4px solid #60A5FA;
}

.popup-title {
    font-size: 1rem;
    font-weight: 700;
    background: #de9308;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.4rem;
}

.popup-title span.red-value {
    -webkit-text-fill-color: red !important;
    color: red !important;
    background: none !important;
}

.popup-coords {
    font-size: 0.8rem;
    color: #6B7280;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.popup-details {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #4B5563;
    border-top: 2px solid rgba(96, 165, 250, 0.2);
    padding-top: 0.8rem;
    margin-top: 0.8rem;
}

.popup-details span strong {
    color: #1E40AF;
    font-weight: 700;
}

.pipeline-legend {
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 2px solid rgba(96, 165, 250, 0.2);
}

.pipeline-legend h4 {
    color: #1E40AF;
    font-weight: 700;
}

.pipeline-legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.7rem;
    gap: 0.75rem;
}

.pipeline-legend-line {
    width: 24px;
    height: 3px;
    margin-right: 4px;
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#interpolationBtn {
    background: linear-gradient(135deg, #60A5FA, #0EA5E9);
    border: none;
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 16px rgba(96, 165, 250, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#interpolationBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(96, 165, 250, 0.5);
    background: linear-gradient(135deg, #0EA5E9, #06B6D4);
}

#interpolationBtn:active {
    transform: translateY(0);
}

#interpolationModal {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    width: 100%;
}

#interpolationModal .bg-white {
    background: linear-gradient(135deg, #FFFFFF, #F9FAFB);
    border: 2px solid rgba(96, 165, 250, 0.2);
    border-radius: 16px;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.3);
    width: 430px;
    max-width: 90%;
    margin: 0 auto;
    padding: 2rem;
}

#interpolationModal h3 {
    background: linear-gradient(135deg, #1E40AF, #0EA5E9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

#interpolationModal label {
    color: #1F2937;
    font-weight: 700;
    font-size: 0.95rem;
}

#interpolationModal input,
#interpolationModal select {
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

#interpolationModal input:focus,
#interpolationModal select:focus {
    outline: none;
    border-color: #60A5FA;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.15);
    background: #F0F9FF;
}

#interpolationModal .bg-gray-100 {
    background: linear-gradient(135deg, #F0F9FF, #E0F2FE);
    border: 2px solid rgba(96, 165, 250, 0.2);
    border-radius: 12px;
}

#calculationResult {
    background: linear-gradient(135deg, #1E40AF, #0EA5E9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5rem;
    font-weight: 900;
}

#interpolationModal button {
    border-radius: 10px;
    font-weight: 700;
    transition: all 0.3s ease;
    cursor: pointer;
}

#interpolationModal button:first-of-type {
    border: 2px solid #E5E7EB;
    color: #6B7280;
}

#interpolationModal button:first-of-type:hover {
    background: #F3F4F6;
    border-color: #9CA3AF;
}

#interpolationModal button:last-of-type {
    background: linear-gradient(135deg, #60A5FA, #0EA5E9);
    color: white;
    box-shadow: 0 4px 16px rgba(96, 165, 250, 0.3);
}

#interpolationModal button:last-of-type:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(96, 165, 250, 0.5);
    background: linear-gradient(135deg, #0EA5E9, #06B6D4);
}