/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

html, body, #map {
    height: 100vh;
    width: 100vw;
}

/* Animated liquid background */
.liquid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
    backdrop-filter: blur(20px);
    animation: float 6s ease-in-out infinite;
}

.bubble-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.bubble-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.bubble-3 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 70%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

/* Glass panel base style */
.glass-panel {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.glass-panel:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Tag count display */
.tag-count {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    font-size: 14px;
    color: rgba(244, 244, 246, 0.95);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    min-width: 320px;
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.tag-count .font-bold {
    font-weight: 600;
    color: rgb(255, 255, 255);
}

.tag-count .text-green-600 { color: #10de24; }
.tag-count .text-blue-600 { color: #1063de; }
.tag-count .text-red-600 { color: #de10ca; }
.tag-count .text-yellow-600 { color: #de8b10; }


               

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Quick tooltip */
.quick-tooltip {
    position: absolute;
    z-index: 1000;
    padding: 12px 16px;
    min-width: 200px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s ease-out;
    color: rgba(82, 5, 5, 0.95);
    font-size: 13px;
}

.quick-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

.tooltip-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 600;
    color: rgba(255, 255, 255, 1);
}

.aircraft-icon {
    font-size: 16px;
}

.tooltip-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-row .label {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.info-row .value {
    font-weight: 600;
    color: rgba(255, 255, 255, 1);
}

.tag-value {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

/* Info card */
.info-card {
    position: absolute;
    left: 20px;
    top: 20px;
    width: 350px;
    height: calc(100vh - 40px);
    max-height: 600px;
    z-index: 1000;
    color: rgba(255, 255, 255, 0.95);
    transform: translateX(-400px);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
}

.info-card.show {
    transform: translateX(0);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 1);
}

.close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.card-content {
    padding: 12px;
    height: calc(100% - 80px);
    overflow-y: auto;
}

.aircraft-photo {
    position: relative;
    width: 100%;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.1);
}

.aircraft-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.aircraft-photo:hover img {
    transform: scale(1.05);
}

.photo-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    color: rgba(255, 255, 255, 0.6);
}

.aircraft-icon-large {
    font-size: 48px;
    margin-bottom: 8px;
}

.aircraft-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-group h4 {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item .label {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
}

.info-item .value {
    font-weight: 600;
    color: rgba(255, 255, 255, 1);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #32CD32;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(50, 205, 50, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(50, 205, 50, 0); }
    100% { box-shadow: 0 0 0 0 rgba(50, 205, 50, 0); }
}

/* Controls panel */
.controls-panel {
    position: absolute;
    left: 20px;
    bottom: 20px;
    padding: 20px 24px;
    color: rgba(13, 28, 115, 0.95);
    z-index: 10;
    min-width: 200px;
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.control-group {
    margin-bottom: 16px;
}

.control-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.8);
}

.glass-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.95);
    font-size: 13px;
    transition: all 0.2s ease;
}

.glass-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

.glass-button {
    position: relative;
    width: 100%;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    color: rgba(255, 255, 255, 1);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.glass-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2));
}

.glass-button:active {
    transform: translateY(0);
}

.button-ripple {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.3s ease;
    pointer-events: none;
}

.glass-button:active .button-ripple {
    transform: scale(1);
}

/* Maplibre popup styling */
.maplibregl-popup {
    font-family: 'Inter', sans-serif;
    max-width: 250px;
}

.maplibregl-popup-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    font-size: 13px;
    line-height: 1.6;
    color: #333;
}

.maplibregl-popup-tip {
    border-top-color: rgba(255, 255, 255, 0.95) !important;
}

.maplibregl-popup-close-button {
    display: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .tag-count {
        top: 10px;
        right: 10px;
        padding: 12px 16px;
        font-size: 12px;
        min-width: 280px;
    }
    
    .info-card {
        width: calc(100vw - 40px);
        left: 20px;
        right: 20px;
    }
    
    .controls-panel {
        left: 10px;
        bottom: 10px;
        padding: 16px 20px;
    }
}

/* Smooth scrollbar for info card */
.card-content::-webkit-scrollbar {
    width: 4px;
}

.card-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.card-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.card-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}