/* Apple Design System CSS */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'SF Pro Display', 'Helvetica Neue', 'Arial', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'kern' 1;
    text-rendering: optimizeLegibility;
}

* {
    box-sizing: border-box;
    scroll-behavior: smooth;
}

/* Apple-style scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    transition: background 0.2s ease;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Subtle hover effects for interactive elements */
.city-marker {
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

.city-marker:hover {
    transform: scale(1.2);
    filter: brightness(1.1);
}

/* Apple-style table row interactions */
.table-row {
    transition: all 0.15s ease;
    border-radius: 8px;
}

.table-row:hover {
    background-color: rgba(0, 122, 255, 0.04);
    transform: translateX(2px);
}

/* Map country styles */
.country {
    cursor: pointer;
    transition: fill 0.2s ease;
}

.country:hover {
    fill: #d1d5db !important;
}

.city-label {
    pointer-events: none;
    paint-order: stroke;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    font-weight: 500;
    font-size: 11px;
}

/* Apple-style info panel animation */
#info-panel {
    animation: slideInFromRight 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Refined focus states */
button:focus,
select:focus,
input:focus {
    outline: 2px solid #007AFF;
    outline-offset: 2px;
}

/* Apple-style shadow system */
.shadow-apple {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.shadow-apple-lg {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-apple-xl {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Apple-style backdrop blur fallback */
@supports not (backdrop-filter: blur(20px)) {
    .backdrop-blur-xl {
        background-color: rgba(255, 255, 255, 0.95);
    }
}

/* System scrollbar styling for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Apple-style interactive states */
button {
    transition: all 0.15s ease;
}

button:active {
    transform: scale(0.98);
}

/* Typography enhancements */
.font-display {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    font-feature-settings: 'ss01' 1;
    letter-spacing: -0.01em;
}

/* Apple-style status indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}